Skip to content

Commit bc6f774

Browse files
Stephen Lineker-MillerStephen Lineker-Miller
authored andcommitted
Upgrade linting from semistandard to eslint with standard support
Migrating to eslint allows using the mainstream highly maintained linting tool that will directly support linting, code style enforcement and support of locating errors. * Directly supports integrating with Typescript for future proofing * Supports enabling semi colon enforcement via rules
1 parent f239ac6 commit bc6f774

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true
6+
},
7+
extends: [
8+
'standard'
9+
],
10+
parserOptions: {
11+
ecmaVersion: 12,
12+
sourceType: 'module'
13+
},
14+
rules: {
15+
semi: ['error', 'always']
16+
},
17+
ignorePatterns: ['dist', 'soljson.js']
18+
};

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"solcjs": "solcjs"
88
},
99
"scripts": {
10-
"lint": "node ./node_modules/semistandard/bin/cmd.js",
10+
"lint": "eslint .",
11+
"lint:fix": "eslint --fix .",
1112
"updateBinary": "node downloadCurrentVersion.js && node verifyVersion.js",
1213
"prepublishOnly": "npm run updateBinary",
1314
"pretest": "npm run lint",
@@ -56,16 +57,15 @@
5657
},
5758
"devDependencies": {
5859
"coveralls": "^3.0.0",
60+
"eslint": "^7.32.0",
61+
"eslint-config-standard": "^16.0.3",
62+
"eslint-plugin-import": "^2.25.3",
63+
"eslint-plugin-node": "^11.1.0",
64+
"eslint-plugin-promise": "^5.1.1",
5965
"nyc": "^14.1.0",
60-
"semistandard": "^12.0.0",
6166
"tape": "^4.11.0",
6267
"tape-spawn": "^1.4.2"
6368
},
64-
"semistandard": {
65-
"ignore": [
66-
"soljson.js"
67-
]
68-
},
6969
"nyc": {
7070
"exclude": [
7171
"soljson.js"

0 commit comments

Comments
 (0)