Changed
- BREAKING: Updated all configs to flat config
and require ESLint v9+. Config files have been renamed such that files that
are singular (for examplejest-config.js) export a single config object,
but those that are plural (for exampleunicorn-configs.js) export an array
of config objects. See the documentation for updated usage information.
(#113)
- Moved all plugins from
peerDependenciestodependenciessince they are
now required for flat config.
- Most rule configs are now applicable to
*.{js,mjs,cjs}file extensions.
In some cases this dropped support for*.jsx,*.ts, and*.tsxfiles,
but support for them was previously inconsistent.
- The exceptions are
vitest-configandesm-config, which are ESM only,
so they do not support*.cjsfiles. Rule
vitest/consistent-test-filenamewas updated to match this convention.
- See the README for additional details.
- With flat config, rules references do not have to match the plugin name, so
updated rule prefixes to be more usable. Any suppressions for the following
rules will need to be updated.
- Plugin
eslint-plugin-nrules are nownode/instead ofn/.
- Plugin
@eslint-community/eslint-commentsrules are nowcomments/
instead of@eslint-community/eslint-comments/.
- The default ESLint rules are now in config
base-configs.js.
- Added rule
spaced-commentas an error.
- The deprecated formatting rules have been removed.
- Deprecated rules
no-new-object,no-new-symbol, andno-return-await
have been removed.
- Renamed the
recommended-vitestconfig torecommended-esm.jsand added
theesm-configrules.
- Moved all plugins from
- BREAKING: Updated to
eslint-plugin-unicorn@53.0.0and added the following new rules aserrors:
consistent-empty-array-spread,
prefer-string-raw,
no-invalid-fetch-options,
no-magic-array-flat-depth,
prefer-structured-clone.
Also added the following rules as error fromeslint-plugin-unicorn@52.0.0:
no-await-in-promise-methods,no-single-promise-in-promise-methods,
no-anonymous-default-export. (#122, #124)
- BREAKING: Updated to
eslint-plugin-n@17.7.0, which renamed ruleshebangtohashbang.
- BREAKING: Added new rule
sonarjs2/cognitive-complexitytosonarjs-config
that has a highercognitive-complexitythreshold of 15. This provides a
secondary check if the lower threshold of 5 in the
sonarjs/cognitive-complexityrule is disabled, which previously allowed
unbounded complexity. (#84)
- BREAKING: Deprecated support for Node 21 (end-of-life 2024-06-01) and added
support for Node 22 (released 2024-04-25). Compatible with all current and
LTS releases (^18.12.0 || ^20.9.0 || >=22.0.0). (#123)
Fixed
- Updated to latest dependencies:
@eslint-community/eslint-plugin-eslint-comments@4.3.0,
eslint-plugin-jest@28.5.0,eslint-plugin-jsdoc@48.2.7,
eslint-plugin-playwright@1.6.2,eslint-plugin-promise@6.2.0,
eslint-plugin-sonarjs@1.0.3,eslint-plugin-unicorn@53.0.0,
eslint-plugin-vitest@0.5.4.
Miscellaneous
- Updated CI pipeline with
eslint-config-inspectorjob to use
@eslint/config-inspectorto
visualize flat configs.
- Updated Renovate config to v1.1.0.