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

Commit 61533c0

Browse files
committed
Update rules
1 parent 0e81068 commit 61533c0

File tree

164 files changed

+728
-361
lines changed

Some content is hidden

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

164 files changed

+728
-361
lines changed

src/rules/eslint/camelcase.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export interface CamelcaseOption {
88
ignoreImports?: boolean;
99
ignoreGlobals?: boolean;
1010
properties?: 'always' | 'never';
11+
/**
12+
* @minItems 0
13+
*/
1114
allow?: [] | [string];
1215
}
1316

src/rules/eslint/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ import type { NoDuplicateImportsRule } from './no-duplicate-imports';
106106
import type { NoElseReturnRule } from './no-else-return';
107107
import type { NoEmptyRule } from './no-empty';
108108
import type { NoEmptyCharacterClassRule } from './no-empty-character-class';
109+
import type { NoEmptyFunctionRule } from './no-empty-function';
109110
import type { NoEmptyPatternRule } from './no-empty-pattern';
110111
import type { NoEqNullRule } from './no-eq-null';
111112
import type { NoEvalRule } from './no-eval';
@@ -395,6 +396,7 @@ export type EslintRules = AccessorPairsRule &
395396
NoElseReturnRule &
396397
NoEmptyRule &
397398
NoEmptyCharacterClassRule &
399+
NoEmptyFunctionRule &
398400
NoEmptyPatternRule &
399401
NoEqNullRule &
400402
NoEvalRule &

src/rules/eslint/no-console.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import type { RuleConfig } from '../rule-config';
44
* Option.
55
*/
66
export interface NoConsoleOption {
7+
/**
8+
* @minItems 1
9+
*/
710
allow?: [string, ...string[]];
811
}
912

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Option.
5+
*/
6+
export interface NoEmptyFunctionOption {
7+
allow?: (
8+
| 'functions'
9+
| 'arrowFunctions'
10+
| 'generatorFunctions'
11+
| 'methods'
12+
| 'generatorMethods'
13+
| 'getters'
14+
| 'setters'
15+
| 'constructors'
16+
| 'asyncFunctions'
17+
| 'asyncMethods'
18+
)[];
19+
}
20+
21+
/**
22+
* Options.
23+
*/
24+
export type NoEmptyFunctionOptions = [NoEmptyFunctionOption?];
25+
26+
/**
27+
* Disallow empty functions.
28+
*
29+
* @see [no-empty-function](https://eslint.org/docs/rules/no-empty-function)
30+
*/
31+
export type NoEmptyFunctionRuleConfig = RuleConfig<NoEmptyFunctionOptions>;
32+
33+
/**
34+
* Disallow empty functions.
35+
*
36+
* @see [no-empty-function](https://eslint.org/docs/rules/no-empty-function)
37+
*/
38+
export interface NoEmptyFunctionRule {
39+
/**
40+
* Disallow empty functions.
41+
*
42+
* @see [no-empty-function](https://eslint.org/docs/rules/no-empty-function)
43+
*/
44+
'no-empty-function': NoEmptyFunctionRuleConfig;
45+
}

src/rules/eslint/no-restricted-globals.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Option.
55
*/
6+
/**
7+
* @minItems 0
8+
*/
69
export type NoRestrictedGlobalsOption = (
710
| string
811
| {

src/rules/eslint/no-restricted-imports.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ export type NoRestrictedImportsOption =
2626
patterns?:
2727
| string[]
2828
| {
29+
/**
30+
* @minItems 1
31+
*/
32+
importNames?: [string, ...string[]];
33+
/**
34+
* @minItems 1
35+
*/
2936
group: [string, ...string[]];
3037
message?: string;
3138
caseSensitive?: boolean;

src/rules/eslint/no-restricted-syntax.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Option.
55
*/
6+
/**
7+
* @minItems 0
8+
*/
69
export type NoRestrictedSyntaxOption = (
710
| string
811
| {

src/rules/eslint/sort-imports.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import type { RuleConfig } from '../rule-config';
55
*/
66
export interface SortImportsOption {
77
ignoreCase?: boolean;
8+
/**
9+
* @minItems 4
10+
* @maxItems 4
11+
*/
812
memberSyntaxSortOrder?: [
913
'none' | 'all' | 'multiple' | 'single',
1014
'none' | 'all' | 'multiple' | 'single',

src/rules/import/imports-first.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Option.
55
*/
6-
export type FirstOption = 'absolute-first' | 'disable-absolute-first';
6+
export type ImportsFirstOption = 'absolute-first' | 'disable-absolute-first';
77

88
/**
99
* Options.
1010
*/
11-
export type ImportsFirstOptions = [FirstOption?];
11+
export type ImportsFirstOptions = [ImportsFirstOption?];
1212

1313
/**
1414
*

src/rules/import/no-absolute-path.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export interface NoAbsolutePathOption {
77
commonjs?: boolean;
88
amd?: boolean;
99
esmodule?: boolean;
10+
/**
11+
* @minItems 1
12+
*/
1013
ignore?: [string, ...string[]];
1114
}
1215

0 commit comments

Comments
 (0)