Published under: Announcements
5 min read
Highlights
- Rules can now use
SourceCode#getScope(node)
to get the scope of the given node. Thenode
argument 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
meta
object withname
andversion
properties 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--cache
CLI 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.parser
must 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
b6ab8b2
feat:require-unicode-regexp
add suggestions (#17007) (Josh Goldberg)10022b1
feat: Copy getScope() to SourceCode (#17004) (Nicholas C. Zakas)1665c02
feat: Use plugin metadata for flat config serialization (#16992) (Nicholas C. Zakas)b3634f6
feat: docs license (#17010) (Samuel Roldan)892e6e5
feat: languageOptions.parser must be an object. (#16985) (Nicholas C. Zakas)
Bug Fixes
619f3fd
fix: correctly handlenull
default config inRuleTester
(#17023) (Brad Zacher)1fbf118
fix:getFirstToken
/getLastToken
on comment-only node (#16889) (Francesco Trotta)129e252
fix: Fix typo inlogical-assignment-operators
rule description (#17000) (Francesco Trotta)
Documentation
75339df
docs: fix typos and missing info in id-match docs (#17029) (Ed Lucas)ec2d830
docs: Fix typos in thesemi
rule docs (#17012) (Andrii Lundiak)e39f28d
docs: add back to top button (#16979) (Tanuj Kanti)721c717
docs: Custom Processors cleanup and expansion (#16838) (Ben Perlmutter)d049f97
docs: ‘How ESLint is Maintained’ page (#16961) (Ben Perlmutter)5251a92
docs: Describe guard options for guard-for-in (#16986) (alope107)6157d81
docs: Add example to guard-for-in docs. (#16983) (alope107)fd47998
docs: updateArray.prototype.toSorted
specification link (#16982) (Milos Djermanovic)3e1cf6b
docs: Copy edits on Maintain ESLint docs (#16939) (Ben Perlmutter)
Chores
c67f299
chore: upgrade @eslint/js@8.37.0 (#17033) (Milos Djermanovic)ee9ddbd
chore: package.json update for @eslint/js release (ESLint Jenkins)dddb475
chore: upgrade @eslint/eslintrc@2.0.2 (#17032) (Milos Djermanovic)522431e
chore: upgrade espree@9.5.1 (#17031) (Milos Djermanovic)f5f9a88
chore: upgrade eslint-visitor-keys@3.4.0 (#17030) (Milos Djermanovic)4dd8d52
ci: bump actions/stale from 7 to 8 (#17026) (dependabot[bot])ad9dd6a
chore: remove duplicate scss, (#17005) (Strek)ada6a3e
ci: unpin Node 19 (#16993) (Milos Djermanovic)c3da975
chore: Remove triage label from template (#16990) (Nicholas C. Zakas)69bc0e2
ci: pin Node 19 to 19.7.0 (#16987) (Milos Djermanovic)