Skip to content

Commit

Permalink
Update angular-eslint to 16 (#138)
Browse files Browse the repository at this point in the history
- Updated dependency on `@angular/core` to `16.2.12` (latest <17) and
`@angular-eslint` packages to `16.3.1` (latest <17)
- As the `@angular-eslint/recommended--extra` config no longer exists, I
inlined the configuration that [used to be in that
file](https://github.com/angular-eslint/angular-eslint/blob/v15.2.1/packages/eslint-plugin/src/configs/recommended--extra.json)
in lieu of extending it.
- The accessibility rules referenced by the config have been renamed to
drop the `accessibility-` prefix, so I updated the names in our template
config where we had been disabling those rules.
- There were two accessibility rules that were not listed in our
template config (`interactive-supports-focus` and
`role-has-required-aria`), so I added them (in disabled state).
- Updated all urls in the repo to reference "main" instead of "master"

#### Testing
- I ran `npm run print-evaluated-rules:diff` and ensured that the only
differences were the renamed accessibility rules.
- I ran `npm run print-evaluated-rules` to do an audit, which turned up
no warnings or diverged rules.
- I ran `npm run print-available-rules` and found that there were the
following new, unset rules available in the updated version of
@angular-eslint:
    - `@angular-eslint/prefer-standalone-component`
    - `@angular-eslint/require-localize-metadata`
    - `@angular-eslint/sort-lifecycle-methods`
    - `@angular-eslint/template/prefer-ngsrc`
    - `@angular-eslint/template/prefer-self-closing-tags`
  • Loading branch information
m-akinc authored Apr 10, 2024
1 parent 71fedf1 commit 107ef3b
Show file tree
Hide file tree
Showing 15 changed files with 1,311 additions and 876 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,11 @@ This option can be adapted for npm scripts, for example.

If there are situations where the analysis time for enabling the type checked rules is an excessive burden you may consider creating a separate ESLint configuration that avoids extending the type checked rules and omits the `parserOptions.project` configuration to run in specific scenarios.

See discussion in the [performance section](https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md#performance) of the Getting Started - Linting with Type Information guide.
See discussion in the [performance section](https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/getting-started/linting/TYPED_LINTING.md#performance) of the Getting Started - Linting with Type Information guide.

### Angular linting performance

Deviations from the `@angular-eslint schematic`, `@ni/eslint-config-angular`, and the [`parserOptions.project`](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#parseroptionsproject) configurations can result in significant performance degredation. Fully manual configuration [is not recommended](https://github.com/angular-eslint/angular-eslint#going-fully-manual-not-recommended). Read `@angular-eslint`'s [section on performance](https://github.com/angular-eslint/angular-eslint#eslint-configs-and-performance) for information on addressing slow linting processes.
Deviations from the `@angular-eslint schematic`, `@ni/eslint-config-angular`, and the [`parserOptions.project`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser#parseroptionsproject) configurations can result in significant performance degredation. Fully manual configuration [is not recommended](https://github.com/angular-eslint/angular-eslint#going-fully-manual-not-recommended). Read `@angular-eslint`'s [section on performance](https://github.com/angular-eslint/angular-eslint#eslint-configs-and-performance) for information on addressing slow linting processes.
## License
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "major",
"comment": "Update to Angular 16",
"packageName": "@ni/eslint-config-angular",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Url updates in comments",
"packageName": "@ni/eslint-config-javascript",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Url updates in comments",
"packageName": "@ni/eslint-config-typescript",
"email": "[email protected]",
"dependentChangeType": "none"
}
Loading

0 comments on commit 107ef3b

Please sign in to comment.