Switch from JSHint to ESLint #2550
Comments
+1 |
@zaach @shane-tomlinson any thoughts against this? |
👍 |
+1 for this. |
Obviously also requires tweaking all the inline Also, figure out why we're currently using grunt-contrib-jshint AND jshint in the dev dependencies... (and then remove them both, along w/ jshint-stylish):
|
Ref: #2537 (comment) |
I dig this plan. Can we run them in parallel for a bit until we have eslint set up just so, and then rip out jshint as a 2nd step? |
That's a good idea! |
Actually, I had a rough version of an .eslintrc file already for anybody that wants a starting point: .eslintrcenv:
browser: true
jasmine: true
jquery: true
mocha: true
node: true
globals:
FxaHead: true
Promise: true
translator: true
rules:
camelcase: 0
comma-dangle: 0
complexity: [2, 6]
curly: [2, all]
dot-notation: 0
eqeqeq: [2, allow-null]
global-strict: [0, never]
handle-callback-err: 0
key-spacing: 0
new-cap: 0
no-comma-dangle: 0
no-cond-assign: [2, except-parens]
no-debugger: 2
no-empty: 0
no-eval: 2
no-irregular-whitespace: 0
no-multi-spaces: 0
no-new: 2
no-script-url: 2
no-shadow: 0
no-spaced-func: 0
no-undef: 2
no-unused-vars: [1, {vars: all, args: none}]
no-use-before-define: true
no-with: 2
quotes: [2, single]
semi: [2, always]
space-unary-ops: 0
strict: 2
valid-typeof: 1
wrap-iife: 0
yoda: 0 .eslintignore
output:
|
We can "fix" the env:
es6: true
... Unfortunately, it doesn't look like we can set that inline for just the specific files that use /*eslint-env es6 */
// ^^^ This doesn't currently work. :( |
Ah, I also converted our .jshintrc to the .eslintrc file above using https://github.com/valorkin/eslint-rules-mapper and then a bit of manual tweaking to make it more YAML-ey and silence some other errors/warnings for the time being. |
Talking w/ @TDA, it seems like we have two options for Grunt+ESLint modules: I strongly vote for grunt-eslint here since grunt-contrib-eslint doesn't seem to be Grunt official module (just poorly named), and the grunt-eslint is maintained by Sindre (who is awesome). |
Fixes mozilla#2550 Switch from JSHint to ESLint Also have JSHint in parallel References mozilla#2558, run into same problem
Fixes mozilla#2550 Switch from JSHint to ESLint Also have JSHint in parallel
Fixes mozilla#2550 Switch from JSHint to ESLint Also have JSHint in parallel
Fixes mozilla#2550 Switch from JSHint to ESLint Also have JSHint in parallel
Fixes mozilla#2550 Switch from JSHint to ESLint Also have JSHint in parallel
Fixes mozilla#2550 Switch from JSHint to ESLint Also have JSHint in parallel
Fixes mozilla#2550 Switch from JSHint to ESLint Also have JSHint in parallel
Fixes mozilla#2550 Switch from JSHint to ESLint Also have JSHint in parallel
Fixes mozilla#2550 Switch from JSHint to ESLint Also have JSHint in parallel Remove old dependencies reported by amdcheck Remove unused variables reported by ESLint
Fixes mozilla#2550 Switch from JSHint to ESLint Add rules to ESLint Also have JSHint in parallel Remove old dependencies reported by amdcheck Remove unused variables reported by ESLint
Fixes mozilla#2550 Switch from JSHint to ESLint Add rules to ESLint Also have JSHint in parallel Remove old dependencies reported by amdcheck Remove unused variables reported by ESLint
Fixes mozilla#2550 Switch from JSHint to ESLint Add rules to ESLint Also have JSHint in parallel Remove old dependencies reported by amdcheck Remove unused variables reported by ESLint
Fixes mozilla#2550 Switch from JSHint to ESLint Add rules to ESLint Also have JSHint in parallel Remove old dependencies reported by amdcheck Remove unused variables reported by ESLint
Fixes mozilla#2550 Switch from JSHint to ESLint Add rules to ESLint Also have JSHint in parallel Remove old dependencies reported by amdcheck Remove unused variables reported by ESLint
Fixes mozilla#2550 Switch from JSHint to ESLint Add rules to ESLint Also have JSHint in parallel Remove old dependencies reported by amdcheck Remove unused variables reported by ESLint
Fixes mozilla#2550 Switch from JSHint to ESLint Add rules to ESLint Also have JSHint in parallel Remove old dependencies reported by amdcheck Remove unused variables reported by ESLint
Fixes mozilla#2550 Switch from JSHint to ESLint Add rules to ESLint Also have JSHint in parallel Remove old dependencies reported by amdcheck Remove unused variables reported by ESLint
Thank you @TDA! |
Couldn't have done it without your help guys :) @pdehaan @vladikoff @zaach |
JSHint isn't super-active anymore and we increasingly need to use it with a mix of JSCS rules to get the formatting and linting that we like.
Should we just switch out to ESLint since it is technically superior?
Ref: #1318
The text was updated successfully, but these errors were encountered: