fixing remix-ide linting

pull/4771/head
lianahus 7 months ago
parent f80fbfd0dc
commit 4716cfa2e7
  1. 4
      apps/remix-ide/src/app/files/dgitProvider.ts
  2. 2
      apps/remix-ide/src/app/files/electronProvider.ts
  3. 1
      apps/remix-ide/src/app/files/fileManager.ts
  4. 1
      apps/remix-ide/src/app/files/fileProvider.ts
  5. 1
      apps/remix-ide/src/app/files/fileSystem.ts
  6. 2
      apps/remix-ide/src/app/files/filesystems/fileSystemUtility.ts
  7. 1
      apps/remix-ide/src/app/files/filesystems/indexedDB.ts
  8. 2
      apps/remix-ide/src/app/panels/terminal.tsx
  9. 3
      apps/remix-ide/src/app/plugins/code-format.ts
  10. 1
      apps/remix-ide/src/app/plugins/code-format/parser.ts
  11. 1
      apps/remix-ide/src/app/plugins/parser/code-parser.tsx
  12. 1
      apps/remix-ide/src/app/plugins/parser/services/code-parser-antlr-service.ts
  13. 2
      apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts
  14. 3
      apps/remix-ide/src/app/plugins/parser/services/code-parser-gas-service.ts
  15. 10
      apps/remix-ide/src/app/plugins/parser/types/antlr-types.ts
  16. 2
      apps/remix-ide/src/app/plugins/solcoderAI.tsx
  17. 1
      apps/remix-ide/src/blockchain/providers/vm.ts

@ -121,7 +121,6 @@ class DGitProvider extends Plugin {
return status
}
const status = await git.statusMatrix({
...await this.getGitConfig(),
...cmd
@ -224,7 +223,6 @@ class DGitProvider extends Plugin {
return status
}
const status = await git.log({
...await this.getGitConfig(),
...cmd,
@ -269,8 +267,6 @@ class DGitProvider extends Plugin {
async currentbranch(config) {
if ((Registry.getInstance().get('platform').api.isDesktop())) {
return await this.call('isogit', 'currentbranch')
}

@ -1,6 +1,5 @@
import FileProvider from "./fileProvider"
declare global {
interface Window {
remixFileSystem: any
@ -50,7 +49,6 @@ export class ElectronProvider extends FileProvider {
}
}
// isDirectory is already included
// this is a more efficient version of the default implementation
async resolveDirectory(path, cb) {

@ -927,7 +927,6 @@ class FileManager extends Plugin {
return exists
}
async moveFileIsAllowed (src: string, dest: string) {
try {
src = this.normalize(src)

@ -5,7 +5,6 @@ import EventManager from 'events'
import { Storage } from '@remix-project/remix-lib'
import pathModule from 'path'
export default class FileProvider {
event: any
type: any

@ -67,6 +67,5 @@ export class fileSystems {
return null
}
}

@ -72,7 +72,6 @@ export class fileSystemUtility {
}
}
/**
* copy the folder recursively
* @param {string} path is the folder to be copied over
@ -150,7 +149,6 @@ export class fileSystemUtility {
}
}
/* eslint-disable no-template-curly-in-string */
export const migrationTestData = {
'.workspaces': {

@ -47,7 +47,6 @@ export class IndexedDBStorage extends LightningFS {
}
}
export class indexedDBFileSystem extends fileSystem {
constructor() {
super()

@ -11,7 +11,6 @@ import EventManager from '../../lib/events'
import { CompilerImports } from '@remix-project/core-plugin' // eslint-disable-line
import { RemixUiXterminals } from '@remix-ui/xterm'
const KONSOLES = []
function register(api) { KONSOLES.push(api) }
@ -113,7 +112,6 @@ class Terminal extends Plugin {
}
onActivation() {
this.renderComponent()
}

@ -210,8 +210,6 @@ export class CodeFormat extends Plugin {
this.call('notification', 'toast', `Error parsing prettier config file: ${prettierConfigFile}`)
}
// merge options
if (parsed) {
options = {
@ -251,7 +249,6 @@ export class CodeFormat extends Plugin {
}
}
const result = this.prettier.format(content, {
plugins: [sol as any, this.ts, this.babel, this.espree, this.yml],
parser: parserName,

@ -194,4 +194,3 @@ export function parse(text, _parsers, options) {
return parsed;
}

@ -544,7 +544,6 @@ export class CodeParser extends Plugin {
return nodeDefinition.ast
}
return nodeDefinition.parser
}

@ -201,7 +201,6 @@ export default class CodeParserAntlrService {
return nodes
}
/**
*
* @param ast

@ -75,7 +75,6 @@ export default class CodeParserCompiler {
length: error.sourceLocation.end - error.sourceLocation.start
}, lineBreaks)
const filePath = error.sourceLocation.file
const fileTarget = await this.plugin.call('fileManager', 'getUrlFromPath', filePath)
@ -110,7 +109,6 @@ export default class CodeParserCompiler {
nodesPerFile: {},
}
this.plugin._buildIndex(data, source)
// cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository
const extractedFiledNodes = this.plugin._extractFileNodes(this.plugin.currentFile, this.plugin.compilerAbstract as unknown as lastCompilationResult)

@ -33,7 +33,6 @@ export default class CodeParserGasService {
}
async showGasEstimates() {
const showGasConfig = await this.plugin.call('config', 'getAppParameter', 'show-gas')
if (!showGasConfig) {
@ -72,10 +71,8 @@ export default class CodeParserGasService {
this.plugin.call('editor', 'addLineText', linetext, estimate.range.fileName)
}
}
}
}

@ -24,7 +24,6 @@ interface Token {
}
}
interface Location {
start: {
line: number
@ -594,7 +593,6 @@ export type Statement =
type ASTMap<U> = { [K in ASTNodeTypeString]: U extends { type: K } ? U : never }
type ASTTypeMap = ASTMap<ASTNode>
export const astNodeTypes = [
'SourceUnit',
'PragmaDirective',
@ -673,9 +671,6 @@ export const astNodeTypes = [
'InvalidNode'
] as const
export const binaryOpValues = [
'+',
'-',
@ -725,8 +720,3 @@ export const unaryOpValues = [
] as const
export type UnaryOp = typeof unaryOpValues[number]

@ -195,6 +195,4 @@ export class SolCoder extends Plugin {
}
}
}

@ -102,7 +102,6 @@ export class VMProvider {
})
}
// TODO: is still here because of the plugin API
// can be removed later when we update the API
createVMAccount (newAccount) {

Loading…
Cancel
Save