Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfd1bd7

Browse files
authored
feat: update typescript-eslint to v8 stable, eslint v9.8.0 (#1956)
1 parent 89c9416 commit dfd1bd7

File tree

235 files changed

+1315
-696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+1315
-696
lines changed

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
yarn pre-commit

.husky/pre-push

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
yarn pre-push

e2e/src/__snapshots__/inline-template-fixer.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ exports[`inline-template-fixer should generate the expected inline template fixe
2222
"@angular/compiler-cli": "^18.X.X",
2323
"@types/jasmine": "~5.1.0",
2424
"angular-eslint": "0.0.0-e2e",
25-
"eslint": "^9.6.0",
25+
"eslint": "^9.8.0",
2626
"jasmine-core": "~5.1.0",
2727
"karma": "~6.4.0",
2828
"karma-chrome-launcher": "~3.2.0",
2929
"karma-coverage": "~2.2.0",
3030
"karma-jasmine": "~5.1.0",
3131
"karma-jasmine-html-reporter": "~2.1.0",
3232
"typescript": "~5.X.X",
33-
"typescript-eslint": "8.0.0-alpha.38"
33+
"typescript-eslint": "8.0.0"
3434
}
3535
`;

e2e/src/__snapshots__/new-workspace-create-application-false-ng-add-then-project.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ exports[`new-workspace-create-application-false-ng-add-then-project should pass
77
"@angular/compiler-cli": "^18.X.X",
88
"@types/jasmine": "~5.1.0",
99
"angular-eslint": "0.0.0-e2e",
10-
"eslint": "^9.6.0",
10+
"eslint": "^9.8.0",
1111
"jasmine-core": "~5.1.0",
1212
"karma": "~6.4.0",
1313
"karma-chrome-launcher": "~3.2.0",
1414
"karma-coverage": "~2.2.0",
1515
"karma-jasmine": "~5.1.0",
1616
"karma-jasmine-html-reporter": "~2.1.0",
1717
"typescript": "~5.X.X",
18-
"typescript-eslint": "8.0.0-alpha.38"
18+
"typescript-eslint": "8.0.0"
1919
}
2020
`;
2121

e2e/src/__snapshots__/new-workspace-create-application-false-project-then-ng-add.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ exports[`new-workspace-create-application-false-project-then-ng-add should pass
77
"@angular/compiler-cli": "^18.X.X",
88
"@types/jasmine": "~5.1.0",
99
"angular-eslint": "0.0.0-e2e",
10-
"eslint": "^9.6.0",
10+
"eslint": "^9.8.0",
1111
"jasmine-core": "~5.1.0",
1212
"karma": "~6.4.0",
1313
"karma-chrome-launcher": "~3.2.0",
1414
"karma-coverage": "~2.2.0",
1515
"karma-jasmine": "~5.1.0",
1616
"karma-jasmine-html-reporter": "~2.1.0",
1717
"typescript": "~5.X.X",
18-
"typescript-eslint": "8.0.0-alpha.38"
18+
"typescript-eslint": "8.0.0"
1919
}
2020
`;
2121

e2e/src/__snapshots__/new-workspace.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`new-workspace should pass linting after creating a new workspace from s
77
"@angular/compiler-cli": "^18.X.X",
88
"@types/jasmine": "~5.1.0",
99
"angular-eslint": "0.0.0-e2e",
10-
"eslint": "^9.6.0",
10+
"eslint": "^9.8.0",
1111
"jasmine-core": "~5.1.0",
1212
"karma": "~6.4.0",
1313
"karma-chrome-launcher": "~3.2.0",
@@ -16,7 +16,7 @@ exports[`new-workspace should pass linting after creating a new workspace from s
1616
"karma-jasmine-html-reporter": "~2.1.0",
1717
"ng-packagr": "^18.X.X",
1818
"typescript": "~5.X.X",
19-
"typescript-eslint": "8.0.0-alpha.38"
19+
"typescript-eslint": "8.0.0"
2020
}
2121
`;
2222

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"update-rule-docs": "nx run-many -t update-rule-docs",
3838
"check-rule-lists": "nx run-many -t check-rule-lists",
3939
"update-rule-lists": "nx run-many -t update-rule-lists",
40-
"prepare": "husky install"
40+
"prepare": "husky"
4141
},
4242
"config": {
4343
"commitizen": {
@@ -77,11 +77,11 @@
7777
"@types/node": "20.14.13",
7878
"@types/prettier": "3.0.0",
7979
"@types/semver": "^7.5.8",
80-
"@typescript-eslint/rule-tester": "8.0.0-alpha.38",
80+
"@typescript-eslint/rule-tester": "8.0.0",
8181
"commitizen": "4.3.0",
8282
"cz-conventional-changelog": "3.3.0",
8383
"env-cmd": "10.1.0",
84-
"eslint": "9.6.0",
84+
"eslint": "9.8.0",
8585
"eslint-config-prettier": "9.1.0",
8686
"execa": "5.1.1",
8787
"husky": "9.1.4",
@@ -104,7 +104,7 @@
104104
"tslib": "^2.4.1",
105105
"tsx": "^4.7.3",
106106
"typescript": "5.5.4",
107-
"typescript-eslint": "8.0.0-alpha.38",
107+
"typescript-eslint": "8.0.0",
108108
"verdaccio": "5.32.0"
109109
},
110110
"nx": {

packages/angular-eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"peerDependencies": {
2121
"eslint": "^8.57.0 || ^9.0.0",
2222
"typescript": "*",
23-
"typescript-eslint": "^8.0.0-alpha.20"
23+
"typescript-eslint": "^8.0.0"
2424
},
2525
"dependencies": {
2626
"@angular-eslint/builder": "18.1.0",

packages/eslint-plugin-template/docs/rules/attributes-order.md

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,13 @@ interface Options {
109109

110110
<br>
111111

112-
#### Custom Config
112+
#### Default Config
113113

114114
```json
115115
{
116116
"rules": {
117117
"@angular-eslint/template/attributes-order": [
118-
"error",
119-
{
120-
"alphabetical": true
121-
}
118+
"error"
122119
]
123120
}
124121
}
@@ -282,6 +279,7 @@ interface Options {
282279
"@angular-eslint/template/attributes-order": [
283280
"error",
284281
{
282+
"alphabetical": false,
285283
"order": []
286284
}
287285
]
@@ -483,16 +481,13 @@ interface Options {
483481

484482
<br>
485483

486-
#### Custom Config
484+
#### Default Config
487485

488486
```json
489487
{
490488
"rules": {
491489
"@angular-eslint/template/attributes-order": [
492-
"error",
493-
{
494-
"alphabetical": true
495-
}
490+
"error"
496491
]
497492
}
498493
}
@@ -513,16 +508,13 @@ interface Options {
513508

514509
<br>
515510

516-
#### Custom Config
511+
#### Default Config
517512

518513
```json
519514
{
520515
"rules": {
521516
"@angular-eslint/template/attributes-order": [
522-
"error",
523-
{
524-
"alphabetical": true
525-
}
517+
"error"
526518
]
527519
}
528520
}
@@ -543,16 +535,13 @@ interface Options {
543535

544536
<br>
545537

546-
#### Custom Config
538+
#### Default Config
547539

548540
```json
549541
{
550542
"rules": {
551543
"@angular-eslint/template/attributes-order": [
552-
"error",
553-
{
554-
"alphabetical": true
555-
}
544+
"error"
556545
]
557546
}
558547
}
@@ -573,16 +562,13 @@ interface Options {
573562

574563
<br>
575564

576-
#### Custom Config
565+
#### Default Config
577566

578567
```json
579568
{
580569
"rules": {
581570
"@angular-eslint/template/attributes-order": [
582-
"error",
583-
{
584-
"alphabetical": true
585-
}
571+
"error"
586572
]
587573
}
588574
}
@@ -603,16 +589,13 @@ interface Options {
603589

604590
<br>
605591

606-
#### Custom Config
592+
#### Default Config
607593

608594
```json
609595
{
610596
"rules": {
611597
"@angular-eslint/template/attributes-order": [
612-
"error",
613-
{
614-
"alphabetical": true
615-
}
598+
"error"
616599
]
617600
}
618601
}
@@ -637,16 +620,13 @@ interface Options {
637620

638621
<br>
639622

640-
#### Custom Config
623+
#### Default Config
641624

642625
```json
643626
{
644627
"rules": {
645628
"@angular-eslint/template/attributes-order": [
646-
"error",
647-
{
648-
"alphabetical": true
649-
}
629+
"error"
650630
]
651631
}
652632
}
@@ -698,16 +678,13 @@ interface Options {
698678

699679
<br>
700680

701-
#### Custom Config
681+
#### Default Config
702682

703683
```json
704684
{
705685
"rules": {
706686
"@angular-eslint/template/attributes-order": [
707-
"error",
708-
{
709-
"alphabetical": true
710-
}
687+
"error"
711688
]
712689
}
713690
}

packages/eslint-plugin-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@types/aria-query": "5.0.4"
2929
},
3030
"peerDependencies": {
31-
"@typescript-eslint/utils": "^7.11.0 || ^8.0.0-alpha.37",
31+
"@typescript-eslint/utils": "^7.11.0 || ^8.0.0",
3232
"eslint": "^8.57.0 || ^9.0.0",
3333
"typescript": "*"
3434
},

packages/eslint-plugin-template/src/rules/alt-text.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getTemplateParserServices } from '@angular-eslint/utils';
66
import { createESLintRule } from '../utils/create-eslint-rule';
77
import { getAttributeValue } from '../utils/get-attribute-value';
88

9-
type Options = [];
9+
export type Options = [];
1010
export type MessageIds = 'altText';
1111
export const RULE_NAME = 'alt-text';
1212

packages/eslint-plugin-template/src/rules/attributes-order.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export enum OrderType {
2424
TwoWayBinding = 'TWO_WAY_BINDING',
2525
}
2626

27-
type Options = [
27+
export type Options = [
2828
{
2929
readonly alphabetical: boolean;
3030
readonly order: readonly OrderType[];

packages/eslint-plugin-template/src/rules/banana-in-box.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { TmplAstBoundEvent } from '@angular-eslint/bundled-angular-compiler
22
import { getTemplateParserServices } from '@angular-eslint/utils';
33
import { createESLintRule } from '../utils/create-eslint-rule';
44

5-
type Options = [];
5+
export type Options = [];
66
export type MessageIds = 'bananaInBox';
77
export const RULE_NAME = 'banana-in-box';
88
const INVALID_PATTERN = /\[(.*)\]/;

packages/eslint-plugin-template/src/rules/button-has-type.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ import {
99
import { getTemplateParserServices } from '@angular-eslint/utils';
1010
import { createESLintRule } from '../utils/create-eslint-rule';
1111

12+
export type Options = [];
13+
export type MessageIds = 'invalidType' | 'missingType';
1214
export const RULE_NAME = 'button-has-type';
15+
1316
export const INVALID_TYPE_DATA_KEY = 'type';
14-
export type MessageIds = 'invalidType' | 'missingType';
1517

1618
interface InvalidButtonTypeInfo {
1719
readonly value: string;
@@ -22,7 +24,7 @@ interface InvalidButtonTypeInfo {
2224
const VALID_BUTTON_TYPES: readonly string[] = ['button', 'submit', 'reset'];
2325
const TYPE_ATTRIBUTE_NAME = 'type';
2426

25-
export default createESLintRule<[], MessageIds>({
27+
export default createESLintRule<Options, MessageIds>({
2628
name: RULE_NAME,
2729
meta: {
2830
type: 'suggestion',

packages/eslint-plugin-template/src/rules/click-events-have-key-events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { isHiddenFromScreenReader } from '../utils/is-hidden-from-screen-reader'
66
import { isInteractiveElement } from '../utils/is-interactive-element';
77
import { isPresentationRole } from '../utils/is-presentation-role';
88

9-
type Options = [];
9+
export type Options = [];
1010
export type MessageIds = 'clickEventsHaveKeyEvents';
1111
export const RULE_NAME = 'click-events-have-key-events';
1212

packages/eslint-plugin-template/src/rules/conditional-complexity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
import { ensureTemplateParser } from '@angular-eslint/utils';
1515
import { createESLintRule } from '../utils/create-eslint-rule';
1616

17-
type Options = [{ maxComplexity: number }];
17+
export type Options = [{ maxComplexity: number }];
1818
export type MessageIds = 'conditionalComplexity';
1919
export const RULE_NAME = 'conditional-complexity';
2020

packages/eslint-plugin-template/src/rules/cyclomatic-complexity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
import { getTemplateParserServices } from '@angular-eslint/utils';
66
import { createESLintRule } from '../utils/create-eslint-rule';
77

8-
type Options = [{ maxComplexity: number }];
8+
export type Options = [{ maxComplexity: number }];
99
export type MessageIds = 'cyclomaticComplexity';
1010
export const RULE_NAME = 'cyclomatic-complexity';
1111

packages/eslint-plugin-template/src/rules/elements-content.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getTemplateParserServices } from '@angular-eslint/utils';
33
import { createESLintRule } from '../utils/create-eslint-rule';
44
import { isHiddenFromScreenReader } from '../utils/is-hidden-from-screen-reader';
55

6-
type Options = [
6+
export type Options = [
77
{
88
readonly allowList?: readonly string[];
99
},

packages/eslint-plugin-template/src/rules/eqeqeq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { TSESLint } from '@typescript-eslint/utils';
99
import { createESLintRule } from '../utils/create-eslint-rule';
1010
import { getNearestNodeFrom } from '../utils/get-nearest-node-from';
1111

12-
type Options = [{ readonly allowNullOrUndefined?: boolean }];
12+
export type Options = [{ readonly allowNullOrUndefined?: boolean }];
1313
export type MessageIds = 'eqeqeq' | 'suggestStrictEquality';
1414
export const RULE_NAME = 'eqeqeq';
1515
const DEFAULT_OPTIONS: Options[0] = { allowNullOrUndefined: false };

packages/eslint-plugin-template/src/rules/i18n.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const DEFAULT_ALLOWED_ATTRIBUTES: ReadonlySet<string> = new Set([
6161
'xmlns',
6262
]);
6363

64-
type Options = [
64+
export type Options = [
6565
{
6666
readonly allowMarkupInContent?: boolean;
6767
readonly boundTextAllowedPattern?: string;

0 commit comments

Comments
 (0)