Skip to content

Commit 969ce6a

Browse files
committed
build(lint): update eslint rules to automatically fix es5 code #54
1 parent ad45e44 commit 969ce6a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.eslintrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
"no-console": [
3535
"error"
3636
],
37+
"no-var": [
38+
"error"
39+
],
40+
"prefer-const": ["error", {
41+
"destructuring": "any",
42+
"ignoreReadBeforeAssign": false
43+
}],
3744
"no-unused-vars": [
3845
"error",
3946
{

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
"pretest": "./node_modules/.bin/eslint lib test index.js",
3939
"test": "NODE_ENV=test ./node_modules/.bin/mocha 'test/**/*_test.js'",
4040
"test-debug": "NODE_ENV=test ./node_modules/.bin/mocha --inspect --debug-brk 'test/**/*_test.js'",
41-
"test:coverage": "NODE_ENV=test nyc --reporter=html --reporter=text ./node_modules/.bin/mocha 'test/**/*_test.js'"
41+
"test:coverage": "NODE_ENV=test nyc --reporter=html --reporter=text ./node_modules/.bin/mocha 'test/**/*_test.js'",
42+
"lint": "npx eslint .",
43+
"lint:fix": "npx eslint . --fix"
4244
},
4345
"repository": {
4446
"type": "git",

0 commit comments

Comments
 (0)