@lincy/eslint-config 6.4.0 → 6.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.cjs +101 -53
- package/dist/index.d.cts +348 -183
- package/dist/index.d.mts +348 -183
- package/dist/index.mjs +98 -49
- package/package.json +43 -43
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ import { Linter } from "eslint";
|
|
|
2
2
|
import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
3
3
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
4
4
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
5
|
+
import { ConfigWithExtends, FlatConfigComposer } from "eslint-flat-config-utils";
|
|
5
6
|
import { Options } from "eslint-processor-vue-blocks";
|
|
6
|
-
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
7
7
|
|
|
8
8
|
//#region src/typegen.d.ts
|
|
9
9
|
interface RuleOptions {
|
|
@@ -285,6 +285,10 @@ interface RuleOptions {
|
|
|
285
285
|
* Use dprint to format code
|
|
286
286
|
*/
|
|
287
287
|
'format/dprint'?: Linter.RuleEntry<FormatDprint>;
|
|
288
|
+
/**
|
|
289
|
+
* Use oxfmt to format code
|
|
290
|
+
*/
|
|
291
|
+
'format/oxfmt'?: Linter.RuleEntry<FormatOxfmt>;
|
|
288
292
|
/**
|
|
289
293
|
* Use Prettier to format code
|
|
290
294
|
*/
|
|
@@ -2242,6 +2246,11 @@ interface RuleOptions {
|
|
|
2242
2246
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/console.md
|
|
2243
2247
|
*/
|
|
2244
2248
|
'node/prefer-global/console'?: Linter.RuleEntry<NodePreferGlobalConsole>;
|
|
2249
|
+
/**
|
|
2250
|
+
* enforce either `crypto` or `require("crypto").webcrypto`
|
|
2251
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/crypto.md
|
|
2252
|
+
*/
|
|
2253
|
+
'node/prefer-global/crypto'?: Linter.RuleEntry<NodePreferGlobalCrypto>;
|
|
2245
2254
|
/**
|
|
2246
2255
|
* enforce either `process` or `require("process")`
|
|
2247
2256
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/process.md
|
|
@@ -2257,6 +2266,11 @@ interface RuleOptions {
|
|
|
2257
2266
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-encoder.md
|
|
2258
2267
|
*/
|
|
2259
2268
|
'node/prefer-global/text-encoder'?: Linter.RuleEntry<NodePreferGlobalTextEncoder>;
|
|
2269
|
+
/**
|
|
2270
|
+
* enforce either global timer functions or `require("timers")`
|
|
2271
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/timers.md
|
|
2272
|
+
*/
|
|
2273
|
+
'node/prefer-global/timers'?: Linter.RuleEntry<NodePreferGlobalTimers>;
|
|
2260
2274
|
/**
|
|
2261
2275
|
* enforce either `URL` or `require("url").URL`
|
|
2262
2276
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url.md
|
|
@@ -2555,7 +2569,7 @@ interface RuleOptions {
|
|
|
2555
2569
|
*/
|
|
2556
2570
|
'quotes'?: Linter.RuleEntry<Quotes>;
|
|
2557
2571
|
/**
|
|
2558
|
-
* Enforce the
|
|
2572
|
+
* Enforce the use of the radix argument when using `parseInt()`
|
|
2559
2573
|
* @see https://eslint.org/docs/latest/rules/radix
|
|
2560
2574
|
*/
|
|
2561
2575
|
'radix'?: Linter.RuleEntry<Radix>;
|
|
@@ -2625,7 +2639,7 @@ interface RuleOptions {
|
|
|
2625
2639
|
*/
|
|
2626
2640
|
'react-dom/no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>;
|
|
2627
2641
|
/**
|
|
2628
|
-
* Enforces 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
|
|
2642
|
+
* Enforces that the 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
|
|
2629
2643
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
2630
2644
|
*/
|
|
2631
2645
|
'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
@@ -2792,6 +2806,11 @@ interface RuleOptions {
|
|
|
2792
2806
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
|
|
2793
2807
|
*/
|
|
2794
2808
|
'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>;
|
|
2809
|
+
/**
|
|
2810
|
+
* Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
|
|
2811
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
|
|
2812
|
+
*/
|
|
2813
|
+
'react-naming-convention/id-name'?: Linter.RuleEntry<[]>;
|
|
2795
2814
|
/**
|
|
2796
2815
|
* Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'.
|
|
2797
2816
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
|
|
@@ -2803,6 +2822,11 @@ interface RuleOptions {
|
|
|
2803
2822
|
*/
|
|
2804
2823
|
'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>;
|
|
2805
2824
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
2825
|
+
/**
|
|
2826
|
+
* Validate and transform React Client/Server Function definitions.
|
|
2827
|
+
* @see https://eslint-react.xyz/docs/rules/function-definition
|
|
2828
|
+
*/
|
|
2829
|
+
'react-rsc/function-definition'?: Linter.RuleEntry<[]>;
|
|
2806
2830
|
/**
|
|
2807
2831
|
* Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'.
|
|
2808
2832
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
@@ -2824,12 +2848,12 @@ interface RuleOptions {
|
|
|
2824
2848
|
*/
|
|
2825
2849
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
2826
2850
|
/**
|
|
2827
|
-
* Prevents
|
|
2851
|
+
* Prevents unintentional '$' sign before expression.
|
|
2828
2852
|
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
2829
2853
|
*/
|
|
2830
2854
|
'react/jsx-dollar'?: Linter.RuleEntry<[]>;
|
|
2831
2855
|
/**
|
|
2832
|
-
* Enforces
|
|
2856
|
+
* Enforces 'key' prop placement before spread props.
|
|
2833
2857
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
2834
2858
|
*/
|
|
2835
2859
|
'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>;
|
|
@@ -2844,7 +2868,7 @@ interface RuleOptions {
|
|
|
2844
2868
|
*/
|
|
2845
2869
|
'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>;
|
|
2846
2870
|
/**
|
|
2847
|
-
* Disallows
|
|
2871
|
+
* Disallows immediately-invoked function expressions in JSX.
|
|
2848
2872
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-iife
|
|
2849
2873
|
*/
|
|
2850
2874
|
'react/jsx-no-iife'?: Linter.RuleEntry<[]>;
|
|
@@ -2854,12 +2878,12 @@ interface RuleOptions {
|
|
|
2854
2878
|
*/
|
|
2855
2879
|
'react/jsx-no-undef'?: Linter.RuleEntry<[]>;
|
|
2856
2880
|
/**
|
|
2857
|
-
* Enforces
|
|
2881
|
+
* Enforces shorthand syntax for boolean props.
|
|
2858
2882
|
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
|
|
2859
2883
|
*/
|
|
2860
2884
|
'react/jsx-shorthand-boolean'?: Linter.RuleEntry<ReactJsxShorthandBoolean>;
|
|
2861
2885
|
/**
|
|
2862
|
-
* Enforces
|
|
2886
|
+
* Enforces shorthand syntax for fragment elements.
|
|
2863
2887
|
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
|
|
2864
2888
|
*/
|
|
2865
2889
|
'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>;
|
|
@@ -2869,7 +2893,7 @@ interface RuleOptions {
|
|
|
2869
2893
|
*/
|
|
2870
2894
|
'react/jsx-uses-react'?: Linter.RuleEntry<[]>;
|
|
2871
2895
|
/**
|
|
2872
|
-
* Marks
|
|
2896
|
+
* Marks JSX element variables as used.
|
|
2873
2897
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
2874
2898
|
*/
|
|
2875
2899
|
'react/jsx-uses-vars'?: Linter.RuleEntry<[]>;
|
|
@@ -2959,7 +2983,7 @@ interface RuleOptions {
|
|
|
2959
2983
|
*/
|
|
2960
2984
|
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
2961
2985
|
/**
|
|
2962
|
-
*
|
|
2986
|
+
* Prevents duplicate 'key' props on sibling elements when rendering lists.
|
|
2963
2987
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
2964
2988
|
*/
|
|
2965
2989
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
@@ -2975,7 +2999,7 @@ interface RuleOptions {
|
|
|
2975
2999
|
*/
|
|
2976
3000
|
'react/no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
2977
3001
|
/**
|
|
2978
|
-
* Prevents
|
|
3002
|
+
* Prevents implicitly passing the 'key' prop to components.
|
|
2979
3003
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
2980
3004
|
*/
|
|
2981
3005
|
'react/no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
@@ -2985,12 +3009,12 @@ interface RuleOptions {
|
|
|
2985
3009
|
*/
|
|
2986
3010
|
'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
2987
3011
|
/**
|
|
2988
|
-
* Enforces that all components have a 'displayName' that can be used in
|
|
3012
|
+
* Enforces that all components have a 'displayName' that can be used in DevTools.
|
|
2989
3013
|
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
2990
3014
|
*/
|
|
2991
3015
|
'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
2992
3016
|
/**
|
|
2993
|
-
* Enforces that all contexts have a 'displayName' that can be used in
|
|
3017
|
+
* Enforces that all contexts have a 'displayName' that can be used in DevTools.
|
|
2994
3018
|
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
2995
3019
|
*/
|
|
2996
3020
|
'react/no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
@@ -3045,7 +3069,7 @@ interface RuleOptions {
|
|
|
3045
3069
|
*/
|
|
3046
3070
|
'react/no-string-refs'?: Linter.RuleEntry<[]>;
|
|
3047
3071
|
/**
|
|
3048
|
-
* Disallows unnecessary 'key' props on elements.
|
|
3072
|
+
* Disallows unnecessary 'key' props on nested child elements when rendering lists.
|
|
3049
3073
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
|
|
3050
3074
|
*/
|
|
3051
3075
|
'react/no-unnecessary-key'?: Linter.RuleEntry<[]>;
|
|
@@ -3724,6 +3748,11 @@ interface RuleOptions {
|
|
|
3724
3748
|
* @see https://eslint.style/rules/eol-last
|
|
3725
3749
|
*/
|
|
3726
3750
|
'style/eol-last'?: Linter.RuleEntry<StyleEolLast>;
|
|
3751
|
+
/**
|
|
3752
|
+
* Enforce consistent line break styles for JSX props
|
|
3753
|
+
* @see https://eslint.style/rules/jsx-props-style
|
|
3754
|
+
*/
|
|
3755
|
+
'style/exp-jsx-props-style'?: Linter.RuleEntry<StyleExpJsxPropsStyle>;
|
|
3727
3756
|
/**
|
|
3728
3757
|
* Enforce consistent spacing and line break styles inside brackets.
|
|
3729
3758
|
* @see https://eslint.style/rules/list-style
|
|
@@ -4596,11 +4625,21 @@ interface RuleOptions {
|
|
|
4596
4625
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/indent.html
|
|
4597
4626
|
*/
|
|
4598
4627
|
'toml/indent'?: Linter.RuleEntry<TomlIndent>;
|
|
4628
|
+
/**
|
|
4629
|
+
* enforce linebreaks after opening and before closing braces
|
|
4630
|
+
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-newline.html
|
|
4631
|
+
*/
|
|
4632
|
+
'toml/inline-table-curly-newline'?: Linter.RuleEntry<TomlInlineTableCurlyNewline>;
|
|
4599
4633
|
/**
|
|
4600
4634
|
* enforce consistent spacing inside braces
|
|
4601
4635
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-spacing.html
|
|
4602
4636
|
*/
|
|
4603
4637
|
'toml/inline-table-curly-spacing'?: Linter.RuleEntry<TomlInlineTableCurlySpacing>;
|
|
4638
|
+
/**
|
|
4639
|
+
* enforce placing inline table key-value pairs on separate lines
|
|
4640
|
+
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-key-value-newline.html
|
|
4641
|
+
*/
|
|
4642
|
+
'toml/inline-table-key-value-newline'?: Linter.RuleEntry<TomlInlineTableKeyValueNewline>;
|
|
4604
4643
|
/**
|
|
4605
4644
|
* enforce consistent spacing between keys and values in key/value pairs
|
|
4606
4645
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/key-spacing.html
|
|
@@ -5149,7 +5188,7 @@ interface RuleOptions {
|
|
|
5149
5188
|
* Disallow default values that will never be used
|
|
5150
5189
|
* @see https://typescript-eslint.io/rules/no-useless-default-assignment
|
|
5151
5190
|
*/
|
|
5152
|
-
'ts/no-useless-default-assignment'?: Linter.RuleEntry<
|
|
5191
|
+
'ts/no-useless-default-assignment'?: Linter.RuleEntry<TsNoUselessDefaultAssignment>;
|
|
5153
5192
|
/**
|
|
5154
5193
|
* Disallow empty exports that don't change anything in a module file
|
|
5155
5194
|
* @see https://typescript-eslint.io/rules/no-useless-empty-export
|
|
@@ -5366,725 +5405,730 @@ interface RuleOptions {
|
|
|
5366
5405
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5367
5406
|
/**
|
|
5368
5407
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md
|
|
5370
5409
|
*/
|
|
5371
5410
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5372
5411
|
/**
|
|
5373
5412
|
* Enforce a specific parameter name in catch clauses.
|
|
5374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md
|
|
5375
5414
|
*/
|
|
5376
5415
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5377
5416
|
/**
|
|
5378
5417
|
* Enforce consistent assertion style with `node:assert`.
|
|
5379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md
|
|
5380
5419
|
*/
|
|
5381
5420
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5382
5421
|
/**
|
|
5383
5422
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md
|
|
5385
5424
|
*/
|
|
5386
5425
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5387
5426
|
/**
|
|
5388
5427
|
* Use destructured variables over properties.
|
|
5389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md
|
|
5390
5429
|
*/
|
|
5391
5430
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5392
5431
|
/**
|
|
5393
5432
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5395
5434
|
*/
|
|
5396
5435
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5397
5436
|
/**
|
|
5398
5437
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md
|
|
5400
5439
|
*/
|
|
5401
5440
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5402
5441
|
/**
|
|
5403
5442
|
* Move function definitions to the highest possible scope.
|
|
5404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md
|
|
5405
5444
|
*/
|
|
5406
5445
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5407
5446
|
/**
|
|
5408
5447
|
* Enforce correct `Error` subclassing.
|
|
5409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md
|
|
5410
5449
|
*/
|
|
5411
5450
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5412
5451
|
/**
|
|
5413
5452
|
* Enforce no spaces between braces.
|
|
5414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md
|
|
5415
5454
|
*/
|
|
5416
5455
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5417
5456
|
/**
|
|
5418
5457
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md
|
|
5420
5459
|
*/
|
|
5421
5460
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5422
5461
|
/**
|
|
5423
5462
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md
|
|
5425
5464
|
*/
|
|
5426
5465
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5427
5466
|
/**
|
|
5428
5467
|
* Add expiration conditions to TODO comments.
|
|
5429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md
|
|
5430
5469
|
*/
|
|
5431
5470
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5432
5471
|
/**
|
|
5433
5472
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md
|
|
5435
5474
|
*/
|
|
5436
5475
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5437
5476
|
/**
|
|
5438
5477
|
* Enforce a case style for filenames.
|
|
5439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md
|
|
5440
5479
|
*/
|
|
5441
5480
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5442
5481
|
/**
|
|
5443
5482
|
* Enforce specific import styles per module.
|
|
5444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md
|
|
5445
5484
|
*/
|
|
5446
5485
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5486
|
+
/**
|
|
5487
|
+
* Prevent usage of variables from outside the scope of isolated functions.
|
|
5488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
|
|
5489
|
+
*/
|
|
5490
|
+
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
5447
5491
|
/**
|
|
5448
5492
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md
|
|
5450
5494
|
*/
|
|
5451
5495
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5452
5496
|
/**
|
|
5453
5497
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5455
5499
|
*/
|
|
5456
5500
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5457
5501
|
/**
|
|
5458
5502
|
* Disallow recursive access to `this` within getters and setters.
|
|
5459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md
|
|
5460
5504
|
*/
|
|
5461
5505
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5462
5506
|
/**
|
|
5463
5507
|
* Disallow anonymous functions and classes as the default export.
|
|
5464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md
|
|
5465
5509
|
*/
|
|
5466
5510
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5467
5511
|
/**
|
|
5468
5512
|
* Prevent passing a function reference directly to iterator methods.
|
|
5469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md
|
|
5470
5514
|
*/
|
|
5471
5515
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5472
5516
|
/**
|
|
5473
5517
|
* Prefer `for…of` over the `forEach` method.
|
|
5474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md
|
|
5475
5519
|
*/
|
|
5476
5520
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5477
5521
|
/**
|
|
5478
5522
|
* Disallow using the `this` argument in array methods.
|
|
5479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md
|
|
5480
5524
|
*/
|
|
5481
5525
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5482
5526
|
/**
|
|
5483
5527
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
5485
5529
|
* @deprecated
|
|
5486
5530
|
*/
|
|
5487
5531
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5488
5532
|
/**
|
|
5489
5533
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md
|
|
5491
5535
|
*/
|
|
5492
5536
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5493
5537
|
/**
|
|
5494
5538
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md
|
|
5496
5540
|
*/
|
|
5497
5541
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5498
5542
|
/**
|
|
5499
5543
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
|
|
5501
5545
|
*/
|
|
5502
5546
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5503
5547
|
/**
|
|
5504
5548
|
* Disallow member access from await expression.
|
|
5505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md
|
|
5506
5550
|
*/
|
|
5507
5551
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5508
5552
|
/**
|
|
5509
5553
|
* Disallow using `await` in `Promise` method parameters.
|
|
5510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5511
5555
|
*/
|
|
5512
5556
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5513
5557
|
/**
|
|
5514
5558
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md
|
|
5516
5560
|
*/
|
|
5517
5561
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5518
5562
|
/**
|
|
5519
5563
|
* Do not use `document.cookie` directly.
|
|
5520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md
|
|
5521
5565
|
*/
|
|
5522
5566
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5523
5567
|
/**
|
|
5524
5568
|
* Disallow empty files.
|
|
5525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md
|
|
5526
5570
|
*/
|
|
5527
5571
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5528
5572
|
/**
|
|
5529
5573
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md
|
|
5531
5575
|
*/
|
|
5532
5576
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5533
5577
|
/**
|
|
5534
5578
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md
|
|
5536
5580
|
*/
|
|
5537
5581
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5538
5582
|
/**
|
|
5539
5583
|
* Disallow immediate mutation after variable assignment.
|
|
5540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
|
|
5541
5585
|
*/
|
|
5542
5586
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5543
5587
|
/**
|
|
5544
5588
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
5546
5590
|
* @deprecated
|
|
5547
5591
|
*/
|
|
5548
5592
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5549
5593
|
/**
|
|
5550
5594
|
* Disallow `instanceof` with built-in objects
|
|
5551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md
|
|
5552
5596
|
*/
|
|
5553
5597
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5554
5598
|
/**
|
|
5555
5599
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5557
5601
|
*/
|
|
5558
5602
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5559
5603
|
/**
|
|
5560
5604
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5562
5606
|
*/
|
|
5563
5607
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5564
5608
|
/**
|
|
5565
5609
|
* Disallow identifiers starting with `new` or `class`.
|
|
5566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md
|
|
5567
5611
|
*/
|
|
5568
5612
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5569
5613
|
/**
|
|
5570
5614
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
5572
5616
|
* @deprecated
|
|
5573
5617
|
*/
|
|
5574
5618
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5575
5619
|
/**
|
|
5576
5620
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md
|
|
5578
5622
|
*/
|
|
5579
5623
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5580
5624
|
/**
|
|
5581
5625
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5583
5627
|
*/
|
|
5584
5628
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5585
5629
|
/**
|
|
5586
5630
|
* Disallow named usage of default import and export.
|
|
5587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md
|
|
5588
5632
|
*/
|
|
5589
5633
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5590
5634
|
/**
|
|
5591
5635
|
* Disallow negated conditions.
|
|
5592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md
|
|
5593
5637
|
*/
|
|
5594
5638
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5595
5639
|
/**
|
|
5596
5640
|
* Disallow negated expression in equality check.
|
|
5597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5598
5642
|
*/
|
|
5599
5643
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5600
5644
|
/**
|
|
5601
5645
|
* Disallow nested ternary expressions.
|
|
5602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md
|
|
5603
5647
|
*/
|
|
5604
5648
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5605
5649
|
/**
|
|
5606
5650
|
* Disallow `new Array()`.
|
|
5607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md
|
|
5608
5652
|
*/
|
|
5609
5653
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5610
5654
|
/**
|
|
5611
5655
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md
|
|
5613
5657
|
*/
|
|
5614
5658
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5615
5659
|
/**
|
|
5616
5660
|
* Disallow the use of the `null` literal.
|
|
5617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md
|
|
5618
5662
|
*/
|
|
5619
5663
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5620
5664
|
/**
|
|
5621
5665
|
* Disallow the use of objects as default parameters.
|
|
5622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5623
5667
|
*/
|
|
5624
5668
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5625
5669
|
/**
|
|
5626
5670
|
* Disallow `process.exit()`.
|
|
5627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md
|
|
5628
5672
|
*/
|
|
5629
5673
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5630
5674
|
/**
|
|
5631
5675
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5633
5677
|
*/
|
|
5634
5678
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5635
5679
|
/**
|
|
5636
5680
|
* Disallow classes that only have static members.
|
|
5637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md
|
|
5638
5682
|
*/
|
|
5639
5683
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5640
5684
|
/**
|
|
5641
5685
|
* Disallow `then` property.
|
|
5642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md
|
|
5643
5687
|
*/
|
|
5644
5688
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5645
5689
|
/**
|
|
5646
5690
|
* Disallow assigning `this` to a variable.
|
|
5647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md
|
|
5648
5692
|
*/
|
|
5649
5693
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5650
5694
|
/**
|
|
5651
5695
|
* Disallow comparing `undefined` using `typeof`.
|
|
5652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md
|
|
5653
5697
|
*/
|
|
5654
5698
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5655
5699
|
/**
|
|
5656
5700
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5658
5702
|
*/
|
|
5659
5703
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5660
5704
|
/**
|
|
5661
5705
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5663
5707
|
*/
|
|
5664
5708
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5665
5709
|
/**
|
|
5666
5710
|
* Disallow awaiting non-promise values.
|
|
5667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md
|
|
5668
5712
|
*/
|
|
5669
5713
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5670
5714
|
/**
|
|
5671
5715
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5673
5717
|
*/
|
|
5674
5718
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5675
5719
|
/**
|
|
5676
5720
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5678
5722
|
*/
|
|
5679
5723
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5680
5724
|
/**
|
|
5681
5725
|
* Disallow unreadable array destructuring.
|
|
5682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5683
5727
|
*/
|
|
5684
5728
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5685
5729
|
/**
|
|
5686
5730
|
* Disallow unreadable IIFEs.
|
|
5687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md
|
|
5688
5732
|
*/
|
|
5689
5733
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5690
5734
|
/**
|
|
5691
5735
|
* Disallow unused object properties.
|
|
5692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md
|
|
5693
5737
|
*/
|
|
5694
5738
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5695
5739
|
/**
|
|
5696
5740
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
|
|
5698
5742
|
*/
|
|
5699
5743
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5700
5744
|
/**
|
|
5701
5745
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5703
5747
|
*/
|
|
5704
5748
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5705
5749
|
/**
|
|
5706
5750
|
* Disallow useless fallback when spreading in object literals.
|
|
5707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5708
5752
|
*/
|
|
5709
5753
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5710
5754
|
/**
|
|
5711
5755
|
* Disallow useless array length check.
|
|
5712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md
|
|
5713
5757
|
*/
|
|
5714
5758
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5715
5759
|
/**
|
|
5716
5760
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5718
5762
|
*/
|
|
5719
5763
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5720
5764
|
/**
|
|
5721
5765
|
* Disallow unnecessary spread.
|
|
5722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md
|
|
5723
5767
|
*/
|
|
5724
5768
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5725
5769
|
/**
|
|
5726
5770
|
* Disallow useless case in switch statements.
|
|
5727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md
|
|
5728
5772
|
*/
|
|
5729
5773
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5730
5774
|
/**
|
|
5731
5775
|
* Disallow useless `undefined`.
|
|
5732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md
|
|
5733
5777
|
*/
|
|
5734
5778
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5735
5779
|
/**
|
|
5736
5780
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md
|
|
5738
5782
|
*/
|
|
5739
5783
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5740
5784
|
/**
|
|
5741
5785
|
* Enforce proper case for numeric literals.
|
|
5742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md
|
|
5743
5787
|
*/
|
|
5744
5788
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5745
5789
|
/**
|
|
5746
5790
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md
|
|
5748
5792
|
*/
|
|
5749
5793
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5750
5794
|
/**
|
|
5751
5795
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md
|
|
5753
5797
|
*/
|
|
5754
5798
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5755
5799
|
/**
|
|
5756
5800
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md
|
|
5758
5802
|
*/
|
|
5759
5803
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5760
5804
|
/**
|
|
5761
5805
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md
|
|
5763
5807
|
*/
|
|
5764
5808
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5765
5809
|
/**
|
|
5766
5810
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md
|
|
5768
5812
|
*/
|
|
5769
5813
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5770
5814
|
/**
|
|
5771
5815
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md
|
|
5773
5817
|
*/
|
|
5774
5818
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5775
5819
|
/**
|
|
5776
5820
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md
|
|
5778
5822
|
*/
|
|
5779
5823
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5780
5824
|
/**
|
|
5781
5825
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md
|
|
5783
5827
|
*/
|
|
5784
5828
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5785
5829
|
/**
|
|
5786
5830
|
* Prefer `BigInt` literals over the constructor.
|
|
5787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
|
|
5788
5832
|
*/
|
|
5789
5833
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5790
5834
|
/**
|
|
5791
5835
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5793
5837
|
*/
|
|
5794
5838
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5795
5839
|
/**
|
|
5796
5840
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md
|
|
5798
5842
|
*/
|
|
5799
5843
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5800
5844
|
/**
|
|
5801
5845
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5803
5847
|
*/
|
|
5804
5848
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5805
5849
|
/**
|
|
5806
5850
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md
|
|
5808
5852
|
*/
|
|
5809
5853
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5810
5854
|
/**
|
|
5811
5855
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md
|
|
5813
5857
|
*/
|
|
5814
5858
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5815
5859
|
/**
|
|
5816
5860
|
* Prefer default parameters over reassignment.
|
|
5817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md
|
|
5818
5862
|
*/
|
|
5819
5863
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5820
5864
|
/**
|
|
5821
5865
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md
|
|
5823
5867
|
*/
|
|
5824
5868
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5825
5869
|
/**
|
|
5826
5870
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5828
5872
|
*/
|
|
5829
5873
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5830
5874
|
/**
|
|
5831
5875
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5833
5877
|
*/
|
|
5834
5878
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5835
5879
|
/**
|
|
5836
5880
|
* Prefer `.textContent` over `.innerText`.
|
|
5837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5838
5882
|
*/
|
|
5839
5883
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5840
5884
|
/**
|
|
5841
5885
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md
|
|
5843
5887
|
*/
|
|
5844
5888
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5845
5889
|
/**
|
|
5846
5890
|
* Prefer `export…from` when re-exporting.
|
|
5847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md
|
|
5848
5892
|
*/
|
|
5849
5893
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5850
5894
|
/**
|
|
5851
5895
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md
|
|
5853
5897
|
*/
|
|
5854
5898
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5855
5899
|
/**
|
|
5856
5900
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5858
5902
|
*/
|
|
5859
5903
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5860
5904
|
/**
|
|
5861
5905
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md
|
|
5863
5907
|
*/
|
|
5864
5908
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5865
5909
|
/**
|
|
5866
5910
|
* Prefer reading a JSON file as a buffer.
|
|
5867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5868
5912
|
*/
|
|
5869
5913
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5870
5914
|
/**
|
|
5871
5915
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5873
5917
|
*/
|
|
5874
5918
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5875
5919
|
/**
|
|
5876
5920
|
* Prefer using a logical operator over a ternary.
|
|
5877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5878
5922
|
*/
|
|
5879
5923
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5880
5924
|
/**
|
|
5881
5925
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md
|
|
5883
5927
|
*/
|
|
5884
5928
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5885
5929
|
/**
|
|
5886
5930
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md
|
|
5888
5932
|
*/
|
|
5889
5933
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5890
5934
|
/**
|
|
5891
5935
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5893
5937
|
*/
|
|
5894
5938
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5895
5939
|
/**
|
|
5896
5940
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5898
5942
|
*/
|
|
5899
5943
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5900
5944
|
/**
|
|
5901
5945
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md
|
|
5903
5947
|
*/
|
|
5904
5948
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5905
5949
|
/**
|
|
5906
5950
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5908
5952
|
*/
|
|
5909
5953
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5910
5954
|
/**
|
|
5911
5955
|
* Prefer negative index over `.length - index` when possible.
|
|
5912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md
|
|
5913
5957
|
*/
|
|
5914
5958
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5915
5959
|
/**
|
|
5916
5960
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md
|
|
5918
5962
|
*/
|
|
5919
5963
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5920
5964
|
/**
|
|
5921
5965
|
* Prefer `Number` static properties over global ones.
|
|
5922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md
|
|
5923
5967
|
*/
|
|
5924
5968
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5925
5969
|
/**
|
|
5926
5970
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md
|
|
5928
5972
|
*/
|
|
5929
5973
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5930
5974
|
/**
|
|
5931
5975
|
* Prefer omitting the `catch` binding parameter.
|
|
5932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5933
5977
|
*/
|
|
5934
5978
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5935
5979
|
/**
|
|
5936
5980
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md
|
|
5938
5982
|
*/
|
|
5939
5983
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5940
5984
|
/**
|
|
5941
5985
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md
|
|
5943
5987
|
*/
|
|
5944
5988
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5945
5989
|
/**
|
|
5946
5990
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md
|
|
5948
5992
|
*/
|
|
5949
5993
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5950
5994
|
/**
|
|
5951
5995
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md
|
|
5953
5997
|
*/
|
|
5954
5998
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5955
5999
|
/**
|
|
5956
6000
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
|
|
5958
6002
|
*/
|
|
5959
6003
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5960
6004
|
/**
|
|
5961
6005
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md
|
|
5963
6007
|
*/
|
|
5964
6008
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5965
6009
|
/**
|
|
5966
6010
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md
|
|
5968
6012
|
*/
|
|
5969
6013
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5970
6014
|
/**
|
|
5971
6015
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md
|
|
5973
6017
|
*/
|
|
5974
6018
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5975
6019
|
/**
|
|
5976
6020
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md
|
|
5978
6022
|
*/
|
|
5979
6023
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5980
6024
|
/**
|
|
5981
6025
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md
|
|
5983
6027
|
*/
|
|
5984
6028
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5985
6029
|
/**
|
|
5986
6030
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md
|
|
5988
6032
|
*/
|
|
5989
6033
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5990
6034
|
/**
|
|
5991
6035
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md
|
|
5993
6037
|
*/
|
|
5994
6038
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5995
6039
|
/**
|
|
5996
6040
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5998
6042
|
*/
|
|
5999
6043
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
6000
6044
|
/**
|
|
6001
6045
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6003
6047
|
*/
|
|
6004
6048
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
6005
6049
|
/**
|
|
6006
6050
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md
|
|
6008
6052
|
*/
|
|
6009
6053
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
6010
6054
|
/**
|
|
6011
6055
|
* Prefer `switch` over multiple `else-if`.
|
|
6012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md
|
|
6013
6057
|
*/
|
|
6014
6058
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
6015
6059
|
/**
|
|
6016
6060
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md
|
|
6018
6062
|
*/
|
|
6019
6063
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6020
6064
|
/**
|
|
6021
6065
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md
|
|
6023
6067
|
*/
|
|
6024
6068
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
6025
6069
|
/**
|
|
6026
6070
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md
|
|
6028
6072
|
*/
|
|
6029
6073
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
6030
6074
|
/**
|
|
6031
6075
|
* Prevent abbreviations.
|
|
6032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md
|
|
6033
6077
|
*/
|
|
6034
6078
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
6035
6079
|
/**
|
|
6036
6080
|
* Enforce consistent relative URL style.
|
|
6037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md
|
|
6038
6082
|
*/
|
|
6039
6083
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6040
6084
|
/**
|
|
6041
6085
|
* Enforce using the separator argument with `Array#join()`.
|
|
6042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md
|
|
6043
6087
|
*/
|
|
6044
6088
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6045
6089
|
/**
|
|
6046
6090
|
* Require non-empty module attributes for imports and exports
|
|
6047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
|
|
6048
6092
|
*/
|
|
6049
6093
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6050
6094
|
/**
|
|
6051
6095
|
* Require non-empty specifier list in import and export statements.
|
|
6052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md
|
|
6053
6097
|
*/
|
|
6054
6098
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6055
6099
|
/**
|
|
6056
6100
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6058
6102
|
*/
|
|
6059
6103
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6060
6104
|
/**
|
|
6061
6105
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md
|
|
6063
6107
|
*/
|
|
6064
6108
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6065
6109
|
/**
|
|
6066
6110
|
* Enforce better string content.
|
|
6067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md
|
|
6068
6112
|
*/
|
|
6069
6113
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6070
6114
|
/**
|
|
6071
6115
|
* Enforce consistent brace style for `case` clauses.
|
|
6072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md
|
|
6073
6117
|
*/
|
|
6074
6118
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6075
6119
|
/**
|
|
6076
6120
|
* Fix whitespace-insensitive template indentation.
|
|
6077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md
|
|
6078
6122
|
*/
|
|
6079
6123
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6080
6124
|
/**
|
|
6081
6125
|
* Enforce consistent case for text encoding identifiers.
|
|
6082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6083
6127
|
*/
|
|
6084
6128
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6085
6129
|
/**
|
|
6086
6130
|
* Require `new` when creating an error.
|
|
6087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md
|
|
6088
6132
|
*/
|
|
6089
6133
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6090
6134
|
/**
|
|
@@ -6637,6 +6681,11 @@ interface RuleOptions {
|
|
|
6637
6681
|
* @see https://eslint.vuejs.org/rules/no-lifecycle-after-await.html
|
|
6638
6682
|
*/
|
|
6639
6683
|
'vue/no-lifecycle-after-await'?: Linter.RuleEntry<[]>;
|
|
6684
|
+
/**
|
|
6685
|
+
* disallow object, array, and function literals in template
|
|
6686
|
+
* @see https://eslint.vuejs.org/rules/no-literals-in-template.html
|
|
6687
|
+
*/
|
|
6688
|
+
'vue/no-literals-in-template'?: Linter.RuleEntry<[]>;
|
|
6640
6689
|
/**
|
|
6641
6690
|
* disallow unnecessary `<template>`
|
|
6642
6691
|
* @see https://eslint.vuejs.org/rules/no-lone-template.html
|
|
@@ -6847,6 +6896,11 @@ interface RuleOptions {
|
|
|
6847
6896
|
* @see https://eslint.vuejs.org/rules/no-undef-components.html
|
|
6848
6897
|
*/
|
|
6849
6898
|
'vue/no-undef-components'?: Linter.RuleEntry<VueNoUndefComponents>;
|
|
6899
|
+
/**
|
|
6900
|
+
* disallow use of undefined custom directives
|
|
6901
|
+
* @see https://eslint.vuejs.org/rules/no-undef-directives.html
|
|
6902
|
+
*/
|
|
6903
|
+
'vue/no-undef-directives'?: Linter.RuleEntry<VueNoUndefDirectives>;
|
|
6850
6904
|
/**
|
|
6851
6905
|
* disallow undefined properties
|
|
6852
6906
|
* @see https://eslint.vuejs.org/rules/no-undef-properties.html
|
|
@@ -7320,7 +7374,7 @@ interface RuleOptions {
|
|
|
7320
7374
|
* enforce valid `v-for` directives
|
|
7321
7375
|
* @see https://eslint.vuejs.org/rules/valid-v-for.html
|
|
7322
7376
|
*/
|
|
7323
|
-
'vue/valid-v-for'?: Linter.RuleEntry<
|
|
7377
|
+
'vue/valid-v-for'?: Linter.RuleEntry<VueValidVFor>;
|
|
7324
7378
|
/**
|
|
7325
7379
|
* enforce valid `v-html` directives
|
|
7326
7380
|
* @see https://eslint.vuejs.org/rules/valid-v-html.html
|
|
@@ -7561,6 +7615,7 @@ type AntfuConsistentListNewline = [] | [{
|
|
|
7561
7615
|
ExportNamedDeclaration?: boolean;
|
|
7562
7616
|
FunctionDeclaration?: boolean;
|
|
7563
7617
|
FunctionExpression?: boolean;
|
|
7618
|
+
IfStatement?: boolean;
|
|
7564
7619
|
ImportDeclaration?: boolean;
|
|
7565
7620
|
JSONArrayExpression?: boolean;
|
|
7566
7621
|
JSONObjectExpression?: boolean;
|
|
@@ -7738,9 +7793,13 @@ type FormatDprint = [] | [{
|
|
|
7738
7793
|
plugins?: unknown[];
|
|
7739
7794
|
[k: string]: unknown | undefined;
|
|
7740
7795
|
}];
|
|
7796
|
+
// ----- format/oxfmt -----
|
|
7797
|
+
type FormatOxfmt = [] | [{
|
|
7798
|
+
[k: string]: unknown | undefined;
|
|
7799
|
+
}];
|
|
7741
7800
|
// ----- format/prettier -----
|
|
7742
7801
|
type FormatPrettier = [] | [{
|
|
7743
|
-
parser
|
|
7802
|
+
parser: string;
|
|
7744
7803
|
[k: string]: unknown | undefined;
|
|
7745
7804
|
}];
|
|
7746
7805
|
// ----- func-call-spacing -----
|
|
@@ -8392,6 +8451,7 @@ type JsdocTagLines = [] | [("always" | "any" | "never")] | [("always" | "any" |
|
|
|
8392
8451
|
endLines?: (number | null);
|
|
8393
8452
|
maxBlockLines?: (number | null);
|
|
8394
8453
|
startLines?: (number | null);
|
|
8454
|
+
startLinesWithNoTags?: number;
|
|
8395
8455
|
tags?: {
|
|
8396
8456
|
[k: string]: {
|
|
8397
8457
|
count?: number;
|
|
@@ -8439,11 +8499,13 @@ type JsdocTypeFormatting = [] | [{
|
|
|
8439
8499
|
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
|
|
8440
8500
|
objectFieldSeparatorOptionalLinebreak?: boolean;
|
|
8441
8501
|
objectFieldSeparatorTrailingPunctuation?: boolean;
|
|
8502
|
+
objectTypeBracketSpacing?: string;
|
|
8442
8503
|
parameterDefaultValueSpacing?: string;
|
|
8443
8504
|
postMethodNameSpacing?: string;
|
|
8444
8505
|
postNewSpacing?: string;
|
|
8445
8506
|
separatorForSingleObjectField?: boolean;
|
|
8446
8507
|
stringQuotes?: ("double" | "single");
|
|
8508
|
+
trailingPunctuationMultilineOnly?: boolean;
|
|
8447
8509
|
typeBracketSpacing?: string;
|
|
8448
8510
|
unionSpacing?: string;
|
|
8449
8511
|
}];
|
|
@@ -8618,6 +8680,7 @@ type JsoncObjectCurlyNewline = [] | [((("always" | "never") | {
|
|
|
8618
8680
|
type JsoncObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
8619
8681
|
arraysInObjects?: boolean;
|
|
8620
8682
|
objectsInObjects?: boolean;
|
|
8683
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
8621
8684
|
}];
|
|
8622
8685
|
// ----- jsonc/object-property-newline -----
|
|
8623
8686
|
type JsoncObjectPropertyNewline = [] | [{
|
|
@@ -9262,6 +9325,7 @@ type MaxParams = [] | [(number | {
|
|
|
9262
9325
|
maximum?: number;
|
|
9263
9326
|
max?: number;
|
|
9264
9327
|
countVoidThis?: boolean;
|
|
9328
|
+
countThis?: ("never" | "except-void" | "always");
|
|
9265
9329
|
})];
|
|
9266
9330
|
// ----- max-statements -----
|
|
9267
9331
|
type MaxStatements = [] | [(number | {
|
|
@@ -9918,12 +9982,16 @@ type NodeNoUnsupportedFeaturesNodeBuiltins = [] | [{
|
|
|
9918
9982
|
type NodePreferGlobalBuffer = [] | [("always" | "never")];
|
|
9919
9983
|
// ----- node/prefer-global/console -----
|
|
9920
9984
|
type NodePreferGlobalConsole = [] | [("always" | "never")];
|
|
9985
|
+
// ----- node/prefer-global/crypto -----
|
|
9986
|
+
type NodePreferGlobalCrypto = [] | [("always" | "never")];
|
|
9921
9987
|
// ----- node/prefer-global/process -----
|
|
9922
9988
|
type NodePreferGlobalProcess = [] | [("always" | "never")];
|
|
9923
9989
|
// ----- node/prefer-global/text-decoder -----
|
|
9924
9990
|
type NodePreferGlobalTextDecoder = [] | [("always" | "never")];
|
|
9925
9991
|
// ----- node/prefer-global/text-encoder -----
|
|
9926
9992
|
type NodePreferGlobalTextEncoder = [] | [("always" | "never")];
|
|
9993
|
+
// ----- node/prefer-global/timers -----
|
|
9994
|
+
type NodePreferGlobalTimers = [] | [("always" | "never")];
|
|
9927
9995
|
// ----- node/prefer-global/url -----
|
|
9928
9996
|
type NodePreferGlobalUrl = [] | [("always" | "never")];
|
|
9929
9997
|
// ----- node/prefer-global/url-search-params -----
|
|
@@ -10078,7 +10146,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
10078
10146
|
pattern: string;
|
|
10079
10147
|
flags?: string;
|
|
10080
10148
|
} | string));
|
|
10081
|
-
selector?:
|
|
10149
|
+
selector?: "literal";
|
|
10082
10150
|
}, ...({
|
|
10083
10151
|
elementNamePattern?: (({
|
|
10084
10152
|
pattern: string;
|
|
@@ -10087,7 +10155,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
10087
10155
|
pattern: string;
|
|
10088
10156
|
flags?: string;
|
|
10089
10157
|
} | string));
|
|
10090
|
-
selector?:
|
|
10158
|
+
selector?: "literal";
|
|
10091
10159
|
})[]];
|
|
10092
10160
|
} | {
|
|
10093
10161
|
fallbackSort?: {
|
|
@@ -10105,7 +10173,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
10105
10173
|
pattern: string;
|
|
10106
10174
|
flags?: string;
|
|
10107
10175
|
} | string));
|
|
10108
|
-
selector?:
|
|
10176
|
+
selector?: "literal";
|
|
10109
10177
|
})[];
|
|
10110
10178
|
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
10111
10179
|
groups?: (string | [string, ...(string)[]] | {
|
|
@@ -10273,6 +10341,7 @@ type PerfectionistSortClasses = [] | [{
|
|
|
10273
10341
|
order?: ("asc" | "desc");
|
|
10274
10342
|
})[];
|
|
10275
10343
|
newlinesBetween?: ("ignore" | number);
|
|
10344
|
+
useExperimentalDependencyDetection?: boolean;
|
|
10276
10345
|
ignoreCallbackDependenciesPatterns?: (({
|
|
10277
10346
|
pattern: string;
|
|
10278
10347
|
flags?: string;
|
|
@@ -10495,6 +10564,7 @@ type PerfectionistSortEnums = [] | [{
|
|
|
10495
10564
|
})[];
|
|
10496
10565
|
newlinesBetween?: ("ignore" | number);
|
|
10497
10566
|
sortByValue?: ("always" | "ifNumericEnum" | "never");
|
|
10567
|
+
useExperimentalDependencyDetection?: boolean;
|
|
10498
10568
|
partitionByComment?: (boolean | (({
|
|
10499
10569
|
pattern: string;
|
|
10500
10570
|
flags?: string;
|
|
@@ -10992,6 +11062,7 @@ type PerfectionistSortImports = {
|
|
|
10992
11062
|
maxLineLength?: number;
|
|
10993
11063
|
sortSideEffects?: boolean;
|
|
10994
11064
|
environment?: ("node" | "bun");
|
|
11065
|
+
useExperimentalDependencyDetection?: boolean;
|
|
10995
11066
|
partitionByComment?: (boolean | (({
|
|
10996
11067
|
pattern: string;
|
|
10997
11068
|
flags?: string;
|
|
@@ -11592,6 +11663,7 @@ type PerfectionistSortModules = [] | [{
|
|
|
11592
11663
|
order?: ("asc" | "desc");
|
|
11593
11664
|
})[];
|
|
11594
11665
|
newlinesBetween?: ("ignore" | number);
|
|
11666
|
+
useExperimentalDependencyDetection?: boolean;
|
|
11595
11667
|
partitionByComment?: (boolean | (({
|
|
11596
11668
|
pattern: string;
|
|
11597
11669
|
flags?: string;
|
|
@@ -11980,6 +12052,7 @@ type PerfectionistSortObjects = {
|
|
|
11980
12052
|
fallbackSort?: {
|
|
11981
12053
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11982
12054
|
order?: ("asc" | "desc");
|
|
12055
|
+
sortBy?: ("name" | "value");
|
|
11983
12056
|
};
|
|
11984
12057
|
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11985
12058
|
specialCharacters?: ("remove" | "trim" | "keep");
|
|
@@ -11987,15 +12060,18 @@ type PerfectionistSortObjects = {
|
|
|
11987
12060
|
alphabet?: string;
|
|
11988
12061
|
locales?: (string | string[]);
|
|
11989
12062
|
order?: ("asc" | "desc");
|
|
12063
|
+
sortBy?: ("name" | "value");
|
|
11990
12064
|
customGroups?: ({
|
|
11991
12065
|
fallbackSort?: {
|
|
11992
12066
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11993
12067
|
order?: ("asc" | "desc");
|
|
12068
|
+
sortBy?: ("name" | "value");
|
|
11994
12069
|
};
|
|
11995
12070
|
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11996
12071
|
groupName: string;
|
|
11997
12072
|
newlinesInside?: ("ignore" | number);
|
|
11998
12073
|
order?: ("asc" | "desc");
|
|
12074
|
+
sortBy?: ("name" | "value");
|
|
11999
12075
|
anyOf: [{
|
|
12000
12076
|
elementNamePattern?: (({
|
|
12001
12077
|
pattern: string;
|
|
@@ -12035,11 +12111,13 @@ type PerfectionistSortObjects = {
|
|
|
12035
12111
|
fallbackSort?: {
|
|
12036
12112
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12037
12113
|
order?: ("asc" | "desc");
|
|
12114
|
+
sortBy?: ("name" | "value");
|
|
12038
12115
|
};
|
|
12039
12116
|
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12040
12117
|
groupName: string;
|
|
12041
12118
|
newlinesInside?: ("ignore" | number);
|
|
12042
12119
|
order?: ("asc" | "desc");
|
|
12120
|
+
sortBy?: ("name" | "value");
|
|
12043
12121
|
elementNamePattern?: (({
|
|
12044
12122
|
pattern: string;
|
|
12045
12123
|
flags?: string;
|
|
@@ -12065,11 +12143,13 @@ type PerfectionistSortObjects = {
|
|
|
12065
12143
|
fallbackSort?: {
|
|
12066
12144
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12067
12145
|
order?: ("asc" | "desc");
|
|
12146
|
+
sortBy?: ("name" | "value");
|
|
12068
12147
|
};
|
|
12069
12148
|
commentAbove?: string;
|
|
12070
12149
|
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12071
12150
|
newlinesInside?: ("ignore" | number);
|
|
12072
12151
|
order?: ("asc" | "desc");
|
|
12152
|
+
sortBy?: ("name" | "value");
|
|
12073
12153
|
})[];
|
|
12074
12154
|
newlinesBetween?: ("ignore" | number);
|
|
12075
12155
|
useConfigurationIf?: {
|
|
@@ -12111,6 +12191,7 @@ type PerfectionistSortObjects = {
|
|
|
12111
12191
|
} | string));
|
|
12112
12192
|
};
|
|
12113
12193
|
styledComponents?: boolean;
|
|
12194
|
+
useExperimentalDependencyDetection?: boolean;
|
|
12114
12195
|
partitionByComment?: (boolean | (({
|
|
12115
12196
|
pattern: string;
|
|
12116
12197
|
flags?: string;
|
|
@@ -12164,7 +12245,7 @@ type PerfectionistSortSets = {
|
|
|
12164
12245
|
pattern: string;
|
|
12165
12246
|
flags?: string;
|
|
12166
12247
|
} | string));
|
|
12167
|
-
selector?:
|
|
12248
|
+
selector?: "literal";
|
|
12168
12249
|
}, ...({
|
|
12169
12250
|
elementNamePattern?: (({
|
|
12170
12251
|
pattern: string;
|
|
@@ -12173,7 +12254,7 @@ type PerfectionistSortSets = {
|
|
|
12173
12254
|
pattern: string;
|
|
12174
12255
|
flags?: string;
|
|
12175
12256
|
} | string));
|
|
12176
|
-
selector?:
|
|
12257
|
+
selector?: "literal";
|
|
12177
12258
|
})[]];
|
|
12178
12259
|
} | {
|
|
12179
12260
|
fallbackSort?: {
|
|
@@ -12191,7 +12272,7 @@ type PerfectionistSortSets = {
|
|
|
12191
12272
|
pattern: string;
|
|
12192
12273
|
flags?: string;
|
|
12193
12274
|
} | string));
|
|
12194
|
-
selector?:
|
|
12275
|
+
selector?: "literal";
|
|
12195
12276
|
})[];
|
|
12196
12277
|
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
12197
12278
|
groups?: (string | [string, ...(string)[]] | {
|
|
@@ -12424,6 +12505,7 @@ type PerfectionistSortVariableDeclarations = [] | [{
|
|
|
12424
12505
|
order?: ("asc" | "desc");
|
|
12425
12506
|
})[];
|
|
12426
12507
|
newlinesBetween?: ("ignore" | number);
|
|
12508
|
+
useExperimentalDependencyDetection?: boolean;
|
|
12427
12509
|
partitionByComment?: (boolean | (({
|
|
12428
12510
|
pattern: string;
|
|
12429
12511
|
flags?: string;
|
|
@@ -12664,9 +12746,9 @@ type ReactNamingConventionUseState = [] | [{
|
|
|
12664
12746
|
}];
|
|
12665
12747
|
// ----- react-refresh/only-export-components -----
|
|
12666
12748
|
type ReactRefreshOnlyExportComponents = [] | [{
|
|
12749
|
+
extraHOCs?: string[];
|
|
12667
12750
|
allowExportNames?: string[];
|
|
12668
12751
|
allowConstantExport?: boolean;
|
|
12669
|
-
customHOCs?: string[];
|
|
12670
12752
|
checkJS?: boolean;
|
|
12671
12753
|
}];
|
|
12672
12754
|
// ----- react/jsx-shorthand-boolean -----
|
|
@@ -13082,15 +13164,25 @@ type StyleCurlyNewline = [] | [(("always" | "never") | {
|
|
|
13082
13164
|
type StyleDotLocation = [] | [("object" | "property")];
|
|
13083
13165
|
// ----- style/eol-last -----
|
|
13084
13166
|
type StyleEolLast = [] | [("always" | "never" | "unix" | "windows")];
|
|
13167
|
+
// ----- style/exp-jsx-props-style -----
|
|
13168
|
+
type StyleExpJsxPropsStyle = [] | [{
|
|
13169
|
+
singleLine?: {
|
|
13170
|
+
maxItems?: number;
|
|
13171
|
+
};
|
|
13172
|
+
multiLine?: {
|
|
13173
|
+
minItems?: number;
|
|
13174
|
+
maxItemsPerLine?: number;
|
|
13175
|
+
};
|
|
13176
|
+
}];
|
|
13085
13177
|
// ----- style/exp-list-style -----
|
|
13086
13178
|
type StyleExpListStyle = [] | [{
|
|
13087
13179
|
singleLine?: _StyleExpListStyle_SingleLineConfig;
|
|
13088
13180
|
multiLine?: _StyleExpListStyle_MultiLineConfig;
|
|
13089
13181
|
overrides?: {
|
|
13182
|
+
"()"?: _StyleExpListStyle_BaseConfig;
|
|
13090
13183
|
"[]"?: _StyleExpListStyle_BaseConfig;
|
|
13091
13184
|
"{}"?: _StyleExpListStyle_BaseConfig;
|
|
13092
13185
|
"<>"?: _StyleExpListStyle_BaseConfig;
|
|
13093
|
-
"()"?: _StyleExpListStyle_BaseConfig;
|
|
13094
13186
|
ArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
13095
13187
|
ArrayPattern?: _StyleExpListStyle_BaseConfig;
|
|
13096
13188
|
ArrowFunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
@@ -13098,21 +13190,22 @@ type StyleExpListStyle = [] | [{
|
|
|
13098
13190
|
ExportNamedDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
13099
13191
|
FunctionDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
13100
13192
|
FunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
13101
|
-
|
|
13193
|
+
IfStatement?: _StyleExpListStyle_BaseConfig;
|
|
13102
13194
|
ImportAttributes?: _StyleExpListStyle_BaseConfig;
|
|
13195
|
+
ImportDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
13196
|
+
JSONArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
13197
|
+
JSONObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
13103
13198
|
NewExpression?: _StyleExpListStyle_BaseConfig;
|
|
13104
13199
|
ObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
13105
13200
|
ObjectPattern?: _StyleExpListStyle_BaseConfig;
|
|
13106
13201
|
TSDeclareFunction?: _StyleExpListStyle_BaseConfig;
|
|
13202
|
+
TSEnumBody?: _StyleExpListStyle_BaseConfig;
|
|
13107
13203
|
TSFunctionType?: _StyleExpListStyle_BaseConfig;
|
|
13108
13204
|
TSInterfaceBody?: _StyleExpListStyle_BaseConfig;
|
|
13109
|
-
TSEnumBody?: _StyleExpListStyle_BaseConfig;
|
|
13110
13205
|
TSTupleType?: _StyleExpListStyle_BaseConfig;
|
|
13111
13206
|
TSTypeLiteral?: _StyleExpListStyle_BaseConfig;
|
|
13112
13207
|
TSTypeParameterDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
13113
13208
|
TSTypeParameterInstantiation?: _StyleExpListStyle_BaseConfig;
|
|
13114
|
-
JSONArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
13115
|
-
JSONObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
13116
13209
|
};
|
|
13117
13210
|
}];
|
|
13118
13211
|
interface _StyleExpListStyle_SingleLineConfig {
|
|
@@ -14028,13 +14121,17 @@ type StylePaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
|
|
|
14028
14121
|
}];
|
|
14029
14122
|
// ----- style/padding-line-between-statements -----
|
|
14030
14123
|
type _StylePaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
|
|
14031
|
-
type _StylePaddingLineBetweenStatementsStatementOption = (
|
|
14124
|
+
type _StylePaddingLineBetweenStatementsStatementOption = (_StylePaddingLineBetweenStatementsStatementMatcher | [_StylePaddingLineBetweenStatementsStatementMatcher, ...(_StylePaddingLineBetweenStatementsStatementMatcher)[]]);
|
|
14125
|
+
type _StylePaddingLineBetweenStatementsStatementMatcher = (_StylePaddingLineBetweenStatementsStatementType | _StylePaddingLineBetweenStatements_SelectorOption);
|
|
14032
14126
|
type _StylePaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "return" | "singleline-return" | "multiline-return" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using" | "type" | "singleline-type" | "multiline-type");
|
|
14033
14127
|
type StylePaddingLineBetweenStatements = {
|
|
14034
14128
|
blankLine: _StylePaddingLineBetweenStatementsPaddingType;
|
|
14035
14129
|
prev: _StylePaddingLineBetweenStatementsStatementOption;
|
|
14036
14130
|
next: _StylePaddingLineBetweenStatementsStatementOption;
|
|
14037
14131
|
}[];
|
|
14132
|
+
interface _StylePaddingLineBetweenStatements_SelectorOption {
|
|
14133
|
+
selector: string;
|
|
14134
|
+
}
|
|
14038
14135
|
// ----- style/quote-props -----
|
|
14039
14136
|
type StyleQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
14040
14137
|
keywords?: boolean;
|
|
@@ -14304,10 +14401,21 @@ type TomlIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
14304
14401
|
subTables?: number;
|
|
14305
14402
|
keyValuePairs?: number;
|
|
14306
14403
|
}];
|
|
14404
|
+
// ----- toml/inline-table-curly-newline -----
|
|
14405
|
+
type TomlInlineTableCurlyNewline = [] | [(("always" | "never") | {
|
|
14406
|
+
multiline?: boolean;
|
|
14407
|
+
minProperties?: number;
|
|
14408
|
+
consistent?: boolean;
|
|
14409
|
+
})];
|
|
14307
14410
|
// ----- toml/inline-table-curly-spacing -----
|
|
14308
14411
|
type TomlInlineTableCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
14309
14412
|
arraysInObjects?: boolean;
|
|
14310
14413
|
objectsInObjects?: boolean;
|
|
14414
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
14415
|
+
}];
|
|
14416
|
+
// ----- toml/inline-table-key-value-newline -----
|
|
14417
|
+
type TomlInlineTableKeyValueNewline = [] | [{
|
|
14418
|
+
allowAllPropertiesOnSameLine?: boolean;
|
|
14311
14419
|
}];
|
|
14312
14420
|
// ----- toml/key-spacing -----
|
|
14313
14421
|
type TomlKeySpacing = [] | [({
|
|
@@ -15132,6 +15240,10 @@ type TsNoUseBeforeDefine = [] | [("nofunc" | {
|
|
|
15132
15240
|
typedefs?: boolean;
|
|
15133
15241
|
variables?: boolean;
|
|
15134
15242
|
})];
|
|
15243
|
+
// ----- ts/no-useless-default-assignment -----
|
|
15244
|
+
type TsNoUselessDefaultAssignment = [] | [{
|
|
15245
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
|
|
15246
|
+
}];
|
|
15135
15247
|
// ----- ts/no-var-requires -----
|
|
15136
15248
|
type TsNoVarRequires = [] | [{
|
|
15137
15249
|
allow?: string[];
|
|
@@ -15412,6 +15524,15 @@ interface _UnicornImportStyle_ModuleStyles {
|
|
|
15412
15524
|
interface _UnicornImportStyle_BooleanObject {
|
|
15413
15525
|
[k: string]: boolean | undefined;
|
|
15414
15526
|
}
|
|
15527
|
+
// ----- unicorn/isolated-functions -----
|
|
15528
|
+
type UnicornIsolatedFunctions = [] | [{
|
|
15529
|
+
overrideGlobals?: {
|
|
15530
|
+
[k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined;
|
|
15531
|
+
};
|
|
15532
|
+
functions?: string[];
|
|
15533
|
+
selectors?: string[];
|
|
15534
|
+
comments?: string[];
|
|
15535
|
+
}];
|
|
15415
15536
|
// ----- unicorn/no-array-reduce -----
|
|
15416
15537
|
type UnicornNoArrayReduce = [] | [{
|
|
15417
15538
|
allowSimpleOperations?: boolean;
|
|
@@ -15668,6 +15789,7 @@ type VueAttributesOrder = [] | [{
|
|
|
15668
15789
|
order?: (("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT") | ("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT")[])[];
|
|
15669
15790
|
alphabetical?: boolean;
|
|
15670
15791
|
sortLineLength?: boolean;
|
|
15792
|
+
ignoreVBindObject?: boolean;
|
|
15671
15793
|
}];
|
|
15672
15794
|
// ----- vue/block-lang -----
|
|
15673
15795
|
type VueBlockLang = [] | [{
|
|
@@ -15759,7 +15881,7 @@ type VueDefineMacrosOrder = [] | [{
|
|
|
15759
15881
|
type VueDefinePropsDeclaration = [] | [("type-based" | "runtime")];
|
|
15760
15882
|
// ----- vue/define-props-destructuring -----
|
|
15761
15883
|
type VueDefinePropsDestructuring = [] | [{
|
|
15762
|
-
destructure?: ("always" | "never");
|
|
15884
|
+
destructure?: ("only-when-assigned" | "always" | "never");
|
|
15763
15885
|
}];
|
|
15764
15886
|
// ----- vue/dot-location -----
|
|
15765
15887
|
type VueDotLocation = [] | [("object" | "property")];
|
|
@@ -16407,6 +16529,7 @@ type VueNoLoneTemplate = [] | [{
|
|
|
16407
16529
|
// ----- vue/no-multi-spaces -----
|
|
16408
16530
|
type VueNoMultiSpaces = [] | [{
|
|
16409
16531
|
ignoreProperties?: boolean;
|
|
16532
|
+
ignoreEOLComments?: boolean;
|
|
16410
16533
|
}];
|
|
16411
16534
|
// ----- vue/no-multiple-template-root -----
|
|
16412
16535
|
type VueNoMultipleTemplateRoot = [] | [{
|
|
@@ -16564,6 +16687,10 @@ type VueNoTemplateTargetBlank = [] | [{
|
|
|
16564
16687
|
type VueNoUndefComponents = [] | [{
|
|
16565
16688
|
ignorePatterns?: unknown[];
|
|
16566
16689
|
}];
|
|
16690
|
+
// ----- vue/no-undef-directives -----
|
|
16691
|
+
type VueNoUndefDirectives = [] | [{
|
|
16692
|
+
ignore?: string[];
|
|
16693
|
+
}];
|
|
16567
16694
|
// ----- vue/no-undef-properties -----
|
|
16568
16695
|
type VueNoUndefProperties = [] | [{
|
|
16569
16696
|
ignores?: string[];
|
|
@@ -16807,6 +16934,10 @@ type VueVSlotStyle = [] | [(("shorthand" | "longform") | {
|
|
|
16807
16934
|
default?: ("shorthand" | "longform" | "v-slot");
|
|
16808
16935
|
named?: ("shorthand" | "longform");
|
|
16809
16936
|
})];
|
|
16937
|
+
// ----- vue/valid-v-for -----
|
|
16938
|
+
type VueValidVFor = [] | [{
|
|
16939
|
+
allowEmptyAlias?: boolean;
|
|
16940
|
+
}];
|
|
16810
16941
|
// ----- vue/valid-v-on -----
|
|
16811
16942
|
type VueValidVOn = [] | [{
|
|
16812
16943
|
modifiers?: unknown[];
|
|
@@ -16853,6 +16984,7 @@ type YamlFlowMappingCurlyNewline = [] | [(("always" | "never") | {
|
|
|
16853
16984
|
type YamlFlowMappingCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
16854
16985
|
arraysInObjects?: boolean;
|
|
16855
16986
|
objectsInObjects?: boolean;
|
|
16987
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
16856
16988
|
}];
|
|
16857
16989
|
// ----- yaml/flow-sequence-bracket-newline -----
|
|
16858
16990
|
type YamlFlowSequenceBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
@@ -17038,7 +17170,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
17038
17170
|
onlyEquality?: boolean;
|
|
17039
17171
|
}];
|
|
17040
17172
|
// Names of all the configs
|
|
17041
|
-
type ConfigNames = 'eslint/comments/rules' | 'eslint/formatter/setup' | 'eslint/formatter/html' | 'eslint/formatter/xml' | 'eslint/formatter/svg' | 'eslint/formatter/markdown' | 'eslint/formatter/graphql' | 'eslint/imports/rules' | 'eslint/javascript/setup' | 'eslint/javascript/rules' | 'eslint/jsdoc/rules' | 'eslint/jsonc/setup' | 'eslint/jsonc/rules' | 'eslint/markdown/setup' | 'eslint/markdown/processor' | 'eslint/markdown/parser' | 'eslint/markdown/disables' | 'eslint/node/rules' | 'eslint/perfectionist/setup' | 'eslint/react/setup' | 'eslint/react/rules' | 'eslint/regexp/rules' | 'eslint/sort/package-json' | 'eslint/stylistic/rules' | 'eslint/test/setup' | 'eslint/test/rules' | 'eslint/toml/setup' | 'eslint/toml/rules' | 'eslint/typescript/setup' | 'eslint/typescript/parser' | 'eslint/typescript/rules' | 'eslint/unicorn/rules' | 'eslint/unocss/rules' | 'eslint/vue/setup' | 'eslint/vue/rules' | 'eslint/yaml/setup' | 'eslint/yaml/rules';
|
|
17173
|
+
type ConfigNames = 'eslint/comments/rules' | 'eslint/formatter/setup' | 'eslint/formatter/html' | 'eslint/formatter/xml' | 'eslint/formatter/svg' | 'eslint/formatter/markdown' | 'eslint/formatter/graphql' | 'eslint/imports/rules' | 'eslint/javascript/setup' | 'eslint/javascript/rules' | 'eslint/jsdoc/setup' | 'eslint/jsdoc/rules' | 'eslint/jsonc/setup' | 'eslint/jsonc/rules' | 'eslint/markdown/setup' | 'eslint/markdown/processor' | 'eslint/markdown/parser' | 'eslint/markdown/rules' | 'eslint/markdown/disables/markdown' | 'eslint/markdown/disables/code' | 'eslint/node/rules' | 'eslint/perfectionist/setup' | 'eslint/react/setup' | 'eslint/react/rules' | 'eslint/react/typescript' | 'eslint/regexp/rules' | 'eslint/sort/package-json' | 'eslint/stylistic/rules' | 'eslint/test/setup' | 'eslint/test/rules' | 'eslint/toml/setup' | 'eslint/toml/rules' | 'eslint/typescript/setup' | 'eslint/typescript/parser' | 'eslint/typescript/rules' | 'eslint/unicorn/rules' | 'eslint/unocss/rules' | 'eslint/vue/setup' | 'eslint/vue/rules' | 'eslint/yaml/setup' | 'eslint/yaml/rules';
|
|
17042
17174
|
//#endregion
|
|
17043
17175
|
//#region src/prettier.types.d.ts
|
|
17044
17176
|
/**
|
|
@@ -17168,7 +17300,7 @@ type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
|
|
|
17168
17300
|
* 为 `rules` 提供自动补全功能,并放宽了 `plugins` 和 `rules` 的类型限制,
|
|
17169
17301
|
* 因为许多插件仍然缺乏适当的类型定义。
|
|
17170
17302
|
*/
|
|
17171
|
-
type TypedFlatConfigItem = Omit<
|
|
17303
|
+
type TypedFlatConfigItem = Omit<ConfigWithExtends, 'plugins' | 'rules'> & {
|
|
17172
17304
|
/**
|
|
17173
17305
|
* 一个包含插件名称到插件对象的键值对映射的对象。
|
|
17174
17306
|
* 当指定 `files` 时,这些插件仅适用于匹配的文件。
|
|
@@ -17308,9 +17440,9 @@ interface OptionsStylistic {
|
|
|
17308
17440
|
}
|
|
17309
17441
|
interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'quotes' | 'jsx' | 'semi'> {
|
|
17310
17442
|
/**
|
|
17311
|
-
*
|
|
17443
|
+
* 禁用了一些带有主观色彩的规则。
|
|
17312
17444
|
*
|
|
17313
|
-
*
|
|
17445
|
+
* 包括:
|
|
17314
17446
|
* - `antfu/top-level-function`
|
|
17315
17447
|
* - `antfu/if-newline`
|
|
17316
17448
|
* - `antfu/curly`
|
|
@@ -17320,8 +17452,23 @@ interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'qu
|
|
|
17320
17452
|
lessOpinionated?: boolean;
|
|
17321
17453
|
}
|
|
17322
17454
|
interface OptionsOverrides {
|
|
17455
|
+
/**
|
|
17456
|
+
* 覆盖规则
|
|
17457
|
+
*/
|
|
17323
17458
|
overrides?: TypedFlatConfigItem['rules'];
|
|
17324
17459
|
}
|
|
17460
|
+
interface OptionsMarkdown extends OptionsOverrides {
|
|
17461
|
+
/**
|
|
17462
|
+
* 启用 GFM(GitHub Flavored Markdown)支持
|
|
17463
|
+
*
|
|
17464
|
+
* @default true
|
|
17465
|
+
*/
|
|
17466
|
+
gfm?: boolean;
|
|
17467
|
+
/**
|
|
17468
|
+
* 覆盖 Markdown 本身的规则
|
|
17469
|
+
*/
|
|
17470
|
+
overridesMarkdown?: TypedFlatConfigItem['rules'];
|
|
17471
|
+
}
|
|
17325
17472
|
interface OptionsProjectType {
|
|
17326
17473
|
/**
|
|
17327
17474
|
* 项目类型。“lib”将为库启用更严格的规则。
|
|
@@ -17341,7 +17488,7 @@ interface OptionsTypeScriptErasableOnly {
|
|
|
17341
17488
|
}
|
|
17342
17489
|
interface OptionsRegExp {
|
|
17343
17490
|
/**
|
|
17344
|
-
*
|
|
17491
|
+
* 覆盖规则级别
|
|
17345
17492
|
*/
|
|
17346
17493
|
level?: 'error' | 'warn';
|
|
17347
17494
|
}
|
|
@@ -17356,6 +17503,24 @@ interface OptionsPnpm extends OptionsIsInEditor {
|
|
|
17356
17503
|
* 需要使用目录支持?
|
|
17357
17504
|
*/
|
|
17358
17505
|
catalogs?: boolean;
|
|
17506
|
+
/**
|
|
17507
|
+
* 启用 package.json 的 lint 功能,将会安装 jsonc 解析器。
|
|
17508
|
+
*
|
|
17509
|
+
* @default true
|
|
17510
|
+
*/
|
|
17511
|
+
json?: boolean;
|
|
17512
|
+
/**
|
|
17513
|
+
* 启用 pnpm-workspace.yaml 的 lint 功能,将会安装 yaml 解析器。
|
|
17514
|
+
*
|
|
17515
|
+
* @default true
|
|
17516
|
+
*/
|
|
17517
|
+
yaml?: boolean;
|
|
17518
|
+
/**
|
|
17519
|
+
* 对 pnpm-workspace.yaml 中的条目进行排序
|
|
17520
|
+
*
|
|
17521
|
+
* @default false
|
|
17522
|
+
*/
|
|
17523
|
+
sort?: boolean;
|
|
17359
17524
|
}
|
|
17360
17525
|
interface OptionsUnoCSS {
|
|
17361
17526
|
/**
|
|
@@ -17619,7 +17784,7 @@ declare function jsonc(options?: OptionsFiles & OptionsStylistic & OptionsOverri
|
|
|
17619
17784
|
declare function jsx(): Promise<TypedFlatConfigItem[]>;
|
|
17620
17785
|
//#endregion
|
|
17621
17786
|
//#region src/configs/markdown.d.ts
|
|
17622
|
-
declare function markdown(options?: OptionsFiles & OptionsComponentExts &
|
|
17787
|
+
declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsMarkdown): Promise<TypedFlatConfigItem[]>;
|
|
17623
17788
|
//#endregion
|
|
17624
17789
|
//#region src/configs/nextjs.d.ts
|
|
17625
17790
|
declare function nextjs(options?: OptionsOverrides & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
@@ -17636,7 +17801,7 @@ declare function node(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]
|
|
|
17636
17801
|
declare function perfectionist(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
17637
17802
|
//#endregion
|
|
17638
17803
|
//#region src/configs/pnpm.d.ts
|
|
17639
|
-
declare function pnpm(options
|
|
17804
|
+
declare function pnpm(options: OptionsPnpm): Promise<TypedFlatConfigItem[]>;
|
|
17640
17805
|
//#endregion
|
|
17641
17806
|
//#region src/configs/react.d.ts
|
|
17642
17807
|
declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsOverrides & OptionsReact): Promise<TypedFlatConfigItem[]>;
|
|
@@ -17756,4 +17921,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
|
|
|
17756
17921
|
declare function isInEditorEnv(): boolean;
|
|
17757
17922
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
17758
17923
|
//#endregion
|
|
17759
|
-
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, lincy, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
17924
|
+
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsMarkdown, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, type RuleOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, lincy, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|