-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
Which @ngrx/* package(s) are the source of the bug?
eslint-plugin
Minimal reproduction of the bug/regression with instructions
I reported this issue before for version 20 of the ESLint plugin but it was closed saying that it would be fixed in version 21: #4961 (comment). Now, in version 21 it doesn't fully work but I don't have permissions to reopen the issue so I created it here with an updated description below.
- Generate a new eslint config file with
npx eslint --init. - Choose TypeScript as the language for the new config file.
- Add the NgRx ESLint plugin to the new eslint.config.mts according to these instructions https://ngrx.io/guide/eslint-plugin#eslint-v9.
- You encounter a typescript error about a type mismatch on the
extendspart:extends: [...ngrx.configs.all]
Type 'Config[]' is not assignable to type 'ExtendsElement[]'.
Type 'Config' is not assignable to type 'ExtendsElement'.
Type 'Config' is not assignable to type 'ConfigObject<RulesConfig>'.
Types of property 'languageOptions' are incompatible.
Type 'import("d:/repos/Fourth-World/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions | undefined' is not assignable to type 'import("d:/repos/Fourth-World/node_modules/@eslint/core/dist/cjs/types").LanguageOptions | undefined'.
Type 'import("d:/repos/Fourth-World/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions' is not assignable to type 'import("d:/repos/Fourth-World/node_modules/@eslint/core/dist/cjs/types").LanguageOptions'.
Index signature for type 'string' is missing in type 'LanguageOptions'.
- Interestingly: the plugin _does_ work. I do get ngrx-specifc warnings from ESLint despite the above error.
Expected behavior
I expected the type of ngrx.configs.all to be compatible with the extends field in the object array which is the parameter of defineConfig() in the eslint config file such that the NgRxplugin works again with ES lint.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
> npm ls
<omitted>
│ ├── @angular-eslint/[email protected]
│ ├── @angular-eslint/[email protected]
│ ├── @angular-eslint/[email protected]
│ ├── @angular-eslint/[email protected]
│ ├── @angular-eslint/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @angular/[email protected]
│ ├── @eslint/[email protected]
│ ├── @eslint/[email protected]
│ ├── @eslint/[email protected]
│ ├── @eslint/[email protected]
│ ├── @microsoft/[email protected]
│ ├── @ngrx/[email protected]
│ ├── @ngrx/[email protected]
│ ├── @ngrx/[email protected]
│ ├── @ngrx/[email protected]
│ ├── @ngrx/[email protected]
│ ├── @ngrx/[email protected]
│ ├── @ngrx/[email protected]
│ ├── @ngrx/[email protected]
│ ├── @ngrx/[email protected]
│ ├── @sonar/[email protected]
│ ├── @stryker-mutator/[email protected]
│ ├── @stryker-mutator/[email protected]
│ ├── @stryker-mutator/[email protected]
│ ├── @types/[email protected]
│ ├── @types/[email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected] deduped
│ ├── [email protected] deduped
│ ├── [email protected] deduped
│ ├── [email protected] deduped
│ ├── [email protected] deduped
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
Node.js v24.12.0
On Windows 11
Other information
No response
I would be willing to submit a PR to fix this issue
- Yes
- No