
Highlights
- Rules can now use SourceCode#getScope(node)to get the scope of the given node. Thenodeargument is mandatory. This method works the same ascontext.getScope()but isn’t limited to the currently traversed node. Thecontext.getScope()method is now considered deprecated in favor ofSourceCode#getScope(node). This change is part of the implementation of language plugins.
- Parsers and plugins can now export a metaobject withnameandversionproperties to allow for easier debugging and more effective caching. In the new config system, ESLint uses these values when serializing configuration objects (for example, the –print-config CLI option) and when determining whether cached lint results (the--cacheCLI option) are still valid. If a parser/plugin providesmeta, ESLint can now invalidate caches when a new version of the parser/plugin is installed.
- In the new config system, languageOptions.parsermust now be a parser object. Referencing parsers by"pluginName/parserName"is no longer supported.
- The require-unicode-regexp rule now provides suggestions for some of the problems it reports.
Features
- b6ab8b2feat:- require-unicode-regexpadd suggestions (#17007) (Josh Goldberg)
- 10022b1feat: Copy getScope() to SourceCode (#17004) (Nicholas C. Zakas)
- 1665c02feat: Use plugin metadata for flat config serialization (#16992) (Nicholas C. Zakas)
- b3634f6feat: docs license (#17010) (Samuel Roldan)
- 892e6e5feat: languageOptions.parser must be an object. (#16985) (Nicholas C. Zakas)
Bug Fixes
- 619f3fdfix: correctly handle- nulldefault config in- RuleTester(#17023) (Brad Zacher)
- 1fbf118fix:- getFirstToken/- getLastTokenon comment-only node (#16889) (Francesco Trotta)
- 129e252fix: Fix typo in- logical-assignment-operatorsrule description (#17000) (Francesco Trotta)
Documentation
- 75339dfdocs: fix typos and missing info in id-match docs (#17029) (Ed Lucas)
- ec2d830docs: Fix typos in the- semirule docs (#17012) (Andrii Lundiak)
- e39f28ddocs: add back to top button (#16979) (Tanuj Kanti)
- 721c717docs: Custom Processors cleanup and expansion (#16838) (Ben Perlmutter)
- d049f97docs: ‘How ESLint is Maintained’ page (#16961) (Ben Perlmutter)
- 5251a92docs: Describe guard options for guard-for-in (#16986) (alope107)
- 6157d81docs: Add example to guard-for-in docs. (#16983) (alope107)
- fd47998docs: update- Array.prototype.toSortedspecification link (#16982) (Milos Djermanovic)
- 3e1cf6bdocs: Copy edits on Maintain ESLint docs (#16939) (Ben Perlmutter)
Chores
- c67f299chore: upgrade @eslint/js@8.37.0 (#17033) (Milos Djermanovic)
- ee9ddbdchore: package.json update for @eslint/js release (ESLint Jenkins)
- dddb475chore: upgrade @eslint/eslintrc@2.0.2 (#17032) (Milos Djermanovic)
- 522431echore: upgrade espree@9.5.1 (#17031) (Milos Djermanovic)
- f5f9a88chore: upgrade eslint-visitor-keys@3.4.0 (#17030) (Milos Djermanovic)
- 4dd8d52ci: bump actions/stale from 7 to 8 (#17026) (dependabot[bot])
- ad9dd6achore: remove duplicate scss, (#17005) (Strek)
- ada6a3eci: unpin Node 19 (#16993) (Milos Djermanovic)
- c3da975chore: Remove triage label from template (#16990) (Nicholas C. Zakas)
- 69bc0e2ci: pin Node 19 to 19.7.0 (#16987) (Milos Djermanovic)
