Skip to content

Commit

Permalink
Installed ESLint with recommended config for node
Browse files Browse the repository at this point in the history
Installed ESLint and then used init to set it up. I had it use the
recommended settings, environment for node.
Fixes: nodejs#310
  • Loading branch information
Glassig committed Oct 11, 2019
1 parent ec01604 commit 130dc6d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
"env": {
"node": true,
"commonjs": true,
"es6": true
},
"extends": ["eslint:recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
}
};
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"codecov-upload-js": "codecov --disable=gcov --file=coverage-js.lcov",
"codecov-upload": "npm run codecov-upload-cc && npm run codecov-upload-js",
"linter": "node scripts/linter.js",
"format": "npx clang-format -i src/*"
"format": "npx clang-format -i src/*",
"lint-test": "(npx eslint test{,/**}/*.js && echo 'No problems found') || echo 'Lint failed for some files'"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -54,9 +55,10 @@
},
"homepage": "https://github.com/nodejs/llnode#readme",
"devDependencies": {
"clang-format": "1.2.4",
"codecov": "^3.1.0",
"eslint": "^6.5.1",
"nyc": "^13.1.0",
"clang-format": "1.2.4",
"tape": "^4.4.0"
},
"nyc": {
Expand All @@ -73,4 +75,4 @@
"bindings": "^1.3.0",
"node-addon-api": "^1.1.0"
}
}
}

0 comments on commit 130dc6d

Please sign in to comment.