Changelog
2.0.0
Major Changes
dca02aa:
Node
: Upgraded fromnode@18.18
tonode@22.14
.To Migrate:
- Update the
node
version in thevolta
configuration in thepackage.json
file. - Update the engine version in the
package.json
file. - Update the node version in any ci/cd pipes that have a fixed version.
- Remove your
node_modules
and run anpm install
. - Ensure all dependencies are compatible with the new node version.
- If your package contains
@tsconfig/node18
dependency, update it to@tsconfig/node22
. Search for string occurence of@tsconfig/node18
in tsconfig files and replace there as well.
- Update the
f740e78:
Eslint
: update to eslint v9.x and use flat config. This updates the rules, and packages needed changes to be in line with the up-to-date eslint rules. Additionally, ensure documentation reflects these changes for seamless integration and usage.Breaking
The
eslint
config file now only supports flat configs using theeslint.config.js
file. The old.eslintrc
files are not supported anymore. This is a breaking change for all users of the@xerius/eslint-config
package.To migrate
The new config file,
eslint.config.js
should look like this:jsimport eslintConfig from "@xerius/eslint-config"; export default eslintConfig({ // You can extend the configuration with your own rules here if needed. // For example: // rules: { // 'vue/no-unused-vars': 'warn', // }, });
Add:
--fix
to your eslint command to automatically fix all the issues that can be fixed automatically. This will help you to migrate your codebase to the new eslint rules.example:
basheslint --fix .
eslint ignore .gitignore
Migration if your
package.json
contains a lint script using--ignore-path .gitignore
: This option is no longer supported, but there are 2 ways to get the same behaviour.- Manually add and maintain a separate list of ignored files to the ESLint config. See docs.
- Add the
@eslint/compat
package as a devDependency which allows the same functionality in youreslint.config.js
file.
bashnpm i -D @eslint/compat
diffimport eslintConfig from "@xerius/eslint-config"; + import path from "node:path"; + import { includeIgnoreFile } from "@eslint/compat"; + const __dirname = process.cwd(); + const gitignorePath = path.resolve(__dirname, ".gitignore"); export default eslintConfig({ // You can extend the configuration with your own rules here if needed. // For example: // rules: { // 'vue/no-unused-vars': 'warn', // }, + ...includeIgnoreFile(gitignorePath), });
Minor Changes
- 19bc32f: Enabled
@typescript-eslint/consistent-type-imports
sotype
imports consistancy is autofixable. - 19bc32f: Added
@typescript-eslint/no-unused-vars
rule override to allow_
pattern andignoreRestSiblings
1.2.0
Minor Changes
- 0a5417373: Exclude all codey packages from 'import/no-unresolved' rule.
1.1.0
Minor Changes
- 2cd9e3d33: Add
no-console
andno-debugger
lint rules depending on the NODE_ENV you are building. - 2cd9e3d33: Add
spec
files to the vitest overrides.
Patch Changes
- e114493fd: Fix import/resolver settings to support front-office apps