-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update to Angular 18 #160
base: main
Are you sure you want to change the base?
Update to Angular 18 #160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't submit until ready to update clients.
change/@ni-eslint-config-angular-718354fd-7ab1-4395-ac53-e8505b9622bf.json
Show resolved
Hide resolved
change/@ni-eslint-config-angular-718354fd-7ab1-4395-ac53-e8505b9622bf.json
Show resolved
Hide resolved
change/@ni-eslint-config-angular-718354fd-7ab1-4395-ac53-e8505b9622bf.json
Show resolved
Hide resolved
// declared using "export" rather than the old "main" syntax in package.json. | ||
// See https://github.com/typescript-eslint/typescript-eslint/issues/7565 | ||
// and https://github.com/import-js/eslint-plugin-import/issues/2703 | ||
// eslint-disable-next-line import/no-unresolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new version of eslint-plugin
's package.json
file no longer has "main": "dist/index.js"
and instead uses the newer "exports"
property. Unfortunately, eslint-plugin-import
doesn't know how to resolve entry points in commonjs modules that are declared using "export"
. See typescript-eslint/typescript-eslint#7565 and import-js/eslint-plugin-import#2703
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but withholding final approval until we're ready to start the release train.
Addresses #157
In addition to updating the dependency version, I'm fixing the following:
Implementation
Updated dependencies:
@angular/core
to18.2.13
(latest <19)@angular-eslint
packages to18.4.3
(latest <19)@typescript-eslint/eslint-plugin
and@typescript-eslint/parser
to7.18.0
(latest <8)After updating the version of
@typescript-eslint/parser
, I began getting the following test failure:One of the typescript-eslint maintainers says that the rule does not require parserServices and seems to credit the error to using the rule on a non-ts file or with parser other than
@typescript-eslint/parser
, but that doesn't seem to be the case for our tests. In any case, clients should already be settingparserOptions.project
for running eslint on their ts files, so I wouldn't expect this to cause issues.Testing
npm run print-evaluated-rules:diff
and the only change is that theno-host-metadata-property
rule was removed from the recommended eslint-plugin config (rule is deprecated in version 18 and fully removed in version 19). This should not break clients, as the rule still exists (so clients can still turn it on/off) and the default config is just more permissive.npm run print-evaluated-rules
to do an audit, which turned upno warnings or diverged rules.
npm run print-available-rules
and the only new rule available in the updated version was@angular-eslint/runtime-localize
, which we now enable.