Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest 16.x @angular-eslint/builder incompatible with eslint 8.56: "Unknown options: reportUnusedDisableDirectives" #1722

Open
1 task done
Wandang opened this issue Feb 14, 2024 · 2 comments
Labels
package: builder Angular CLI builder which enables executing ESLint in Angular CLI workspaces triage This issue needs to be looked at and categorized by a maintainer

Comments

@Wandang
Copy link

Wandang commented Feb 14, 2024

Description and reproduction of the issue
Running ng lint with angular 16 and the latest eslint + @angular-eslint/builder 16.x version leads to this error:

An unhandled exception occurred: Invalid Options:
- Unknown options: reportUnusedDisableDirectives
- 'reportUnusedDisableDirectives' has been removed. Please use the 'overrideConfig.linterOptions.reportUnusedDisableDirectives' option instead.

in depth stacktrace:

[error] Error: Invalid Options:
- Unknown options: reportUnusedDisableDirectives
- 'reportUnusedDisableDirectives' has been removed. Please use the 'overrideConfig.linterOptions.reportUnusedDisableDirectives' option instead.
    at processOptions (C:\Users\<username>\<path-to-app>\node_modules\.pnpm\eslint@8.56.0\node_modules\eslint\lib\eslint\eslint-helpers.js:783:15)
    at new FlatESLint (C:\Users\<username>\<path-to-app>\node_modules\.pnpm\eslint@8.56.0\node_modules\eslint\lib\eslint\flat-eslint.js:556:34)
    at resolveAndInstantiateESLint (C:\Users\<username>\<path-to-app>\node_modules\.pnpm\@angular-eslint+builder@16.3.1_@swc+core@1.3.107_eslint@8.56.0_typescript@4.9.5\node_modules\@angular-eslint\builder\dist\utils\eslint-utils.js:88:20)
    at async C:\Users\<username>\<path-to-app>\node_modules\.pnpm\@angular-eslint+builder@16.3.1_@swc+core@1.3.107_eslint@8.56.0_typescript@4.9.5\node_modules\@angular-eslint\builder\dist\lint.impl.js:35:32

The reason seems to be eslint 8.56, using 8.55 fixes the issue. @angular-eslint/builder 17 upgraded in december to the latest eslint version but did not yet allow for backwards compatibility with angular 16.

Versions

package version
@angular-eslint/builder 16.3.1
ESLint 8.56.0
node 20.11.0
# Please run `npx ng version` in your project and paste the full output here:
> npx ng version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 16.2.12
Node: 20.11.0 (Unsupported)
Package Manager: pnpm 8.14.1
OS: win32 x64

Angular: 16.2.12
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1602.12
@angular-devkit/build-angular   16.2.12
@angular-devkit/core            16.2.12
@angular-devkit/schematics      16.2.12
@angular/cdk                    16.2.13
@angular/material               16.2.13
@schematics/angular             16.2.12
rxjs                            7.8.1
typescript                      4.9.5
zone.js                         0.13.3
  • I have updated to the latest supported version of the packages and checked my ng version output per the instructions given here.

I didn't find the supported version range and assume that angular 16 is still supported. Sorry if I am wrong. Please correct me in that case.

@Wandang Wandang added package: builder Angular CLI builder which enables executing ESLint in Angular CLI workspaces triage This issue needs to be looked at and categorized by a maintainer labels Feb 14, 2024
@Wandang Wandang changed the title latest 16.x @angular-eslint/builder incompetible with eslint 8.56: "Unknown options: reportUnusedDisableDirectives" latest 16.x @angular-eslint/builder incompatible with eslint 8.56: "Unknown options: reportUnusedDisableDirectives" Feb 14, 2024
@AnnaKozlova
Copy link

hello! the same error for @angular-eslint/builder 17.2.1 and eslint 8.57.0

@zoltantoth89
Copy link

Hi, is there a fix on the a way for this issue? 🥺 Thanks if you could provide any kind of update (planned/in progress/etc)! I tested it with latest packages like:
"@angular/core": "^17.3.4",
...
"@angular-eslint/builder": "^17.3.0"
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/schematics": "17.3.0",
"@angular-eslint/template-parser": "17.3.0",
...
"eslint": "^9.1.1",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: builder Angular CLI builder which enables executing ESLint in Angular CLI workspaces triage This issue needs to be looked at and categorized by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants