Skip to content

Changelog

2.0.0

Major Changes

  • dca02aa: Node: Upgraded from node@18.18 to node@22.14.

    To Migrate:

    • Update the node version in the volta configuration in the package.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 a npm 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.
  • 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 the eslint.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:

    js
    import 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:

    bash
    eslint --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 your eslint.config.js file.
    bash
    npm i -D @eslint/compat
    diff
      import 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 so type imports consistancy is autofixable.
  • 19bc32f: Added @typescript-eslint/no-unused-vars rule override to allow _ pattern and ignoreRestSiblings

1.2.0

Minor Changes

  • 0a5417373: Exclude all codey packages from 'import/no-unresolved' rule.

1.1.0

Minor Changes

  • 2cd9e3d33: Add no-console and no-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