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

Commit 0815bc8

Browse files
committed
Update generated rules
1 parent 96484b6 commit 0815bc8

File tree

113 files changed

+506
-322
lines changed

Some content is hidden

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

113 files changed

+506
-322
lines changed

src/rules/eslint/indent.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export interface IndentConfig {
2222
parameters?: number | ('first' | 'off');
2323
body?: number;
2424
};
25+
StaticBlock?: {
26+
body?: number;
27+
};
2528
CallExpression?: {
2629
arguments?: number | ('first' | 'off');
2730
};

src/rules/eslint/require-atomic-updates.d.ts

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

3+
/**
4+
* Option.
5+
*/
6+
export interface RequireAtomicUpdatesOption {
7+
allowProperties?: boolean;
8+
}
9+
10+
/**
11+
* Options.
12+
*/
13+
export type RequireAtomicUpdatesOptions = [RequireAtomicUpdatesOption?];
14+
315
/**
416
* Disallow assignments that can lead to race conditions due to usage of `await` or `yield`.
517
*
618
* @see [require-atomic-updates](https://eslint.org/docs/rules/require-atomic-updates)
719
*/
8-
export type RequireAtomicUpdatesRuleConfig = RuleConfig<[]>;
20+
export type RequireAtomicUpdatesRuleConfig = RuleConfig<RequireAtomicUpdatesOptions>;
921

1022
/**
1123
* Disallow assignments that can lead to race conditions due to usage of `await` or `yield`.

src/rules/typescript-eslint/indent.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export interface IndentConfig {
2222
parameters?: number | ('first' | 'off');
2323
body?: number;
2424
};
25+
StaticBlock?: {
26+
body?: number;
27+
};
2528
CallExpression?: {
2629
arguments?: number | ('first' | 'off');
2730
};

src/rules/unicorn/better-regex.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { RuleConfig } from '../rule-config';
55
*/
66
export interface BetterRegexOption {
77
sortCharacterClasses?: boolean;
8-
[k: string]: any;
98
}
109

1110
/**
@@ -16,20 +15,20 @@ export type BetterRegexOptions = [BetterRegexOption?];
1615
/**
1716
* Improve regexes by making them shorter, consistent, and safer.
1817
*
19-
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/better-regex.md)
18+
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/better-regex.md)
2019
*/
2120
export type BetterRegexRuleConfig = RuleConfig<BetterRegexOptions>;
2221

2322
/**
2423
* Improve regexes by making them shorter, consistent, and safer.
2524
*
26-
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/better-regex.md)
25+
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/better-regex.md)
2726
*/
2827
export interface BetterRegexRule {
2928
/**
3029
* Improve regexes by making them shorter, consistent, and safer.
3130
*
32-
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/better-regex.md)
31+
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/better-regex.md)
3332
*/
3433
'unicorn/better-regex': BetterRegexRuleConfig;
3534
}

src/rules/unicorn/catch-error-name.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import type { RuleConfig } from '../rule-config';
66
export interface CatchErrorNameOption {
77
name?: string;
88
ignore?: any[];
9-
[k: string]: any;
109
}
1110

1211
/**
@@ -17,20 +16,20 @@ export type CatchErrorNameOptions = [CatchErrorNameOption?];
1716
/**
1817
* Enforce a specific parameter name in catch clauses.
1918
*
20-
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/catch-error-name.md)
19+
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/catch-error-name.md)
2120
*/
2221
export type CatchErrorNameRuleConfig = RuleConfig<CatchErrorNameOptions>;
2322

2423
/**
2524
* Enforce a specific parameter name in catch clauses.
2625
*
27-
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/catch-error-name.md)
26+
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/catch-error-name.md)
2827
*/
2928
export interface CatchErrorNameRule {
3029
/**
3130
* Enforce a specific parameter name in catch clauses.
3231
*
33-
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/catch-error-name.md)
32+
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/catch-error-name.md)
3433
*/
3534
'unicorn/catch-error-name': CatchErrorNameRuleConfig;
3635
}

