Skip to content

all: reenable lint rules after Angular 19 upgrade (connects #9082)#9806

Open
paulbert wants to merge 6 commits intomasterfrom
9082-ng-19-update
Open

all: reenable lint rules after Angular 19 upgrade (connects #9082)#9806
paulbert wants to merge 6 commits intomasterfrom
9082-ng-19-update

Conversation

@paulbert
Copy link
Copy Markdown
Member

Some lint rules were disabled after the upgrade to Angular 19. Reenabling them here. See https://github.com/open-learning-exchange/planet/pull/9754/changes#diff-6884918dc8291219be508e05e28965b958c734def85324f3b53858ea4702090f for the disabled rules.

Note that for the quotes rule { "allowTemplateLiterals": "never" } still allows template literals. It actually throws an error when backticks are used without a template literal or with a one line string.

@paulbert
Copy link
Copy Markdown
Member Author

All of them are reenabled now except for no-host-metadata-property which we should consider a different approach since the Angular team's recommendation is now to prefer host metadata properties.

See https://github.com/angular-eslint/angular-eslint/blob/v18.4.3/packages/eslint-plugin/docs/rules/no-host-metadata-property.md and angular/angular#52561

@paulbert paulbert force-pushed the 9082-ng-19-update branch from 21608b8 to 074fd3d Compare March 30, 2026 19:20
@paulbert paulbert marked this pull request as ready for review March 30, 2026 19:21
@paulbert
Copy link
Copy Markdown
Member Author

Note this also upgrades ESLint to v9. typescript-eslint v8 supports ESLint v9 https://typescript-eslint.io/blog/announcing-typescript-eslint-v8

@Mutugiii
Copy link
Copy Markdown
Member

Running into this error when I run ng lint

image

@paulbert
Copy link
Copy Markdown
Member Author

paulbert commented Apr 2, 2026

Running into this error when I run ng lint
image

Sorry I forgot to point out you'll need to run an npm install to install the stylistic plugin.

@Mutugiii
Copy link
Copy Markdown
Member

Mutugiii commented Apr 2, 2026

Running into this error when I run ng lint
image

Sorry I forgot to point out you'll need to run an npm install to install the stylistic plugin.

This is after removing the package-lock.json, running npm install & running the linting commands

image

@paulbert
Copy link
Copy Markdown
Member Author

paulbert commented Apr 7, 2026

Figured out it's not working in Node 18 vs 20, but it could also be fixed by changing to the new default config format for ESLint v9. See https://eslint.org/docs/latest/use/migrate-to-9.0.0#-new-default-config-format-eslintconfigjs

@paulbert
Copy link
Copy Markdown
Member Author

paulbert commented Apr 9, 2026

@Mutugiii Upgraded the config file for ESLint and it appears to be working with Node 18 now.

Keeping the old file because the commented out rules did not make it into the new file.

@paulbert paulbert marked this pull request as draft April 9, 2026 16:07
@paulbert
Copy link
Copy Markdown
Member Author

paulbert commented Apr 9, 2026

I'm converting this to a draft because the latest change broke the linting for chatapi.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: paulbert <9203229+paulbert@users.noreply.github.com>
@paulbert
Copy link
Copy Markdown
Member Author

paulbert commented Apr 9, 2026

Jules came up with a much simpler fix, ready for review now @Mutugiii

@paulbert paulbert marked this pull request as ready for review April 9, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants