Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 5e52613

Browse files
committed
Update typescript-eslint rules
1 parent adf66e3 commit 5e52613

File tree

122 files changed

+464
-665
lines changed

Some content is hidden

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

122 files changed

+464
-665
lines changed

src/rules/typescript-eslint/adjacent-overload-signatures.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Require that member overloads be consecutive.
55
*
6-
* @see [adjacent-overload-signatures](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
6+
* @see [adjacent-overload-signatures](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
77
*/
88
export type AdjacentOverloadSignaturesRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Require that member overloads be consecutive.
1212
*
13-
* @see [adjacent-overload-signatures](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
13+
* @see [adjacent-overload-signatures](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
1414
*/
1515
export interface AdjacentOverloadSignaturesRule {
1616
/**
1717
* Require that member overloads be consecutive.
1818
*
19-
* @see [adjacent-overload-signatures](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
19+
* @see [adjacent-overload-signatures](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
2020
*/
2121
'@typescript-eslint/adjacent-overload-signatures': AdjacentOverloadSignaturesRuleConfig;
2222
}

src/rules/typescript-eslint/array-type.d.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@ import type { RuleConfig } from '../rule-config';
44
* Option.
55
*/
66
export interface ArrayTypeOption {
7-
/**
8-
* Sets the array type expected for mutable cases.
9-
*
10-
* @default 'array'
11-
*
12-
* @see [default](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/array-type.md#options)
13-
*/
147
default?: 'array' | 'generic' | 'array-simple';
15-
/**
16-
* Sets the array type expected for readonly arrays. If this is omitted, then the value for default will be used.
17-
*
18-
* @see [readonly](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/array-type.md#options)
19-
*/
208
readonly?: 'array' | 'generic' | 'array-simple';
219
[k: string]: any;
2210
}
@@ -29,20 +17,20 @@ export type ArrayTypeOptions = [ArrayTypeOption?];
2917
/**
3018
* Requires using either `T[]` or `Array<T>` for arrays.
3119
*
32-
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/array-type.md)
20+
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/array-type.md)
3321
*/
3422
export type ArrayTypeRuleConfig = RuleConfig<ArrayTypeOptions>;
3523

3624
/**
3725
* Requires using either `T[]` or `Array<T>` for arrays.
3826
*
39-
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/array-type.md)
27+
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/array-type.md)
4028
*/
4129
export interface ArrayTypeRule {
4230
/**
4331
* Requires using either `T[]` or `Array<T>` for arrays.
4432
*
45-
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/array-type.md)
33+
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/array-type.md)
4634
*/
4735
'@typescript-eslint/array-type': ArrayTypeRuleConfig;
4836
}

src/rules/typescript-eslint/await-thenable.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Disallows awaiting a value that is not a Thenable.
55
*
6-
* @see [await-thenable](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/await-thenable.md)
6+
* @see [await-thenable](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/await-thenable.md)
77
*/
88
export type AwaitThenableRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Disallows awaiting a value that is not a Thenable.
1212
*
13-
* @see [await-thenable](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/await-thenable.md)
13+
* @see [await-thenable](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/await-thenable.md)
1414
*/
1515
export interface AwaitThenableRule {
1616
/**
1717
* Disallows awaiting a value that is not a Thenable.
1818
*
19-
* @see [await-thenable](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/await-thenable.md)
19+
* @see [await-thenable](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/await-thenable.md)
2020
*/
2121
'@typescript-eslint/await-thenable': AwaitThenableRuleConfig;
2222
}

src/rules/typescript-eslint/ban-ts-comment.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ export type BanTsCommentOptions = [BanTsCommentOption?];
1919
/**
2020
* Bans `@ts-<directive>` comments from being used or requires descriptions after directive.
2121
*
22-
* @see [ban-ts-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-ts-comment.md)
22+
* @see [ban-ts-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/ban-ts-comment.md)
2323
*/
2424
export type BanTsCommentRuleConfig = RuleConfig<BanTsCommentOptions>;
2525

2626
/**
2727
* Bans `@ts-<directive>` comments from being used or requires descriptions after directive.
2828
*
29-
* @see [ban-ts-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-ts-comment.md)
29+
* @see [ban-ts-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/ban-ts-comment.md)
3030
*/
3131
export interface BanTsCommentRule {
3232
/**
3333
* Bans `@ts-<directive>` comments from being used or requires descriptions after directive.
3434
*
35-
* @see [ban-ts-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-ts-comment.md)
35+
* @see [ban-ts-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/ban-ts-comment.md)
3636
*/
3737
'@typescript-eslint/ban-ts-comment': BanTsCommentRuleConfig;
3838
}

src/rules/typescript-eslint/ban-tslint-comment.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Bans `// tslint:<rule-flag>` comments from being used.
55
*
6-
* @see [ban-tslint-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-tslint-comment.md)
6+
* @see [ban-tslint-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/ban-tslint-comment.md)
77
*/
88
export type BanTslintCommentRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Bans `// tslint:<rule-flag>` comments from being used.
1212
*
13-
* @see [ban-tslint-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-tslint-comment.md)
13+
* @see [ban-tslint-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/ban-tslint-comment.md)
1414
*/
1515
export interface BanTslintCommentRule {
1616
/**
1717
* Bans `// tslint:<rule-flag>` comments from being used.
1818
*
19-
* @see [ban-tslint-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-tslint-comment.md)
19+
* @see [ban-tslint-comment](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/ban-tslint-comment.md)
2020
*/
2121
'@typescript-eslint/ban-tslint-comment': BanTslintCommentRuleConfig;
2222
}

src/rules/typescript-eslint/ban-types.d.ts

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,16 @@ import type { RuleConfig } from '../rule-config';
44
* Option.
55
*/
66
export interface BanTypesOption {
7-
/**
8-
* An object whose keys are the types you want to ban, and the values are error messages.
9-
*
10-
* @see [types](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md)
11-
*/
127
types?: {
138
[k: string]:
149
| null
1510
| boolean
1611
| string
1712
| {
18-
/**
19-
* The message to display when the type is matched.
20-
*
21-
* @see [types](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md)
22-
*/
2313
message?: string;
24-
/**
25-
* A string to replace the banned type with when the fixer is run. If this is omitted, no fix will be done.
26-
*
27-
* @see [types](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md)
28-
*/
2914
fixWith?: string;
3015
};
3116
};
32-
/**
33-
* If you're specifying custom `types`, you can set this to `true` to extend the default types configuration.
34-
*
35-
* @see [extendDefaults](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md)
36-
*/
3717
extendDefaults?: boolean;
3818
}
3919

@@ -45,20 +25,20 @@ export type BanTypesOptions = [BanTypesOption?];
4525
/**
4626
* Bans specific types from being used.
4727
*
48-
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-types.md)
28+
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/ban-types.md)
4929
*/
5030
export type BanTypesRuleConfig = RuleConfig<BanTypesOptions>;
5131

5232
/**
5333
* Bans specific types from being used.
5434
*
55-
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-types.md)
35+
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/ban-types.md)
5636
*/
5737
export interface BanTypesRule {
5838
/**
5939
* Bans specific types from being used.
6040
*
61-
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-types.md)
41+
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/ban-types.md)
6242
*/
6343
'@typescript-eslint/ban-types': BanTypesRuleConfig;
6444
}

src/rules/typescript-eslint/brace-style.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ export type BraceStyleOptions = [BraceStyleOption?, BraceStyleConfig?];
2020
/**
2121
* Enforce consistent brace style for blocks.
2222
*
23-
* @see [brace-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/brace-style.md)
23+
* @see [brace-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/brace-style.md)
2424
*/
2525
export type BraceStyleRuleConfig = RuleConfig<BraceStyleOptions>;
2626

2727
/**
2828
* Enforce consistent brace style for blocks.
2929
*
30-
* @see [brace-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/brace-style.md)
30+
* @see [brace-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/brace-style.md)
3131
*/
3232
export interface BraceStyleRule {
3333
/**
3434
* Enforce consistent brace style for blocks.
3535
*
36-
* @see [brace-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/brace-style.md)
36+
* @see [brace-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/brace-style.md)
3737
*/
3838
'@typescript-eslint/brace-style': BraceStyleRuleConfig;
3939
}

src/rules/typescript-eslint/class-literal-property-style.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ export type ClassLiteralPropertyStyleOptions = [ClassLiteralPropertyStyleOption?
1313
/**
1414
* Ensures that literals on classes are exposed in a consistent style.
1515
*
16-
* @see [class-literal-property-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/class-literal-property-style.md)
16+
* @see [class-literal-property-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/class-literal-property-style.md)
1717
*/
1818
export type ClassLiteralPropertyStyleRuleConfig = RuleConfig<ClassLiteralPropertyStyleOptions>;
1919

2020
/**
2121
* Ensures that literals on classes are exposed in a consistent style.
2222
*
23-
* @see [class-literal-property-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/class-literal-property-style.md)
23+
* @see [class-literal-property-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/class-literal-property-style.md)
2424
*/
2525
export interface ClassLiteralPropertyStyleRule {
2626
/**
2727
* Ensures that literals on classes are exposed in a consistent style.
2828
*
29-
* @see [class-literal-property-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/class-literal-property-style.md)
29+
* @see [class-literal-property-style](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/class-literal-property-style.md)
3030
*/
3131
'@typescript-eslint/class-literal-property-style': ClassLiteralPropertyStyleRuleConfig;
3232
}

src/rules/typescript-eslint/comma-dangle.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ export type CommaDangleOptions = CommaDangleOption;
2929
/**
3030
* Require or disallow trailing comma.
3131
*
32-
* @see [comma-dangle](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/comma-dangle.md)
32+
* @see [comma-dangle](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/comma-dangle.md)
3333
*/
3434
export type CommaDangleRuleConfig = RuleConfig<CommaDangleOptions>;
3535

3636
/**
3737
* Require or disallow trailing comma.
3838
*
39-
* @see [comma-dangle](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/comma-dangle.md)
39+
* @see [comma-dangle](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/comma-dangle.md)
4040
*/
4141
export interface CommaDangleRule {
4242
/**
4343
* Require or disallow trailing comma.
4444
*
45-
* @see [comma-dangle](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/comma-dangle.md)
45+
* @see [comma-dangle](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/comma-dangle.md)
4646
*/
4747
'@typescript-eslint/comma-dangle': CommaDangleRuleConfig;
4848
}

src/rules/typescript-eslint/comma-spacing.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ export type CommaSpacingOptions = [CommaSpacingOption?];
1616
/**
1717
* Enforces consistent spacing before and after commas.
1818
*
19-
* @see [comma-spacing](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/comma-spacing.md)
19+
* @see [comma-spacing](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/comma-spacing.md)
2020
*/
2121
export type CommaSpacingRuleConfig = RuleConfig<CommaSpacingOptions>;
2222

2323
/**
2424
* Enforces consistent spacing before and after commas.
2525
*
26-
* @see [comma-spacing](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/comma-spacing.md)
26+
* @see [comma-spacing](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/comma-spacing.md)
2727
*/
2828
export interface CommaSpacingRule {
2929
/**
3030
* Enforces consistent spacing before and after commas.
3131
*
32-
* @see [comma-spacing](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/comma-spacing.md)
32+
* @see [comma-spacing](https://github.com/typescript-eslint/typescript-eslint/blob/v5.3.0/packages/eslint-plugin/docs/rules/comma-spacing.md)
3333
*/
3434
'@typescript-eslint/comma-spacing': CommaSpacingRuleConfig;
3535
}

0 commit comments

Comments
 (0)