ESLint v2.12.0 released
We just pushed ESLint v2.12.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.
This is a summary of the major changes you need to know about for this version of ESLint.
We are continuing to work on compatibility with JSCS, and in this release we added two new rules that correspond to JSCS rules:
max-lines- equivalent of maximumNumberOfLines
object-curly-newline- equivalent of requirePaddingNewLinesInObjects and disallowPaddingNewLinesInObjects
We've had numerous requests to provide a configuration that turns on all rules ESLint provides. You can now set
extends in your configuration file equal to
"eslint:all" to get every core rule enabled with their default settings.
Important: This configuration is not recommended for production use because it changes with every minor and major version of ESLint. Use at your own risk.
You can read more in the documentation.
You might have seen this case study of debugging a performance issue in ESLint at Google I/O. A pull request was filed during the talk that showed some significant performance improvement. There were some details of the pull request that weren't quite correct and caused some regressions, however, we were able to adopt the basic approach to realize some of the performance improvements.
In #6276, we enabled this improvement for anyone who is either not using
.eslintignore or is using
.eslintignore without specifying a re-inclusion pattern (beginning with
!). This showed a significant performance improvement when run on the ESLint repo itself and we expect developers with large projects (especially those with a
node_modules directory) to see savings of whole seconds when linting everything (such as using
eslint .). If you already manually pass in filenames on the command line, you won't see any improvement because the gains are on directory traversal.
Formalized Semantic Versioning Policy
One of the things that JSCS did well was formally defining their semantic versioning policy. In the world of linters, it's not always clear whether something should be a patch or a minor version bump. For instance, what if a rule has a bug where it's not finding problems that it should? While we could classify that as a bug, fixing the bug could cause ESLint users' lint builds to break, which is unexpected in a patch version.
The JSCS team had a really well-reasoned semantic versioning policy to give their users a clear picture of when to expect lint build breakage. We decided to adopt a policy based on the JSCS one and have posted it on our README. The end result is that we are taking breaking your lint builds very seriously and want to be clear when such breakages can occur and why.
All New Rules
The complete list of new rules in this release:
- 2520f5a New:
max-linesrule (fixes #6078) (#6321) (alberto)
- 0e14016 New:
no-mixed-operatorsrule (fixes #6023) (#6241) (Toru Nagashima)
- f804397 New: Add
eslint:alloption (fixes #6240) (#6248) (Robert Fletcher)
- 2663569 New:
object-curly-newline(fixes #6072) (#6223) (Toru Nagashima)
- 1313804 New: rest-spread-spacing rule (fixes #5391) (#6278) (Kai Cataldo)
- 54c30fb Update: Add explicit default option
eqeqeq(refs #6144) (#6342) (alberto)
- 2d63370 Update: max-len will warn indented comment lines (fixes #6322) (#6324) (Kai Cataldo)
- 9bfbc64 Update: Option for object literals in
arrow-body-style(fixes #5936) (#6216) (alberto)
- 6e03c4b Update: Add never option to arrow-body-style (fixes #6317) (#6318) (Andrew Hyndman)
- 72c2ea5 Update: callback-return allows for object methods (fixes #4711) (#6277) (Kai Cataldo)
- fca0679 Update: Improve perf not traversing default ignored dirs (fixes #5679) (#6276) (alberto)
- 316a507 Fix: one-var allows uninitialized vars in ForIn/ForOf (fixes #5744) (#6272) (Kai Cataldo)
- 61dfe68 Fix:
no-useless-renamefalse positive in babel-eslint (fixes #6266) (#6290) (alberto)
- bb69380 Fix: no-useless-rename handles ExperimentalRestProperty (fixes #6284) (#6288) (Kevin Partington)
- dcd4ad7 Docs: clarify usage of inline disable comments (fixes #6335) (#6347) (Kai Cataldo)
- c03300b Docs: Clarified how plugin rules look in plugin configs (fixes #6346) (#6351) (Kevin Partington)
- 9c87709 Docs: Add semantic versioning policy (fixes #6244) (#6343) (Nicholas C. Zakas)
- 5affab1 Docs: Describe values under Extending Configuration Files (refs #6240) (#6336) (Mark Pedrotti)
- 477fbc1 Docs: Add section about customizing RuleTester (fixes #6227) (#6331) (Jeroen Engels)
- dfe05bf Docs: Link JSCS rules to their corresponding page. (#6334) (alberto)
- 1cc4356 Docs: Remove reference to numeric config (fixes #6309) (#6327) (Kevin Partington)
- 2d4efbe Docs: Describe options in rule under Strict Mode (#6312) (Mark Pedrotti)
- c1953fa Docs: Typo fix 'and' -> 'any' (#6326) (Stephen Edgar)
- d49ab4b Docs: Code conventions improvements (#6313) (Kevin Partington)
- 6cbee31 Docs: Typo fix 'colum' -> 'column' (#6306) (Andrew Cobby)
- 89580a4 Docs: Distinguish examples in rules under Stylistic Issues part 5 (#6291) (Kenneth Williams)
- 38dccdd Docs:
--no-ignoredisables all forms of ignore (fixes #6260) (#6304) (alberto)
- 320e8b0 Docs: Describe options in rules under Possible Errors part 4 (#6270) (Mark Pedrotti)
- 3e052c1 Docs: Mark no-useless-rename as fixable in rules index (#6297) (Dalton Santos)