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

Commit 2a02741

Browse files
committed
Update typescript-eslint rules
1 parent f436d0b commit 2a02741

File tree

75 files changed

+255
-223
lines changed

Some content is hidden

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

75 files changed

+255
-223
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ export interface ArrayTypeOption {
1515
export type ArrayTypeOptions = [ArrayTypeOption?];
1616

1717
/**
18-
* Requires using either `T[]` or `Array<T>` for arrays.
18+
* Require using either `T[]` or `Array<T>` for arrays.
1919
*
2020
* @see [array-type](https://typescript-eslint.io/rules/array-type)
2121
*/
2222
export type ArrayTypeRuleConfig = RuleConfig<ArrayTypeOptions>;
2323

2424
/**
25-
* Requires using either `T[]` or `Array<T>` for arrays.
25+
* Require using either `T[]` or `Array<T>` for arrays.
2626
*
2727
* @see [array-type](https://typescript-eslint.io/rules/array-type)
2828
*/
2929
export interface ArrayTypeRule {
3030
/**
31-
* Requires using either `T[]` or `Array<T>` for arrays.
31+
* Require using either `T[]` or `Array<T>` for arrays.
3232
*
3333
* @see [array-type](https://typescript-eslint.io/rules/array-type)
3434
*/

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import type { RuleConfig } from '../rule-config';
22

33
/**
4-
* Disallows awaiting a value that is not a Thenable.
4+
* Disallow awaiting a value that is not a Thenable.
55
*
66
* @see [await-thenable](https://typescript-eslint.io/rules/await-thenable)
77
*/
88
export type AwaitThenableRuleConfig = RuleConfig<[]>;
99

1010
/**
11-
* Disallows awaiting a value that is not a Thenable.
11+
* Disallow awaiting a value that is not a Thenable.
1212
*
1313
* @see [await-thenable](https://typescript-eslint.io/rules/await-thenable)
1414
*/
1515
export interface AwaitThenableRule {
1616
/**
17-
* Disallows awaiting a value that is not a Thenable.
17+
* Disallow awaiting a value that is not a Thenable.
1818
*
1919
* @see [await-thenable](https://typescript-eslint.io/rules/await-thenable)
2020
*/

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

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,34 @@ import type { RuleConfig } from '../rule-config';
44
* Option.
55
*/
66
export interface BanTsCommentOption {
7-
'ts-expect-error'?: boolean | 'allow-with-description';
8-
'ts-ignore'?: boolean | 'allow-with-description';
9-
'ts-nocheck'?: boolean | 'allow-with-description';
10-
'ts-check'?: boolean | 'allow-with-description';
7+
'ts-expect-error'?:
8+
| boolean
9+
| 'allow-with-description'
10+
| {
11+
descriptionFormat?: string;
12+
[k: string]: any;
13+
};
14+
'ts-ignore'?:
15+
| boolean
16+
| 'allow-with-description'
17+
| {
18+
descriptionFormat?: string;
19+
[k: string]: any;
20+
};
21+
'ts-nocheck'?:
22+
| boolean
23+
| 'allow-with-description'
24+
| {
25+
descriptionFormat?: string;
26+
[k: string]: any;
27+
};
28+
'ts-check'?:
29+
| boolean
30+
| 'allow-with-description'
31+
| {
32+
descriptionFormat?: string;
33+
[k: string]: any;
34+
};
1135
minimumDescriptionLength?: number;
1236
}
1337

@@ -17,20 +41,20 @@ export interface BanTsCommentOption {
1741
export type BanTsCommentOptions = [BanTsCommentOption?];
1842

1943
/**
20-
* Bans `@ts-<directive>` comments from being used or requires descriptions after directive.
44+
* Disallow `@ts-<directive>` comments or require descriptions after directive.
2145
*
2246
* @see [ban-ts-comment](https://typescript-eslint.io/rules/ban-ts-comment)
2347
*/
2448
export type BanTsCommentRuleConfig = RuleConfig<BanTsCommentOptions>;
2549

2650
/**
27-
* Bans `@ts-<directive>` comments from being used or requires descriptions after directive.
51+
* Disallow `@ts-<directive>` comments or require descriptions after directive.
2852
*
2953
* @see [ban-ts-comment](https://typescript-eslint.io/rules/ban-ts-comment)
3054
*/
3155
export interface BanTsCommentRule {
3256
/**
33-
* Bans `@ts-<directive>` comments from being used or requires descriptions after directive.
57+
* Disallow `@ts-<directive>` comments or require descriptions after directive.
3458
*
3559
* @see [ban-ts-comment](https://typescript-eslint.io/rules/ban-ts-comment)
3660
*/

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import type { RuleConfig } from '../rule-config';
22

33
/**
4-
* Bans `// tslint:<rule-flag>` comments from being used.
4+
* Disallow `// tslint:<rule-flag>` comments.
55
*
66
* @see [ban-tslint-comment](https://typescript-eslint.io/rules/ban-tslint-comment)
77
*/
88
export type BanTslintCommentRuleConfig = RuleConfig<[]>;
99

1010
/**
11-
* Bans `// tslint:<rule-flag>` comments from being used.
11+
* Disallow `// tslint:<rule-flag>` comments.
1212
*
1313
* @see [ban-tslint-comment](https://typescript-eslint.io/rules/ban-tslint-comment)
1414
*/
1515
export interface BanTslintCommentRule {
1616
/**
17-
* Bans `// tslint:<rule-flag>` comments from being used.
17+
* Disallow `// tslint:<rule-flag>` comments.
1818
*
1919
* @see [ban-tslint-comment](https://typescript-eslint.io/rules/ban-tslint-comment)
2020
*/

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ export interface BanTypesOption {
2323
export type BanTypesOptions = [BanTypesOption?];
2424

2525
/**
26-
* Bans specific types from being used.
26+
* Disallow certain types.
2727
*
2828
* @see [ban-types](https://typescript-eslint.io/rules/ban-types)
2929
*/
3030
export type BanTypesRuleConfig = RuleConfig<BanTypesOptions>;
3131

3232
/**
33-
* Bans specific types from being used.
33+
* Disallow certain types.
3434
*
3535
* @see [ban-types](https://typescript-eslint.io/rules/ban-types)
3636
*/
3737
export interface BanTypesRule {
3838
/**
39-
* Bans specific types from being used.
39+
* Disallow certain types.
4040
*
4141
* @see [ban-types](https://typescript-eslint.io/rules/ban-types)
4242
*/

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,21 +13,21 @@ export type ClassLiteralPropertyStyleOptions = [
1313
];
1414

1515
/**
16-
* Ensures that literals on classes are exposed in a consistent style.
16+
* Enforce that literals on classes are exposed in a consistent style.
1717
*
1818
* @see [class-literal-property-style](https://typescript-eslint.io/rules/class-literal-property-style)
1919
*/
2020
export type ClassLiteralPropertyStyleRuleConfig =
2121
RuleConfig<ClassLiteralPropertyStyleOptions>;
2222

2323
/**
24-
* Ensures that literals on classes are exposed in a consistent style.
24+
* Enforce that literals on classes are exposed in a consistent style.
2525
*
2626
* @see [class-literal-property-style](https://typescript-eslint.io/rules/class-literal-property-style)
2727
*/
2828
export interface ClassLiteralPropertyStyleRule {
2929
/**
30-
* Ensures that literals on classes are exposed in a consistent style.
30+
* Enforce that literals on classes are exposed in a consistent style.
3131
*
3232
* @see [class-literal-property-style](https://typescript-eslint.io/rules/class-literal-property-style)
3333
*/

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ export type ValueWithIgnore =
3232
export type CommaDangleOptions = CommaDangleOption;
3333

3434
/**
35-
* Require or disallow trailing comma.
35+
* Require or disallow trailing commas.
3636
*
3737
* @see [comma-dangle](https://typescript-eslint.io/rules/comma-dangle)
3838
*/
3939
export type CommaDangleRuleConfig = RuleConfig<CommaDangleOptions>;
4040

4141
/**
42-
* Require or disallow trailing comma.
42+
* Require or disallow trailing commas.
4343
*
4444
* @see [comma-dangle](https://typescript-eslint.io/rules/comma-dangle)
4545
*/
4646
export interface CommaDangleRule {
4747
/**
48-
* Require or disallow trailing comma.
48+
* Require or disallow trailing commas.
4949
*
5050
* @see [comma-dangle](https://typescript-eslint.io/rules/comma-dangle)
5151
*/

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ export interface CommaSpacingOption {
1414
export type CommaSpacingOptions = [CommaSpacingOption?];
1515

1616
/**
17-
* Enforces consistent spacing before and after commas.
17+
* Enforce consistent spacing before and after commas.
1818
*
1919
* @see [comma-spacing](https://typescript-eslint.io/rules/comma-spacing)
2020
*/
2121
export type CommaSpacingRuleConfig = RuleConfig<CommaSpacingOptions>;
2222

2323
/**
24-
* Enforces consistent spacing before and after commas.
24+
* Enforce consistent spacing before and after commas.
2525
*
2626
* @see [comma-spacing](https://typescript-eslint.io/rules/comma-spacing)
2727
*/
2828
export interface CommaSpacingRule {
2929
/**
30-
* Enforces consistent spacing before and after commas.
30+
* Enforce consistent spacing before and after commas.
3131
*
3232
* @see [comma-spacing](https://typescript-eslint.io/rules/comma-spacing)
3333
*/

src/rules/typescript-eslint/consistent-indexed-object-style.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ export type ConsistentIndexedObjectStyleOptions = [
1313
];
1414

1515
/**
16-
* Enforce or disallow the use of the record type.
16+
* Require or disallow the `Record` type.
1717
*
1818
* @see [consistent-indexed-object-style](https://typescript-eslint.io/rules/consistent-indexed-object-style)
1919
*/
2020
export type ConsistentIndexedObjectStyleRuleConfig =
2121
RuleConfig<ConsistentIndexedObjectStyleOptions>;
2222

2323
/**
24-
* Enforce or disallow the use of the record type.
24+
* Require or disallow the `Record` type.
2525
*
2626
* @see [consistent-indexed-object-style](https://typescript-eslint.io/rules/consistent-indexed-object-style)
2727
*/
2828
export interface ConsistentIndexedObjectStyleRule {
2929
/**
30-
* Enforce or disallow the use of the record type.
30+
* Require or disallow the `Record` type.
3131
*
3232
* @see [consistent-indexed-object-style](https://typescript-eslint.io/rules/consistent-indexed-object-style)
3333
*/

src/rules/typescript-eslint/consistent-type-assertions.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ export type ConsistentTypeAssertionsOption =
1818
export type ConsistentTypeAssertionsOptions = [ConsistentTypeAssertionsOption?];
1919

2020
/**
21-
* Enforces consistent usage of type assertions.
21+
* Enforce consistent usage of type assertions.
2222
*
2323
* @see [consistent-type-assertions](https://typescript-eslint.io/rules/consistent-type-assertions)
2424
*/
2525
export type ConsistentTypeAssertionsRuleConfig =
2626
RuleConfig<ConsistentTypeAssertionsOptions>;
2727

2828
/**
29-
* Enforces consistent usage of type assertions.
29+
* Enforce consistent usage of type assertions.
3030
*
3131
* @see [consistent-type-assertions](https://typescript-eslint.io/rules/consistent-type-assertions)
3232
*/
3333
export interface ConsistentTypeAssertionsRule {
3434
/**
35-
* Enforces consistent usage of type assertions.
35+
* Enforce consistent usage of type assertions.
3636
*
3737
* @see [consistent-type-assertions](https://typescript-eslint.io/rules/consistent-type-assertions)
3838
*/

0 commit comments

Comments
 (0)