ESLint v8.40.0 released

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

Highlights

  • Rules can now use properties context.sourceCode, context.cwd, context.filename, and context.physicalFilename instead of methods context.getSourceCode(), context.getCwd(), context.getFilename(), and context.getPhysicalFilename() respectively. The methods are now considered deprecated.
  • The FlatESLint class has a new method findConfigFile(). It returns the path to the config file being used by the instance or undefined if no config file is being used.
  • The semi rule has a new option omitLastInOneLineClassBody.

Features

  • 5db7808 feat: improve flat config errors for invalid rule options and severities (#17140) (Josh Goldberg ✨)
  • f5574dc feat: Add findConfigFile() method to FlatESLint (#17142) (Nicholas C. Zakas)
  • e52b98b feat: add sourceCode property to the rule context (#17107) (Nitin Kumar)
  • 1468f5b feat: add physicalFilename property to the rule context (#17111) (Nitin Kumar)
  • 0df4d4f feat: add cwd to rule context (#17106) (Nitin Kumar)
  • 52018f2 feat: add filename property to the rule context (#17108) (Nitin Kumar)
  • 559ff4e feat: add new omitLastInOneLineClassBody option to the semi rule (#17105) (Nitin Kumar)

Bug Fixes

  • f076e54 fix: Ensure FlatESLint#findConfigFile() doesn’t throw. (#17151) (Nicholas C. Zakas)

Documentation

  • e980bf3 docs: Update README (GitHub Actions Bot)
  • e92a6fc docs: Update README (GitHub Actions Bot)
  • af5fe64 docs: Fix custom rule schema docs (#17115) (Adam Jones)
  • 4a352a9 docs: explain how to include predefined globals (#17114) (Marcus Wyatt)
  • 5ea15d9 docs: add mastodon link in readme (#17110) (唯然)

Chores

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

Retiring the contributor pool
3 min read

Retiring the contributor pool

After five years and more than $51,000 paid to contributors, we're retiring the contributor pool as AI-generated pull requests make it harder to keep the program focused on human contributions.

ESLint v10.15.0 released
2 min read

ESLint v10.15.0 released

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