src/rules/unicorn/consistent-destructuring.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
* Use destructured variables over properties.
55
*
6-
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/consistent-destructuring.md)
6+
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/consistent-destructuring.md)
77
*/
88
export type ConsistentDestructuringRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Use destructured variables over properties.
1212
*
13-
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/consistent-destructuring.md)
13+
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/consistent-destructuring.md)
1414
*/
1515
export interface ConsistentDestructuringRule {
1616
/**
1717
* Use destructured variables over properties.
1818
*
19-
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/consistent-destructuring.md)
19+
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/consistent-destructuring.md)
2020
*/
2121
'unicorn/consistent-destructuring': ConsistentDestructuringRuleConfig;
2222
}

src/rules/unicorn/consistent-function-scoping.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { RuleConfig } from '../rule-config';
55
*/
66
export interface ConsistentFunctionScopingOption {
77
checkArrowFunctions?: boolean;
8-
[k: string]: any;
98
}
109

1110
/**
@@ -16,20 +15,20 @@ export type ConsistentFunctionScopingOptions = [ConsistentFunctionScopingOption?
1615
/**
1716
* Move function definitions to the highest possible scope.
1817
*
19-
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/consistent-function-scoping.md)
18+
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/consistent-function-scoping.md)
2019
*/
2120
export type ConsistentFunctionScopingRuleConfig = RuleConfig<ConsistentFunctionScopingOptions>;
2221

2322
/**
2423
* Move function definitions to the highest possible scope.
2524
*
26-
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/consistent-function-scoping.md)
25+
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/consistent-function-scoping.md)
2726
*/
2827
export interface ConsistentFunctionScopingRule {
2928
/**
3029
* Move function definitions to the highest possible scope.
3130
*
32-
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/consistent-function-scoping.md)
31+
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/consistent-function-scoping.md)
3332
*/
3433
'unicorn/consistent-function-scoping': ConsistentFunctionScopingRuleConfig;
3534
}

src/rules/unicorn/custom-error-definition.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
* Enforce correct `Error` subclassing.
55
*
6-
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/custom-error-definition.md)
6+
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/custom-error-definition.md)
77
*/
88
export type CustomErrorDefinitionRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Enforce correct `Error` subclassing.
1212
*
13-
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/custom-error-definition.md)
13+
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/custom-error-definition.md)
1414
*/
1515
export interface CustomErrorDefinitionRule {
1616
/**
1717
* Enforce correct `Error` subclassing.
1818
*
19-
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/custom-error-definition.md)
19+
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/custom-error-definition.md)
2020
*/
2121
'unicorn/custom-error-definition': CustomErrorDefinitionRuleConfig;
2222
}

src/rules/unicorn/empty-brace-spaces.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
* Enforce no spaces between braces.
55
*
6-
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/empty-brace-spaces.md)
6+
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/empty-brace-spaces.md)
77
*/
88
export type EmptyBraceSpacesRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Enforce no spaces between braces.
1212
*
13-
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/empty-brace-spaces.md)
13+
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/empty-brace-spaces.md)
1414
*/
1515
export interface EmptyBraceSpacesRule {
1616
/**
1717
* Enforce no spaces between braces.
1818
*
19-
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/empty-brace-spaces.md)
19+
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/empty-brace-spaces.md)
2020
*/
2121
'unicorn/empty-brace-spaces': EmptyBraceSpacesRuleConfig;
2222
}

src/rules/unicorn/error-message.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
* Enforce passing a `message` value when creating a built-in error.
55
*
6-
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/error-message.md)
6+
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/error-message.md)
77
*/
88
export type ErrorMessageRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Enforce passing a `message` value when creating a built-in error.
1212
*
13-
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/error-message.md)
13+
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/error-message.md)
1414
*/
1515
export interface ErrorMessageRule {
1616
/**
1717
* Enforce passing a `message` value when creating a built-in error.
1818
*
19-
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v38.0.1/docs/rules/error-message.md)
19+
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v39.0.0/docs/rules/error-message.md)
2020
*/
2121
'unicorn/error-message': ErrorMessageRuleConfig;
2222
}

0 commit comments

Comments
 (0)