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

Commit 3cd3220

Browse files
committed
Update unicorn rules
1 parent 01fc310 commit 3cd3220

File tree

125 files changed

+380
-380
lines changed

Some content is hidden

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

125 files changed

+380
-380
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"eslint-plugin-promise": "~6.1.1",
7878
"eslint-plugin-sonarjs": "~0.18.0",
7979
"eslint-plugin-spellcheck": "~0.0.20",
80-
"eslint-plugin-unicorn": "~45.0.2",
80+
"eslint-plugin-unicorn": "~46.0.0",
8181
"eslint-plugin-vue": "~9.9.0",
8282
"eslint-plugin-vue-pug": "~0.5.5",
8383
"expect-type": "~0.15.0",

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ export type BetterRegexOptions = [BetterRegexOption?];
1515
/**
1616
* Improve regexes by making them shorter, consistent, and safer.
1717
*
18-
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/better-regex.md)
18+
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/better-regex.md)
1919
*/
2020
export type BetterRegexRuleConfig = RuleConfig<BetterRegexOptions>;
2121

2222
/**
2323
* Improve regexes by making them shorter, consistent, and safer.
2424
*
25-
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/better-regex.md)
25+
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/better-regex.md)
2626
*/
2727
export interface BetterRegexRule {
2828
/**
2929
* Improve regexes by making them shorter, consistent, and safer.
3030
*
31-
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/better-regex.md)
31+
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/better-regex.md)
3232
*/
3333
'unicorn/better-regex': BetterRegexRuleConfig;
3434
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ export type CatchErrorNameOptions = [CatchErrorNameOption?];
1616
/**
1717
* Enforce a specific parameter name in catch clauses.
1818
*
19-
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/catch-error-name.md)
19+
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/catch-error-name.md)
2020
*/
2121
export type CatchErrorNameRuleConfig = RuleConfig<CatchErrorNameOptions>;
2222

2323
/**
2424
* Enforce a specific parameter name in catch clauses.
2525
*
26-
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/catch-error-name.md)
26+
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/catch-error-name.md)
2727
*/
2828
export interface CatchErrorNameRule {
2929
/**
3030
* Enforce a specific parameter name in catch clauses.
3131
*
32-
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/catch-error-name.md)
32+
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/catch-error-name.md)
3333
*/
3434
'unicorn/catch-error-name': CatchErrorNameRuleConfig;
3535
}

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/v45.0.2/docs/rules/consistent-destructuring.md)
6+
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/consistent-destructuring.md)
13+
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/consistent-destructuring.md)
19+
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ export type ConsistentFunctionScopingOptions = [
1717
/**
1818
* Move function definitions to the highest possible scope.
1919
*
20-
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/consistent-function-scoping.md)
20+
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/consistent-function-scoping.md)
2121
*/
2222
export type ConsistentFunctionScopingRuleConfig =
2323
RuleConfig<ConsistentFunctionScopingOptions>;
2424

2525
/**
2626
* Move function definitions to the highest possible scope.
2727
*
28-
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/consistent-function-scoping.md)
28+
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/consistent-function-scoping.md)
2929
*/
3030
export interface ConsistentFunctionScopingRule {
3131
/**
3232
* Move function definitions to the highest possible scope.
3333
*
34-
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/consistent-function-scoping.md)
34+
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/consistent-function-scoping.md)
3535
*/
3636
'unicorn/consistent-function-scoping': ConsistentFunctionScopingRuleConfig;
3737
}

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/v45.0.2/docs/rules/custom-error-definition.md)
6+
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/custom-error-definition.md)
13+
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/custom-error-definition.md)
19+
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/empty-brace-spaces.md)
6+
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/empty-brace-spaces.md)
13+
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/empty-brace-spaces.md)
19+
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/error-message.md)
6+
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/error-message.md)
13+
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.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/v45.0.2/docs/rules/error-message.md)
19+
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/error-message.md)
2020
*/
2121
'unicorn/error-message': ErrorMessageRuleConfig;
2222
}

src/rules/unicorn/escape-case.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 escape sequences to use uppercase values.
55
*
6-
* @see [escape-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/escape-case.md)
6+
* @see [escape-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/escape-case.md)
77
*/
88
export type EscapeCaseRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Require escape sequences to use uppercase values.
1212
*
13-
* @see [escape-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/escape-case.md)
13+
* @see [escape-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/escape-case.md)
1414
*/
1515
export interface EscapeCaseRule {
1616
/**
1717
* Require escape sequences to use uppercase values.
1818
*
19-
* @see [escape-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v45.0.2/docs/rules/escape-case.md)
19+
* @see [escape-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v46.0.0/docs/rules/escape-case.md)
2020
*/
2121
'unicorn/escape-case': EscapeCaseRuleConfig;
2222
}

0 commit comments

Comments
 (0)