Uh oh!
There was an error while loading. Please reload this page.
Add ESLint no-unused-vars rule - #1497
Conversation
maclover7
commented
Jul 8, 2018
maclover7
commented
Jul 10, 2018
gibfahn
commented
Jul 23, 2018
I'd rather we add |
| }, | ||
| "scripts": { | ||
| "test": "tape test/test-*" | ||
| "lint": "node_modules/eslint/bin/eslint.js --no-eslintrc --rule no-unused-vars:error bin lib test", |
There was a problem hiding this comment.
Can you not just do:
- "lint": "node_modules/eslint/bin/eslint.js --no-eslintrc --rule no-unused-vars:error bin lib test", + "lint": "eslint --no-eslintrc --rule no-unused-vars:error bin lib test", Also is there a reason to add the lint rules here instead of just adding a .eslintrc.yaml? I assume we're going to add more rules in the future...
There was a problem hiding this comment.
Had listed just the one rule for now, since didn't want to introduce tons of style changes all at once (and different parts of the codebase follow different standards...)
There was a problem hiding this comment.
Oh yeah, I didn't mean that you should add a full set of rules, just that adding a second rule will be a lot easier if it's just adding a line to a yaml file.
I think using .eslintrc.yaml is the convention in everything but nodejs/node (and that's a recent change).
maclover7
commented
Jul 29, 2018
@gibfahn Added |
joaocgreis
commented
Jul 31, 2018
@maclover7 fixed the job error - Test run: https://ci.nodejs.org/job/nodegyp-test-commit/391/nodes=win2016-vs2017/console About the new error, can you use just |
maclover7
commented
Jul 31, 2018
CI (https://ci.nodejs.org/job/nodegyp-test-pull-request/77/) is passing now besides for Node.js v4.x, but support for that release line is being removed soon from the master branch. PTAL @gibfahn@joaocgreis |
joaocgreis
commented
Aug 1, 2018
Windows fix LGTM. The rest of the diff looks reasonable at a glance but I didn't test. |
gibfahn
commented
Aug 1, 2018
@maclover7 just to confirm, all the fixes come from eslint warnings right? |
maclover7
commented
Aug 1, 2018
@gibfahn Yep, they came from when I ran |
- Uses `.eslintrc.yaml` for configuration - `npm run lint` is part of `npm test`
maclover7
commented
Aug 1, 2018
Final CI before landing: https://ci.nodejs.org/job/nodegyp-test-pull-request/81/ |
maclover7
commented
Aug 2, 2018
Landed in b2e5cf0 |
- Uses `.eslintrc.yaml` for configuration - `npm run lint` is part of `npm test` PR-URL: #1497 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
Checklist
npm install && npm testpassesDescription of change
Adds the
no-unused-varsESLint rule. Can addnpm run linttonodegyp-test-commitif people would like that.