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

  • 4053004 chore: upgrade @eslint/js@8.40.0 (#17156) (Milos Djermanovic)
  • 50fed1d chore: package.json update for @eslint/js release (ESLint Jenkins)
  • 4c7a170 chore: upgrade @eslint/eslintrc@2.0.3 (#17155) (Milos Djermanovic)
  • e80b7cc chore: upgrade espree@9.5.2 (#17154) (Milos Djermanovic)
  • ce3ac91 chore: upgrade eslint-visitor-keys@3.4.1 (#17153) (Milos Djermanovic)
  • 9094d79 chore: add latest/ to meta.docs.url in all core rules (#17136) (Milos Djermanovic)
  • d85efad perf: don’t use grapheme-splitter on ASCII strings in key-spacing rule (#17122) (Milos Djermanovic)

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

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.

ESLint v9.6.0 released
2 min read

ESLint v9.6.0 released

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