Changed
- BREAKING: Added support for linting TypeScript files. (#146)
- Added
typescript-eslint-configswithtypescript-eslintplugin and
rules. Typed rules or those extendingeslintcore rules are only enabled
for TypeScript files, and the applicableeslintcore rules are turned
off. The@typescript-eslint/parseris configured to parse TypeScript
files. Other rules are applied to both JavaScript and TypeScript files.
- Added
recommended-ts, which extendsrecommended-esmand includes
typescript-eslint-configs.
- If linting TypeScript files,
typescriptis required as a dependency
(declared as an optional peer dependency), and atsconfig.jsonfile must
be present. These are not required for linting JavaScript files.
- Updated existing configs to apply to applicable TypeScript files (mirroring
the applicable JavaScript files).
- Updated
base-configsto suppress rules that are better covered bytsc
for TypeScript files.
- Updated
jsdoc-configsto suppress rules that allow or require types for
TypeScript files. Changed exportjsdoc-configtojsdoc-configsto match
naming convention since it now output a configuration array.
- Updated
node-configto suppress
node/file-extension-in-import
for TypeScript files since it always adds a JavaScript file extension.
- Updated
vitest-configrule
vitest/consistent-test-filename
to allow*.{ts,mts}files in addition to*.{js,mjs}files.
- Added
- BREAKING: Updated to
eslint-plugin-jest@29.11.2and added the following
new rules as errors:
no-unneeded-async-expect-function,
prefer-mock-return-shorthand.
The following new rules are not enabled as they require type information and
the philosophies of this config are that typed parsing is only used for
TypeScript ESM files, and Jest is only used for CommonJS projects:
no-error-equal,
no-unnecessary-assertion,
unbound-method,
valid-expect-with-promise.
- BREAKING: Updated to
@vitest/eslint-plugin@1.6.4and added the following
new rules as errors:
consistent-each-for,
prefer-mock-return-shorthand,
prefer-to-have-been-called-times.
Miscellaneous
- Updated GitLab CI Templates to v49.1.0. See the
release notes
for details.
- Updated to Renovate config presets v4.1.1. See the
release notes
for details.