Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change is going to upgrade eslint to the current latest version of `9.17.0` and related modules to their latest version. This is the first part and more efforts will follow to further simplify and cleanup the config in favor of recommended rules. I also took the chance to move eslint related modules to the dependency list of `@kumhq/config` (`@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser`). - Some `@typescript-eslint` rules have been moved to `@stylistic` to move maintenance efforts to the community (e.g. `@stylistic/indent`) - I've started to group related configs: - `@vue/eslint-config-typescript` enables [the essential rules for Vue 3](https://eslint.vuejs.org/rules/#priority-a-essential-error-prevention) and [the recommended rules for TypeScript](https://typescript-eslint.io/rules/?=recommended). So there is no need to add `@typescript-eslint` rules separately. We are using `flat/recommended` ruleset, which includes `base`, `essential` and `strongly-recommended` rulesets. - `eslint-plugin-import` recommended rules - `eslint-plugin-json-schema-validator` recommended rules - `@stylistic/eslint-plugin` recommended stylistic rules and custom config - custom rules that we can revisit and decide to keep or remove them I've compared the rulesets and although we already have most of the rules applied, it looks like by adding the recommended rules we are more strict. --- I had to disable certain rules to stay in the scope of this PR. The issues will be fixed separately. The rules are the following - `@typescript-eslint/no-explicit-any` - `@typescript-eslint/ban-ts-comment` - `@typescript-eslint/no-empty-object-type` --- Initially I wanted to move our config files over to esm, but reverted that for now. The reason is that [`eslint.config.ts` (TypeScript) is not fully supported yet](https://eslint.org/docs/latest/use/configure/configuration-files#typescript-configuration-files) and we would have to stay with `eslint.config.js`. As our config module entry file is a `.ts`file, it can't be used for imports in a `.js` file. Therefore I added eslint support for `.cjs` files. Closes #2879 --------- Signed-off-by: schogges <[email protected]>
- Loading branch information