From e0a2012a788ddb270312231e738b351a1fbc3bb9 Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 30 Apr 2024 10:46:37 +0200 Subject: [PATCH] fixing linting for remix-solidity --- libs/remix-solidity/src/compiler/compiler-input.ts | 2 +- libs/remix-solidity/src/compiler/compiler.ts | 2 +- libs/remix-solidity/src/compiler/helper.ts | 2 +- libs/remix-solidity/src/compiler/types.ts | 2 +- libs/remix-solidity/tests/compiler-input.spec.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/remix-solidity/src/compiler/compiler-input.ts b/libs/remix-solidity/src/compiler/compiler-input.ts index 61c8ece472..f0c5666622 100644 --- a/libs/remix-solidity/src/compiler/compiler-input.ts +++ b/libs/remix-solidity/src/compiler/compiler-input.ts @@ -20,7 +20,7 @@ export default (sources: Source, opts: CompilerInputOptions): string => { }, remappings: opts.remappings || [] } - } + } if (opts.evmVersion) { if (opts.evmVersion.toLowerCase() == 'default') { opts.evmVersion = null diff --git a/libs/remix-solidity/src/compiler/compiler.ts b/libs/remix-solidity/src/compiler/compiler.ts index fd5f5be51e..5bfab4b882 100644 --- a/libs/remix-solidity/src/compiler/compiler.ts +++ b/libs/remix-solidity/src/compiler/compiler.ts @@ -82,7 +82,7 @@ export class Compiler { */ internalCompile(files: Source, missingInputs?: string[], timeStamp?: number): void { - if(timeStamp < this.state.compilationStartTime && this.state.compilerRetriggerMode == CompilerRetriggerMode.retrigger ) { + if (timeStamp < this.state.compilationStartTime && this.state.compilerRetriggerMode == CompilerRetriggerMode.retrigger ) { return } this.gatherImports(files, missingInputs, (error, input) => { diff --git a/libs/remix-solidity/src/compiler/helper.ts b/libs/remix-solidity/src/compiler/helper.ts index f4eb8e3f21..8a74603044 100644 --- a/libs/remix-solidity/src/compiler/helper.ts +++ b/libs/remix-solidity/src/compiler/helper.ts @@ -36,7 +36,7 @@ export default { } } }, - + // ^ e.g: // browser/gm.sol: Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.6.12 // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0/contracts/introspection/IERC1820Registry.sol:3:1: ParserError: Source file requires different compiler version (current compiler is 0.7.4+commit.3f05b770.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version diff --git a/libs/remix-solidity/src/compiler/types.ts b/libs/remix-solidity/src/compiler/types.ts index 8754b8c63d..79718c071a 100644 --- a/libs/remix-solidity/src/compiler/types.ts +++ b/libs/remix-solidity/src/compiler/types.ts @@ -161,7 +161,7 @@ export enum CompilerRetriggerMode { } export interface CompilerState { - compileJSON: ((input: SourceWithTarget, timeStamp?: number) => void) | null, + compileJSON: ((input: SourceWithTarget, timeStamp?: number) => void) | null, worker: any, currentVersion: string| null| undefined, compilerLicense: string| null diff --git a/libs/remix-solidity/tests/compiler-input.spec.ts b/libs/remix-solidity/tests/compiler-input.spec.ts index 3dc247624b..b80b040d3f 100644 --- a/libs/remix-solidity/tests/compiler-input.spec.ts +++ b/libs/remix-solidity/tests/compiler-input.spec.ts @@ -20,6 +20,6 @@ describe('compiler-input', () => { expect(getValidLanguage(undefined)).toBe(null) expect(getValidLanguage('')).toBe(null) expect(getValidLanguage('A')).toBe(null) - expect(getValidLanguage('Something')).toBe(null) + expect(getValidLanguage('Something')).toBe(null) }) })