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

Commit 293b598

Browse files
committed
Update lint rules
1 parent cad107e commit 293b598

File tree

232 files changed

+1101
-670
lines changed

Some content is hidden

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

232 files changed

+1101
-670
lines changed

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
set -x
2+
set -ex
33

44
# Cleanup
55
rm -Rf dist

src/rules/eslint/class-methods-use-this.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { RuleConfig } from '../rule-config';
55
*/
66
export interface ClassMethodsUseThisOption {
77
exceptMethods?: string[];
8+
enforceForClassFields?: boolean;
89
}
910

1011
/**

src/rules/eslint/id-match.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { RuleConfig } from '../rule-config';
55
*/
66
export interface IdMatchConfig {
77
properties?: boolean;
8+
classFields?: boolean;
89
onlyDeclarations?: boolean;
910
ignoreDestructuring?: boolean;
1011
}

src/rules/eslint/max-classes-per-file.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Option.
55
*/
6-
export type MaxClassesPerFileOption = number;
6+
export type MaxClassesPerFileOption =
7+
| number
8+
| {
9+
ignoreExpressions?: boolean;
10+
max?: number;
11+
};
712

813
/**
914
* Options.

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/v4.31.2/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
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)
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/v4.31.2/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
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)
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/v4.31.2/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
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)
2020
*/
2121
'@typescript-eslint/adjacent-overload-signatures': AdjacentOverloadSignaturesRuleConfig;
2222
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ export type ArrayTypeOptions = [ArrayTypeOption?];
2929
/**
3030
* Requires using either `T[]` or `Array<T>` for arrays.
3131
*
32-
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v4.31.2/packages/eslint-plugin/docs/rules/array-type.md)
32+
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/array-type.md)
3333
*/
3434
export type ArrayTypeRuleConfig = RuleConfig<ArrayTypeOptions>;
3535

3636
/**
3737
* Requires using either `T[]` or `Array<T>` for arrays.
3838
*
39-
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v4.31.2/packages/eslint-plugin/docs/rules/array-type.md)
39+
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/array-type.md)
4040
*/
4141
export interface ArrayTypeRule {
4242
/**
4343
* Requires using either `T[]` or `Array<T>` for arrays.
4444
*
45-
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v4.31.2/packages/eslint-plugin/docs/rules/array-type.md)
45+
* @see [array-type](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/array-type.md)
4646
*/
4747
'@typescript-eslint/array-type': ArrayTypeRuleConfig;
4848
}

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/v4.31.2/packages/eslint-plugin/docs/rules/await-thenable.md)
6+
* @see [await-thenable](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.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/v4.31.2/packages/eslint-plugin/docs/rules/await-thenable.md)
13+
* @see [await-thenable](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.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/v4.31.2/packages/eslint-plugin/docs/rules/await-thenable.md)
19+
* @see [await-thenable](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.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/v4.31.2/packages/eslint-plugin/docs/rules/ban-ts-comment.md)
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)
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/v4.31.2/packages/eslint-plugin/docs/rules/ban-ts-comment.md)
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)
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/v4.31.2/packages/eslint-plugin/docs/rules/ban-ts-comment.md)
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)
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/v4.31.2/packages/eslint-plugin/docs/rules/ban-tslint-comment.md)
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)
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/v4.31.2/packages/eslint-plugin/docs/rules/ban-tslint-comment.md)
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)
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/v4.31.2/packages/eslint-plugin/docs/rules/ban-tslint-comment.md)
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)
2020
*/
2121
'@typescript-eslint/ban-tslint-comment': BanTslintCommentRuleConfig;
2222
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ export type BanTypesOptions = [BanTypesOption?];
4545
/**
4646
* Bans specific types from being used.
4747
*
48-
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v4.31.2/packages/eslint-plugin/docs/rules/ban-types.md)
48+
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-types.md)
4949
*/
5050
export type BanTypesRuleConfig = RuleConfig<BanTypesOptions>;
5151

5252
/**
5353
* Bans specific types from being used.
5454
*
55-
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v4.31.2/packages/eslint-plugin/docs/rules/ban-types.md)
55+
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-types.md)
5656
*/
5757
export interface BanTypesRule {
5858
/**
5959
* Bans specific types from being used.
6060
*
61-
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v4.31.2/packages/eslint-plugin/docs/rules/ban-types.md)
61+
* @see [ban-types](https://github.com/typescript-eslint/typescript-eslint/blob/v5.0.0/packages/eslint-plugin/docs/rules/ban-types.md)
6262
*/
6363
'@typescript-eslint/ban-types': BanTypesRuleConfig;
6464
}

0 commit comments

Comments
 (0)