Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Use eslint for JS linting #2

Closed
eheikes opened this issue Jan 6, 2016 · 0 comments · Fixed by #12
Closed

Use eslint for JS linting #2

eheikes opened this issue Jan 6, 2016 · 0 comments · Fixed by #12
Assignees

Comments

@eheikes
Copy link
Member

eheikes commented Jan 6, 2016

eslint does the same thing that jshint & jscs do, but is more extensible -- it supports ES6, JSX, has a Babel plugin, and has an Angular plugin -- and seems to be gaining popularity.

The main downside is it doesn't support auto-fixing (something JSCS supports, and can be done for jshint rules with https://github.com/jonschlinkert/grunt-fixmyjs), though it does look like that is on the 2.0 roadmap.

@eheikes eheikes self-assigned this Nov 8, 2016
eheikes added a commit that referenced this issue Nov 10, 2016
Removed JSCS and JSHint linters, since those are both
covered by ESLint.

fixes #2

The API methods now allow for an array of filenames/patterns.

Some small rule additions:
* block-spacing: must have spaces inside a block's curly braces
* no-console: no console logging
* no-empty: empty blocks not allowed, except in catch(), or if
  there is a comment
* no-mixed-operators: forbid mixing of logical operators
  without parens
* no-unused-vars: declared vars must be used
* no-useless-concat: no concatting of string literals
* quote-props: don't quote properties unless necessary
* spaced-comment: always put a space after /* or //
* some more stylistic rules (mainly related to ES6+ syntax)

Removed valid-jsdoc rule for now, since we're not even close
to being consistent with JSDoc comments.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant