ESLint v8.x end-of-life is 2024-10-05 and will not be maintained after that. Upgrade or consider long-term support options

ESLint 0.7.1 released

We just pushed ESLint 0.7.1, which is the minor release upgrade from 0.6.2. Unfortunately, due to an error in the publishing process of 0.6.2, 0.6.2 was initially pushed to npm as 0.7.0. We unpublished 0.7.0 and republished as 0.6.2.

Due to npm’s security restrictions, we aren’t allowed to push a new 0.7.0 to the npm registry, which is why this version is 0.7.1.

Highlights

This is a summary of the major changes you need to know about for this version of ESLint.

.eslintignore Change

As we announced previously, the JSON format for .eslintignore files has been removed. Make sure to update your .eslintignore files appropriately.

Configuration Changes

0.7.1 formalizes how configuration works when there are multiple .eslintrc files. We have implemented configuration cascading, meaning that a .eslintrc file automatically inherits the settings from the .eslintrc file in its ancestor directories. This is how configuration was always envisioned to work in ESLint, but there were several bugs in the functionality. Because these bugs have been fixed, you may notice some different behavior with your current configuration settings. For more information on the configuration hierarchy, see the Configuration documentation.

no-yoda is now yoda

In an effort to embrace different coding preferences, we’ve changed the no-yoda rule (which disallowed yoda conditions) to [yoda](https://eslint.org/docs/rules/yoda). This allows you to either enforce or disallow yoda conditions.

CLI changes

The CLI has gone through an update, now allowing you to pass --color and --no-color to turn on or off color in the output. You can also use -o to specify a file to output the results into rather than outputting to the console.

Breaking Changes

  • Breaking: Implement configuration hierarchy (fixes #963) (Nicholas C. Zakas)
  • Breaking: CLIEngine abstraction for CLI operations; formatters no longer are passed configs (fixes #935) (Nicholas C. Zakas)
  • Breaking: Change ‘no-yoda’ rule to ‘yoda’ and add “always” option (Fixes #959) (jrajav)
  • Breaking: Refactor .eslintignore functionality (refs #928, fixes #901, fixes #837, fixes #853) (Nicholas C. Zakas)
  • Breaking: Remove JSON support for .eslintignore (fixes #883) (icebox)

Features

Bug Fixes

  • Fix: Check output file isn’t dir, fix tests (Fixes #1034) (jrajav)
  • Fix: Ignore unused params for args: ‘none’ (Fixes #1026) (jrajav)
  • Fix: Point eqeqeq error at operator (Fixes #1029) (jrajav)
  • Fix: Allow stdout to drain before exiting (fixes #317) (Nicholas C. Zakas)
  • Fix: rewrite eol-last rule (fixes #1007) (fixes #1008) (Michael Ficarra)
  • Fix: add additional IIFE exception in no-extra-parens (fixes #1004) (Michael Ficarra)
  • Fix: Put rule severity in messages (Fixes #984); deprecates passing full config to Formatters (jrajav)
  • Fix: no-unused-vars to check only file globals (fixes #975) (Aliaksei Shytkin)
  • Fix: Fixes no-unused-vars to check /globals/ (Fixes #955) (jrajav)
  • Fix: valid-jsdoc no more warning for multi-level params (Fixes #925) (Delapouite)
  • Fix: Correct order of arguments passed to assert.equal (fixes #945) (Michał Gołębiowski)
  • Fix: Corrects configs merging into base config (Fixes #838) (jrajav)
  • Fix: Adding check if char is non-alphabetic to new-cap (Fixes #940) (jrajav)

Enhancements

  • Update: Factor ignores out of Config (fixes #958) (jrajav)
  • Update: greatly simplify eqeqeq’s operator finding logic (fixes #1037) (Michael Ficarra)
  • Update: no-eval to also warn on setTimeout and setInterval (fixes #721) (Nicholas C. Zakas)
  • Update: Rule new-cap checks capitalized functions (fixes #904) (Aliaksei Shytkin)
  • Update: Search parent directories for .eslintignore (Fixes #933) (jrajav)
  • Update: space-in-brackets now always allows empty object and array literals to have no spaces (fixes #797) (Nicholas C. Zakas)
  • Update: Write the summary in stylish formatter in yellow if no errors (fixes #906); test coloring of messages (Michał Gołębiowski)

Documentation

  • Docs: Add ‘/’, forgotten in first commit (Fixes #931) (jrajav)
  • Docs: Add Related Rules sections (Fixes #990) (jrajav)
  • Docs: guard-for-in - added missing id in title (Fixes #969) (Delapouite)
  • Docs: Mention allowed semicolons in “never” mode for ‘semi’ rule (fixes #931) (jrajav)
  • Docs: Mention Yeoman generator in dev setup (fixes #914) (Nicholas C. Zakas)
  • Docs: Removed reference to brace-style Stroustrup default (fixes #1000) (Caleb Troughton)
  • Docs: Update about page description (fixes #936) (Nicholas C. Zakas)
  • Docs: Updated contributor guide and dev env setup guide (Nicholas C. Zakas)
  • Docs: Updated documentation for several rules (Nicholas C. Zakas)
  • Breaking: Change ‘no-yoda’ rule to ‘yoda’ and add “always” option (Fixes #959) (jrajav)
  • Breaking: CLIEngine abstraction for CLI operations; formatters no longer are passed configs (fixes #935) (Nicholas C. Zakas)
  • Breaking: Implement configuration hierarchy (fixes #963) (Nicholas C. Zakas)
  • Breaking: Refactor .eslintignore functionality (refs #928, fixes #901, fixes #837, fixes #853) (Nicholas C. Zakas)
  • Breaking: Remove JSON support for .eslintignore (fixes #883) (icebox)
  • Build + Docs: Adding generated resource links to rule docs (Fixes #1021) (jrajav)
  • Build: Makefile - Check for rule ids in docs titles (Fixes #969) (Delapouite)
  • Build: Remove flaky perf test from Travis (Nicholas C. Zakas)

The latest ESLint news, case studies, tutorials, and resources.

ESLint v9.8.0 released
1 min read

ESLint v9.8.0 released

We just pushed ESLint v9.8.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.

ESLint v9.7.0 released
1 min read

ESLint v9.7.0 released

We just pushed ESLint v9.7.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.

What's coming next for ESLint
5 min read

What's coming next for ESLint

The new configuration system is just the beginning of significant changes coming to ESLint.