-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
lint fail when upgrading to nx 20 #28420
Comments
The same issue with me:
|
same in a fresh angular monorepo Error$ nx affected:lint --fix --verbose
NX Affected criteria defaulted to --base=main --head=HEAD
NX Running target lint for project admin:
- admin
With additional flags:
--fix=true
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> nx run admin:lint --fix
Linting "admin"...
NX Cannot read properties of undefined (reading 'at')
Occurred while linting /home/dl/my-project/apps/admin/src/index.html:2
Rule: "@typescript-eslint/ban-ts-comment"
TypeError: Cannot read properties of undefined (reading 'at')
Occurred while linting /home/dl/my-project/apps/admin/src/index.html:2
Rule: "@typescript-eslint/ban-ts-comment"
at Program (/home/dl/my-project/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js:118:50)
at ruleErrorHandler (/home/dl/my-project/node_modules/eslint/lib/linter/linter.js:1084:48)
at /home/dl/my-project/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (
<anonymous>)
at Object.emit (/home/dl/my-project/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector
(/home/dl/my-project/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
at NodeEventGenerator.applySelectors
(/home/dl/my-project/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
at NodeEventGenerator.enterNode (/home/dl/my-project/node_modules/eslint/lib/linter/node-event-generator.js:337:14)
at runRules (/home/dl/my-project/node_modules/eslint/lib/linter/linter.js:1128:40)
at #flatVerifyWithoutProcessors (/home/dl/my-project/node_modules/eslint/lib/linter/linter.js:1914:31)
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Running target lint for project admin failed
Failed tasks:
- admin:lint package.json{
"dependencies": {
"@angular/animations": "18.2.8",
"@angular/common": "18.2.8",
"@angular/compiler": "18.2.8",
"@angular/core": "18.2.8",
"@angular/forms": "18.2.8",
"@angular/platform-browser": "18.2.8",
"@angular/platform-browser-dynamic": "18.2.8",
"@angular/platform-server": "18.2.8",
"@angular/router": "18.2.8",
"@angular/ssr": "18.2.8",
"express": "5.0.1",
"rxjs": "7.8.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "18.2.8",
"@angular-devkit/core": "18.2.8",
"@angular-devkit/schematics": "18.2.8",
"@angular/cli": "18.2.8",
"@angular/compiler-cli": "18.2.8",
"@angular/language-service": "18.2.8",
"@commitlint/cli": "19.5.0",
"@commitlint/config-conventional": "19.5.0",
"@eslint/js": "9.12.0",
"@nx/angular": "20.0.0",
"@nx/eslint": "20.0.0",
"@nx/eslint-plugin": "20.0.0",
"@nx/js": "20.0.0",
"@nx/web": "20.0.0",
"@nx/workspace": "20.0.0",
"@schematics/angular": "18.2.8",
"@swc-node/register": "1.10.9",
"@swc/core": "1.7.35",
"@swc/helpers": "0.5.13",
"@types/express": "4.17.14",
"@typescript-eslint/utils": "8.8.1",
"angular-eslint": "18.3.1",
"autoprefixer": "10.4.20",
"eslint": "9.12.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-perfectionist": "3.8.0",
"eslint-plugin-unused-imports": "4.1.4",
"fluid-tailwind": "1.0.3",
"husky": "9.1.6",
"nx": "20.0.0",
"postcss": "8.4.47",
"prettier": "3.3.3",
"tailwindcss": "3.4.13",
"tslib": "2.7.0",
"typescript": "5.5.4",
"typescript-eslint": "8.8.1"
}
} |
the issue lies in |
oh brilliant, thanks for this workaround |
This was fixed by #28381 and the fix will be released soon. |
Current Behavior
when trying to upgrade from nx 19.8 to nx 20.0 I see the lint job error for all html files in rule
@typescript-eslint/ban-ts-comment
here is my root eslint file
and here is my angular project eslint file (this is a mono repo with nestjs project)
Expected Behavior
@typescript-eslint/ban-ts-comment
rule shouldn't apply for html fileGitHub Repo
No response
Steps to Reproduce
nx migrate latest
Nx Report
Node : 22.9.0
OS : win32-x64
Native Target : x86_64-windows
npm : 10.8.3
nx : 20.0.0
@nx/js : 20.0.0
@nx/jest : 20.0.0
@nx/eslint : 20.0.0
@nx/workspace : 20.0.0
@nx/angular : 20.0.0
@nx/devkit : 20.0.0
@nx/eslint-plugin : 20.0.0
@nx/nest : 20.0.0
@nx/node : 20.0.0
@nx/web : 20.0.0
@nx/webpack : 20.0.0
typescript : 5.5.3
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin
Community plugins:
ng-mocks : 14.13.1
Failure Logs
TypeError: Cannot read properties of undefined (reading 'at')
Occurred while linting F:\interviews\apps\fe\src\app\add-question\add-question.component.html:1
Rule: "@typescript-eslint/ban-ts-comment"
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: