ESLint is a must-have tool for every JavaScript developer, especially code testers.
This utility lets them analyze a JavaScript file for common syntax-related problems, getting a simple report at the end about encountered problems.
ESLint checks JavaScript code against a set of customizable rules, rules which developers can activate or turn off based on their (company's) internal coding style guides.
A set of built-in rules are provided with the standard package, but ESLint's main feature is its powerful Rules API which will let anyone build their own set of rules if they don't find what they're looking for in the original ESLint distribution.
By default ESLint uses standard ECMAScript 5 syntax, but since version 0.12 basic ECMAScript 6 features have been slowly added to the core.
ESLint was inspired and modeled after similar JavaScript linting tools like:
- JSLint
- JSHint
Compared to the aforementioned tools, ESLint is slower because it creates AST trees for the parsed code instead of parsing and analyzing it as it goes. This slows it down, but provides better linting results.
Because of these better results, projects like Drupal, Esprima, or the WebKit engine itself use it over other tools.
What is new in this release:
- Fixed:
- loc obj in report fn expects column.
- Forced no-shadow to check all scopes.
- --init indent setting.
- Mention bundling multiple shareable configs.
- Not to override the required extended config object directly.
- Update markdownlint dependency.
- dot-location should use correct dot token.
- Stop linebreak-style from crashing.
- Rule no-duplicate-case problem with CallExpressions.
- Enable full support for eslint-env comments.
- Speed up site generation.
- Fixing trailing spaces.
What is new in version 0.24.1:
- Fixed:
- loc obj in report fn expects column.
- Forced no-shadow to check all scopes.
- --init indent setting.
- Mention bundling multiple shareable configs.
- Not to override the required extended config object directly.
- Update markdownlint dependency.
- dot-location should use correct dot token.
- Stop linebreak-style from crashing.
- Rule no-duplicate-case problem with CallExpressions.
- Enable full support for eslint-env comments.
- Speed up site generation.
- Fixing trailing spaces.
What is new in version 0.22.1:
- Fixed:
- loc obj in report fn expects column.
- Forced no-shadow to check all scopes.
- --init indent setting.
- Mention bundling multiple shareable configs.
- Not to override the required extended config object directly.
- Update markdownlint dependency.
- dot-location should use correct dot token.
- Stop linebreak-style from crashing.
- Rule no-duplicate-case problem with CallExpressions.
- Enable full support for eslint-env comments.
- Speed up site generation.
- Fixing trailing spaces.
What is new in version 0.21.0:
- Fixed:
- Destructured arguments should work in block-scoped-var
- Line breaking with just carriage return
- Location of new-cap error messages
- Check spacing of class methods
- Module import specifiers should be defined
- Ignore super in no-undef
- Upgrade:
- Espree to v0.12.0
- Breaking:
- Stop checking JSX variable use, expose API instead
- New:
- No-duplicate-case rule to disallow a duplicate case label
- Clarify issue requirement for doc pull requests
- Add quotes around object key
What is new in version 0.18.0:
- Fixed:
- Destructured arguments should work in block-scoped-var
- Line breaking with just carriage return
- Location of new-cap error messages
- Check spacing of class methods
- Module import specifiers should be defined
- Ignore super in no-undef
- Upgrade:
- Espree to v0.12.0
- Breaking:
- Stop checking JSX variable use, expose API instead
- New:
- No-duplicate-case rule to disallow a duplicate case label
- Clarify issue requirement for doc pull requests
- Add quotes around object key
What is new in version 0.14.1:
- Fixed:
- Exit code should be 1 for any number of errors.
- Check indentation of first line.
- Strict rules shouldn't throw on arrow functions.
Requirements:
- Node.js 0.10 or higher
Comments not found