@bfra.me/eslint-config 0.50.2 → 0.50.3
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/lib/index.d.ts +257 -145
- package/lib/index.js +11 -12
- package/package.json +7 -7
- package/src/configs/prettier.ts +2 -7
- package/src/rules.d.ts +257 -145
package/src/rules.d.ts
CHANGED
|
@@ -2995,6 +2995,11 @@ export interface Rules {
|
|
|
2995
2995
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md
|
|
2996
2996
|
*/
|
|
2997
2997
|
'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>
|
|
2998
|
+
/**
|
|
2999
|
+
* Require or disallow metadata for fenced code blocks
|
|
3000
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-meta.md
|
|
3001
|
+
*/
|
|
3002
|
+
'markdown/fenced-code-meta'?: Linter.RuleEntry<MarkdownFencedCodeMeta>
|
|
2998
3003
|
/**
|
|
2999
3004
|
* Enforce heading levels increment by one
|
|
3000
3005
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
|
|
@@ -5813,730 +5818,750 @@ export interface Rules {
|
|
|
5813
5818
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
5814
5819
|
/**
|
|
5815
5820
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/better-regex.md
|
|
5817
5822
|
*/
|
|
5818
5823
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
5819
5824
|
/**
|
|
5820
5825
|
* Enforce a specific parameter name in catch clauses.
|
|
5821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/catch-error-name.md
|
|
5822
5827
|
*/
|
|
5823
5828
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
5824
5829
|
/**
|
|
5825
5830
|
* Enforce consistent assertion style with `node:assert`.
|
|
5826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-assert.md
|
|
5827
5832
|
*/
|
|
5828
5833
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
5829
5834
|
/**
|
|
5830
5835
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-date-clone.md
|
|
5832
5837
|
*/
|
|
5833
5838
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
5834
5839
|
/**
|
|
5835
5840
|
* Use destructured variables over properties.
|
|
5836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-destructuring.md
|
|
5837
5842
|
*/
|
|
5838
5843
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
5839
5844
|
/**
|
|
5840
5845
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5842
5847
|
*/
|
|
5843
5848
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
5844
5849
|
/**
|
|
5845
5850
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-existence-index-check.md
|
|
5847
5852
|
*/
|
|
5848
5853
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
5849
5854
|
/**
|
|
5850
5855
|
* Move function definitions to the highest possible scope.
|
|
5851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-function-scoping.md
|
|
5852
5857
|
*/
|
|
5853
5858
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
5859
|
+
/**
|
|
5860
|
+
* Enforce consistent style for escaping `${` in template literals.
|
|
5861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-template-literal-escape.md
|
|
5862
|
+
*/
|
|
5863
|
+
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>
|
|
5854
5864
|
/**
|
|
5855
5865
|
* Enforce correct `Error` subclassing.
|
|
5856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/custom-error-definition.md
|
|
5857
5867
|
*/
|
|
5858
5868
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
5859
5869
|
/**
|
|
5860
5870
|
* Enforce no spaces between braces.
|
|
5861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/empty-brace-spaces.md
|
|
5862
5872
|
*/
|
|
5863
5873
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
5864
5874
|
/**
|
|
5865
5875
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/error-message.md
|
|
5867
5877
|
*/
|
|
5868
5878
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
5869
5879
|
/**
|
|
5870
5880
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/escape-case.md
|
|
5872
5882
|
*/
|
|
5873
5883
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
5874
5884
|
/**
|
|
5875
5885
|
* Add expiration conditions to TODO comments.
|
|
5876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/expiring-todo-comments.md
|
|
5877
5887
|
*/
|
|
5878
5888
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
5879
5889
|
/**
|
|
5880
5890
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/explicit-length-check.md
|
|
5882
5892
|
*/
|
|
5883
5893
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
5884
5894
|
/**
|
|
5885
5895
|
* Enforce a case style for filenames.
|
|
5886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/filename-case.md
|
|
5887
5897
|
*/
|
|
5888
5898
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
5889
5899
|
/**
|
|
5890
5900
|
* Enforce specific import styles per module.
|
|
5891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/import-style.md
|
|
5892
5902
|
*/
|
|
5893
5903
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
5894
5904
|
/**
|
|
5895
5905
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
5896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/isolated-functions.md
|
|
5897
5907
|
*/
|
|
5898
5908
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>
|
|
5899
5909
|
/**
|
|
5900
5910
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/new-for-builtins.md
|
|
5902
5912
|
*/
|
|
5903
5913
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
5904
5914
|
/**
|
|
5905
5915
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5907
5917
|
*/
|
|
5908
5918
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
5909
5919
|
/**
|
|
5910
5920
|
* Disallow recursive access to `this` within getters and setters.
|
|
5911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-accessor-recursion.md
|
|
5912
5922
|
*/
|
|
5913
5923
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
5914
5924
|
/**
|
|
5915
5925
|
* Disallow anonymous functions and classes as the default export.
|
|
5916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-anonymous-default-export.md
|
|
5917
5927
|
*/
|
|
5918
5928
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
5919
5929
|
/**
|
|
5920
5930
|
* Prevent passing a function reference directly to iterator methods.
|
|
5921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-callback-reference.md
|
|
5922
5932
|
*/
|
|
5923
5933
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
5924
5934
|
/**
|
|
5925
5935
|
* Prefer `for…of` over the `forEach` method.
|
|
5926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-for-each.md
|
|
5927
5937
|
*/
|
|
5928
5938
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
5929
5939
|
/**
|
|
5930
5940
|
* Disallow using the `this` argument in array methods.
|
|
5931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-method-this-argument.md
|
|
5932
5942
|
*/
|
|
5933
5943
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
5934
5944
|
/**
|
|
5935
5945
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
5937
5947
|
* @deprecated
|
|
5938
5948
|
*/
|
|
5939
5949
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
5940
5950
|
/**
|
|
5941
5951
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reduce.md
|
|
5943
5953
|
*/
|
|
5944
5954
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
5945
5955
|
/**
|
|
5946
5956
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reverse.md
|
|
5948
5958
|
*/
|
|
5949
5959
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
5950
5960
|
/**
|
|
5951
5961
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-sort.md
|
|
5953
5963
|
*/
|
|
5954
5964
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
|
|
5955
5965
|
/**
|
|
5956
5966
|
* Disallow member access from await expression.
|
|
5957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-expression-member.md
|
|
5958
5968
|
*/
|
|
5959
5969
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
5960
5970
|
/**
|
|
5961
5971
|
* Disallow using `await` in `Promise` method parameters.
|
|
5962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5963
5973
|
*/
|
|
5964
5974
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
5965
5975
|
/**
|
|
5966
5976
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-console-spaces.md
|
|
5968
5978
|
*/
|
|
5969
5979
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
5970
5980
|
/**
|
|
5971
5981
|
* Do not use `document.cookie` directly.
|
|
5972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-document-cookie.md
|
|
5973
5983
|
*/
|
|
5974
5984
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
5975
5985
|
/**
|
|
5976
5986
|
* Disallow empty files.
|
|
5977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-empty-file.md
|
|
5978
5988
|
*/
|
|
5979
5989
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
5980
5990
|
/**
|
|
5981
5991
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-for-loop.md
|
|
5983
5993
|
*/
|
|
5984
5994
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
5985
5995
|
/**
|
|
5986
5996
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-hex-escape.md
|
|
5988
5998
|
*/
|
|
5989
5999
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
5990
6000
|
/**
|
|
5991
6001
|
* Disallow immediate mutation after variable assignment.
|
|
5992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-immediate-mutation.md
|
|
5993
6003
|
*/
|
|
5994
6004
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>
|
|
5995
6005
|
/**
|
|
5996
6006
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
5998
6008
|
* @deprecated
|
|
5999
6009
|
*/
|
|
6000
6010
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
6001
6011
|
/**
|
|
6002
6012
|
* Disallow `instanceof` with built-in objects
|
|
6003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-instanceof-builtins.md
|
|
6004
6014
|
*/
|
|
6005
6015
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
6006
6016
|
/**
|
|
6007
6017
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6009
6019
|
*/
|
|
6010
6020
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
6011
6021
|
/**
|
|
6012
6022
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6014
6024
|
*/
|
|
6015
6025
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
6016
6026
|
/**
|
|
6017
6027
|
* Disallow identifiers starting with `new` or `class`.
|
|
6018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-keyword-prefix.md
|
|
6019
6029
|
*/
|
|
6020
6030
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
6021
6031
|
/**
|
|
6022
6032
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6024
6034
|
* @deprecated
|
|
6025
6035
|
*/
|
|
6026
6036
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
6027
6037
|
/**
|
|
6028
6038
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-lonely-if.md
|
|
6030
6040
|
*/
|
|
6031
6041
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
6032
6042
|
/**
|
|
6033
6043
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6035
6045
|
*/
|
|
6036
6046
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6037
6047
|
/**
|
|
6038
6048
|
* Disallow named usage of default import and export.
|
|
6039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-named-default.md
|
|
6040
6050
|
*/
|
|
6041
6051
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
6042
6052
|
/**
|
|
6043
6053
|
* Disallow negated conditions.
|
|
6044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negated-condition.md
|
|
6045
6055
|
*/
|
|
6046
6056
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
6047
6057
|
/**
|
|
6048
6058
|
* Disallow negated expression in equality check.
|
|
6049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6050
6060
|
*/
|
|
6051
6061
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
6052
6062
|
/**
|
|
6053
6063
|
* Disallow nested ternary expressions.
|
|
6054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-nested-ternary.md
|
|
6055
6065
|
*/
|
|
6056
6066
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
6057
6067
|
/**
|
|
6058
6068
|
* Disallow `new Array()`.
|
|
6059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-array.md
|
|
6060
6070
|
*/
|
|
6061
6071
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
6062
6072
|
/**
|
|
6063
6073
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-buffer.md
|
|
6065
6075
|
*/
|
|
6066
6076
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
6067
6077
|
/**
|
|
6068
6078
|
* Disallow the use of the `null` literal.
|
|
6069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-null.md
|
|
6070
6080
|
*/
|
|
6071
6081
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
6072
6082
|
/**
|
|
6073
6083
|
* Disallow the use of objects as default parameters.
|
|
6074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6075
6085
|
*/
|
|
6076
6086
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
6077
6087
|
/**
|
|
6078
6088
|
* Disallow `process.exit()`.
|
|
6079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-process-exit.md
|
|
6080
6090
|
*/
|
|
6081
6091
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
6082
6092
|
/**
|
|
6083
6093
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6085
6095
|
*/
|
|
6086
6096
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6087
6097
|
/**
|
|
6088
6098
|
* Disallow classes that only have static members.
|
|
6089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-static-only-class.md
|
|
6090
6100
|
*/
|
|
6091
6101
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
6092
6102
|
/**
|
|
6093
6103
|
* Disallow `then` property.
|
|
6094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-thenable.md
|
|
6095
6105
|
*/
|
|
6096
6106
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
6097
6107
|
/**
|
|
6098
6108
|
* Disallow assigning `this` to a variable.
|
|
6099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-this-assignment.md
|
|
6100
6110
|
*/
|
|
6101
6111
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
6102
6112
|
/**
|
|
6103
6113
|
* Disallow comparing `undefined` using `typeof`.
|
|
6104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-typeof-undefined.md
|
|
6105
6115
|
*/
|
|
6106
6116
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
6107
6117
|
/**
|
|
6108
6118
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6110
6120
|
*/
|
|
6111
6121
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6112
6122
|
/**
|
|
6113
6123
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6115
6125
|
*/
|
|
6116
6126
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
6117
6127
|
/**
|
|
6118
6128
|
* Disallow awaiting non-promise values.
|
|
6119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-await.md
|
|
6120
6130
|
*/
|
|
6121
6131
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
6122
6132
|
/**
|
|
6123
6133
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6125
6135
|
*/
|
|
6126
6136
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
6127
6137
|
/**
|
|
6128
6138
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6130
6140
|
*/
|
|
6131
6141
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
6132
6142
|
/**
|
|
6133
6143
|
* Disallow unreadable array destructuring.
|
|
6134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6135
6145
|
*/
|
|
6136
6146
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
6137
6147
|
/**
|
|
6138
6148
|
* Disallow unreadable IIFEs.
|
|
6139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-iife.md
|
|
6140
6150
|
*/
|
|
6141
6151
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
6142
6152
|
/**
|
|
6143
6153
|
* Disallow unused object properties.
|
|
6144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unused-properties.md
|
|
6145
6155
|
*/
|
|
6146
6156
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
6147
6157
|
/**
|
|
6148
6158
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-collection-argument.md
|
|
6150
6160
|
*/
|
|
6151
6161
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>
|
|
6152
6162
|
/**
|
|
6153
6163
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6155
6165
|
*/
|
|
6156
6166
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
6157
6167
|
/**
|
|
6158
6168
|
* Disallow useless fallback when spreading in object literals.
|
|
6159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
6160
6170
|
*/
|
|
6161
6171
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
6172
|
+
/**
|
|
6173
|
+
* Disallow unnecessary `.toArray()` on iterators.
|
|
6174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
6175
|
+
*/
|
|
6176
|
+
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>
|
|
6162
6177
|
/**
|
|
6163
6178
|
* Disallow useless array length check.
|
|
6164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-length-check.md
|
|
6165
6180
|
*/
|
|
6166
6181
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
6167
6182
|
/**
|
|
6168
6183
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
6170
6185
|
*/
|
|
6171
6186
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
6172
6187
|
/**
|
|
6173
6188
|
* Disallow unnecessary spread.
|
|
6174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-spread.md
|
|
6175
6190
|
*/
|
|
6176
6191
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
6177
6192
|
/**
|
|
6178
6193
|
* Disallow useless case in switch statements.
|
|
6179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-switch-case.md
|
|
6180
6195
|
*/
|
|
6181
6196
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
6182
6197
|
/**
|
|
6183
6198
|
* Disallow useless `undefined`.
|
|
6184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-undefined.md
|
|
6185
6200
|
*/
|
|
6186
6201
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
6187
6202
|
/**
|
|
6188
6203
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-zero-fractions.md
|
|
6190
6205
|
*/
|
|
6191
6206
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
6192
6207
|
/**
|
|
6193
6208
|
* Enforce proper case for numeric literals.
|
|
6194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/number-literal-case.md
|
|
6195
6210
|
*/
|
|
6196
6211
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
6197
6212
|
/**
|
|
6198
6213
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/numeric-separators-style.md
|
|
6200
6215
|
*/
|
|
6201
6216
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
6202
6217
|
/**
|
|
6203
6218
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-add-event-listener.md
|
|
6205
6220
|
*/
|
|
6206
6221
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
6207
6222
|
/**
|
|
6208
6223
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-find.md
|
|
6210
6225
|
*/
|
|
6211
6226
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
6212
6227
|
/**
|
|
6213
6228
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat.md
|
|
6215
6230
|
*/
|
|
6216
6231
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
6217
6232
|
/**
|
|
6218
6233
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat-map.md
|
|
6220
6235
|
*/
|
|
6221
6236
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
6222
6237
|
/**
|
|
6223
6238
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-index-of.md
|
|
6225
6240
|
*/
|
|
6226
6241
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
6227
6242
|
/**
|
|
6228
6243
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-some.md
|
|
6230
6245
|
*/
|
|
6231
6246
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
6232
6247
|
/**
|
|
6233
6248
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-at.md
|
|
6235
6250
|
*/
|
|
6236
6251
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
6237
6252
|
/**
|
|
6238
6253
|
* Prefer `BigInt` literals over the constructor.
|
|
6239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-bigint-literals.md
|
|
6240
6255
|
*/
|
|
6241
6256
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
|
|
6242
6257
|
/**
|
|
6243
6258
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
6245
6260
|
*/
|
|
6246
6261
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
6247
6262
|
/**
|
|
6248
6263
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-class-fields.md
|
|
6250
6265
|
*/
|
|
6251
6266
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
6252
6267
|
/**
|
|
6253
6268
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-classlist-toggle.md
|
|
6255
6270
|
*/
|
|
6256
6271
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
|
|
6257
6272
|
/**
|
|
6258
6273
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-code-point.md
|
|
6260
6275
|
*/
|
|
6261
6276
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
6262
6277
|
/**
|
|
6263
6278
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-date-now.md
|
|
6265
6280
|
*/
|
|
6266
6281
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
6267
6282
|
/**
|
|
6268
6283
|
* Prefer default parameters over reassignment.
|
|
6269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-default-parameters.md
|
|
6270
6285
|
*/
|
|
6271
6286
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
6272
6287
|
/**
|
|
6273
6288
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-append.md
|
|
6275
6290
|
*/
|
|
6276
6291
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
6277
6292
|
/**
|
|
6278
6293
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
6280
6295
|
*/
|
|
6281
6296
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
6282
6297
|
/**
|
|
6283
6298
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-remove.md
|
|
6285
6300
|
*/
|
|
6286
6301
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
6287
6302
|
/**
|
|
6288
6303
|
* Prefer `.textContent` over `.innerText`.
|
|
6289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
6290
6305
|
*/
|
|
6291
6306
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
6292
6307
|
/**
|
|
6293
6308
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-event-target.md
|
|
6295
6310
|
*/
|
|
6296
6311
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
6297
6312
|
/**
|
|
6298
6313
|
* Prefer `export…from` when re-exporting.
|
|
6299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-export-from.md
|
|
6300
6315
|
*/
|
|
6301
6316
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
6302
6317
|
/**
|
|
6303
6318
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-global-this.md
|
|
6305
6320
|
*/
|
|
6306
6321
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
6307
6322
|
/**
|
|
6308
6323
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6310
6325
|
*/
|
|
6311
6326
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
6312
6327
|
/**
|
|
6313
6328
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-includes.md
|
|
6315
6330
|
*/
|
|
6316
6331
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
6317
6332
|
/**
|
|
6318
6333
|
* Prefer reading a JSON file as a buffer.
|
|
6319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
6320
6335
|
*/
|
|
6321
6336
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
6322
6337
|
/**
|
|
6323
6338
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6325
6340
|
*/
|
|
6326
6341
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
6327
6342
|
/**
|
|
6328
6343
|
* Prefer using a logical operator over a ternary.
|
|
6329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6330
6345
|
*/
|
|
6331
6346
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
6332
6347
|
/**
|
|
6333
6348
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-min-max.md
|
|
6335
6350
|
*/
|
|
6336
6351
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
6337
6352
|
/**
|
|
6338
6353
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-trunc.md
|
|
6340
6355
|
*/
|
|
6341
6356
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
6342
6357
|
/**
|
|
6343
6358
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6345
6360
|
*/
|
|
6346
6361
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
6347
6362
|
/**
|
|
6348
6363
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6350
6365
|
*/
|
|
6351
6366
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
6352
6367
|
/**
|
|
6353
6368
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-module.md
|
|
6355
6370
|
*/
|
|
6356
6371
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
6357
6372
|
/**
|
|
6358
6373
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6360
6375
|
*/
|
|
6361
6376
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
6362
6377
|
/**
|
|
6363
6378
|
* Prefer negative index over `.length - index` when possible.
|
|
6364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-negative-index.md
|
|
6365
6380
|
*/
|
|
6366
6381
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
6367
6382
|
/**
|
|
6368
6383
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-node-protocol.md
|
|
6370
6385
|
*/
|
|
6371
6386
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
6372
6387
|
/**
|
|
6373
6388
|
* Prefer `Number` static properties over global ones.
|
|
6374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-number-properties.md
|
|
6375
6390
|
*/
|
|
6376
6391
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
6377
6392
|
/**
|
|
6378
6393
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-object-from-entries.md
|
|
6380
6395
|
*/
|
|
6381
6396
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
6382
6397
|
/**
|
|
6383
6398
|
* Prefer omitting the `catch` binding parameter.
|
|
6384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6385
6400
|
*/
|
|
6386
6401
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
6387
6402
|
/**
|
|
6388
6403
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-prototype-methods.md
|
|
6390
6405
|
*/
|
|
6391
6406
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
6392
6407
|
/**
|
|
6393
6408
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-query-selector.md
|
|
6395
6410
|
*/
|
|
6396
6411
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
6397
6412
|
/**
|
|
6398
6413
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-reflect-apply.md
|
|
6400
6415
|
*/
|
|
6401
6416
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
6402
6417
|
/**
|
|
6403
6418
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-regexp-test.md
|
|
6405
6420
|
*/
|
|
6406
6421
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
6407
6422
|
/**
|
|
6408
6423
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-response-static-json.md
|
|
6410
6425
|
*/
|
|
6411
6426
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>
|
|
6412
6427
|
/**
|
|
6413
6428
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-has.md
|
|
6415
6430
|
*/
|
|
6416
6431
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
6417
6432
|
/**
|
|
6418
6433
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-size.md
|
|
6420
6435
|
*/
|
|
6421
6436
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
6437
|
+
/**
|
|
6438
|
+
* Prefer simple conditions first in logical expressions.
|
|
6439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-simple-condition-first.md
|
|
6440
|
+
*/
|
|
6441
|
+
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>
|
|
6422
6442
|
/**
|
|
6423
6443
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-single-call.md
|
|
6425
6445
|
*/
|
|
6426
6446
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
6427
6447
|
/**
|
|
6428
6448
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-spread.md
|
|
6430
6450
|
*/
|
|
6431
6451
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
6432
6452
|
/**
|
|
6433
6453
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-raw.md
|
|
6435
6455
|
*/
|
|
6436
6456
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
6437
6457
|
/**
|
|
6438
6458
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-replace-all.md
|
|
6440
6460
|
*/
|
|
6441
6461
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
6442
6462
|
/**
|
|
6443
6463
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-slice.md
|
|
6445
6465
|
*/
|
|
6446
6466
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
6447
6467
|
/**
|
|
6448
6468
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
6450
6470
|
*/
|
|
6451
6471
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
6452
6472
|
/**
|
|
6453
6473
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6455
6475
|
*/
|
|
6456
6476
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
6457
6477
|
/**
|
|
6458
6478
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-structured-clone.md
|
|
6460
6480
|
*/
|
|
6461
6481
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
6462
6482
|
/**
|
|
6463
6483
|
* Prefer `switch` over multiple `else-if`.
|
|
6464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-switch.md
|
|
6465
6485
|
*/
|
|
6466
6486
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
6467
6487
|
/**
|
|
6468
6488
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-ternary.md
|
|
6470
6490
|
*/
|
|
6471
6491
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
6472
6492
|
/**
|
|
6473
6493
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-top-level-await.md
|
|
6475
6495
|
*/
|
|
6476
6496
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
6477
6497
|
/**
|
|
6478
6498
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-type-error.md
|
|
6480
6500
|
*/
|
|
6481
6501
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
6482
6502
|
/**
|
|
6483
6503
|
* Prevent abbreviations.
|
|
6484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prevent-abbreviations.md
|
|
6485
6505
|
*/
|
|
6486
6506
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
6487
6507
|
/**
|
|
6488
6508
|
* Enforce consistent relative URL style.
|
|
6489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/relative-url-style.md
|
|
6490
6510
|
*/
|
|
6491
6511
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
6492
6512
|
/**
|
|
6493
6513
|
* Enforce using the separator argument with `Array#join()`.
|
|
6494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-array-join-separator.md
|
|
6495
6515
|
*/
|
|
6496
6516
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
6497
6517
|
/**
|
|
6498
6518
|
* Require non-empty module attributes for imports and exports
|
|
6499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-attributes.md
|
|
6500
6520
|
*/
|
|
6501
6521
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
|
|
6502
6522
|
/**
|
|
6503
6523
|
* Require non-empty specifier list in import and export statements.
|
|
6504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-specifiers.md
|
|
6505
6525
|
*/
|
|
6506
6526
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
6507
6527
|
/**
|
|
6508
6528
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6510
6530
|
*/
|
|
6511
6531
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
6512
6532
|
/**
|
|
6513
6533
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-post-message-target-origin.md
|
|
6515
6535
|
*/
|
|
6516
6536
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
6517
6537
|
/**
|
|
6518
6538
|
* Enforce better string content.
|
|
6519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/string-content.md
|
|
6520
6540
|
*/
|
|
6521
6541
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
6522
6542
|
/**
|
|
6523
6543
|
* Enforce consistent brace style for `case` clauses.
|
|
6524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-braces.md
|
|
6525
6545
|
*/
|
|
6526
6546
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
6547
|
+
/**
|
|
6548
|
+
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
6549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-break-position.md
|
|
6550
|
+
*/
|
|
6551
|
+
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>
|
|
6527
6552
|
/**
|
|
6528
6553
|
* Fix whitespace-insensitive template indentation.
|
|
6529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/template-indent.md
|
|
6530
6555
|
*/
|
|
6531
6556
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
6532
6557
|
/**
|
|
6533
6558
|
* Enforce consistent case for text encoding identifiers.
|
|
6534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6535
6560
|
*/
|
|
6536
6561
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>
|
|
6537
6562
|
/**
|
|
6538
6563
|
* Require `new` when creating an error.
|
|
6539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/throw-new-error.md
|
|
6540
6565
|
*/
|
|
6541
6566
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
6542
6567
|
/**
|
|
@@ -12090,6 +12115,8 @@ type LogicalAssignmentOperators = (([]|["always"]|["always", {
|
|
|
12090
12115
|
type MarkdownFencedCodeLanguage = []|[{
|
|
12091
12116
|
required?: string[]
|
|
12092
12117
|
}]
|
|
12118
|
+
// ----- markdown/fenced-code-meta -----
|
|
12119
|
+
type MarkdownFencedCodeMeta = []|[("always" | "never")]
|
|
12093
12120
|
// ----- markdown/heading-increment -----
|
|
12094
12121
|
type MarkdownHeadingIncrement = []|[{
|
|
12095
12122
|
frontmatterTitle?: string
|
|
@@ -12098,6 +12125,7 @@ type MarkdownHeadingIncrement = []|[{
|
|
|
12098
12125
|
type MarkdownNoDuplicateDefinitions = []|[{
|
|
12099
12126
|
allowDefinitions?: string[]
|
|
12100
12127
|
allowFootnoteDefinitions?: string[]
|
|
12128
|
+
checkFootnoteDefinitions?: boolean
|
|
12101
12129
|
}]
|
|
12102
12130
|
// ----- markdown/no-duplicate-headings -----
|
|
12103
12131
|
type MarkdownNoDuplicateHeadings = []|[{
|
|
@@ -12139,6 +12167,7 @@ type MarkdownNoSpaceInEmphasis = []|[{
|
|
|
12139
12167
|
type MarkdownNoUnusedDefinitions = []|[{
|
|
12140
12168
|
allowDefinitions?: string[]
|
|
12141
12169
|
allowFootnoteDefinitions?: string[]
|
|
12170
|
+
checkFootnoteDefinitions?: boolean
|
|
12142
12171
|
}]
|
|
12143
12172
|
// ----- markdown/table-column-count -----
|
|
12144
12173
|
type MarkdownTableColumnCount = []|[{
|
|
@@ -18162,25 +18191,36 @@ type TomlTableBracketSpacing = []|[("always" | "never")]
|
|
|
18162
18191
|
type UnicodeBom = []|[("always" | "never")]
|
|
18163
18192
|
// ----- unicorn/better-regex -----
|
|
18164
18193
|
type UnicornBetterRegex = []|[{
|
|
18194
|
+
|
|
18165
18195
|
sortCharacterClasses?: boolean
|
|
18166
18196
|
}]
|
|
18167
18197
|
// ----- unicorn/catch-error-name -----
|
|
18168
18198
|
type UnicornCatchErrorName = []|[{
|
|
18199
|
+
|
|
18169
18200
|
name?: string
|
|
18201
|
+
|
|
18170
18202
|
ignore?: unknown[]
|
|
18171
18203
|
}]
|
|
18172
18204
|
// ----- unicorn/consistent-function-scoping -----
|
|
18173
18205
|
type UnicornConsistentFunctionScoping = []|[{
|
|
18206
|
+
|
|
18174
18207
|
checkArrowFunctions?: boolean
|
|
18175
18208
|
}]
|
|
18176
18209
|
// ----- unicorn/escape-case -----
|
|
18177
18210
|
type UnicornEscapeCase = []|[("uppercase" | "lowercase")]
|
|
18178
18211
|
// ----- unicorn/expiring-todo-comments -----
|
|
18179
18212
|
type UnicornExpiringTodoComments = []|[{
|
|
18213
|
+
|
|
18180
18214
|
terms?: string[]
|
|
18215
|
+
|
|
18181
18216
|
ignore?: unknown[]
|
|
18217
|
+
|
|
18218
|
+
ignoreDates?: boolean
|
|
18219
|
+
|
|
18182
18220
|
ignoreDatesOnPullRequests?: boolean
|
|
18221
|
+
|
|
18183
18222
|
allowWarningComments?: boolean
|
|
18223
|
+
|
|
18184
18224
|
date?: string
|
|
18185
18225
|
}]
|
|
18186
18226
|
// ----- unicorn/explicit-length-check -----
|
|
@@ -18189,25 +18229,40 @@ type UnicornExplicitLengthCheck = []|[{
|
|
|
18189
18229
|
}]
|
|
18190
18230
|
// ----- unicorn/filename-case -----
|
|
18191
18231
|
type UnicornFilenameCase = []|[({
|
|
18232
|
+
|
|
18192
18233
|
case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase")
|
|
18234
|
+
|
|
18193
18235
|
ignore?: unknown[]
|
|
18236
|
+
|
|
18194
18237
|
multipleFileExtensions?: boolean
|
|
18195
18238
|
} | {
|
|
18239
|
+
|
|
18196
18240
|
cases?: {
|
|
18241
|
+
|
|
18197
18242
|
camelCase?: boolean
|
|
18243
|
+
|
|
18198
18244
|
snakeCase?: boolean
|
|
18245
|
+
|
|
18199
18246
|
kebabCase?: boolean
|
|
18247
|
+
|
|
18200
18248
|
pascalCase?: boolean
|
|
18201
18249
|
}
|
|
18250
|
+
|
|
18202
18251
|
ignore?: unknown[]
|
|
18252
|
+
|
|
18203
18253
|
multipleFileExtensions?: boolean
|
|
18204
18254
|
})]
|
|
18205
18255
|
// ----- unicorn/import-style -----
|
|
18206
18256
|
type UnicornImportStyle = []|[{
|
|
18257
|
+
|
|
18207
18258
|
checkImport?: boolean
|
|
18259
|
+
|
|
18208
18260
|
checkDynamicImport?: boolean
|
|
18261
|
+
|
|
18209
18262
|
checkExportFrom?: boolean
|
|
18263
|
+
|
|
18210
18264
|
checkRequire?: boolean
|
|
18265
|
+
|
|
18211
18266
|
extendDefaultStyles?: boolean
|
|
18212
18267
|
styles?: _UnicornImportStyle_ModuleStyles
|
|
18213
18268
|
}]
|
|
@@ -18220,15 +18275,20 @@ interface _UnicornImportStyle_BooleanObject {
|
|
|
18220
18275
|
}
|
|
18221
18276
|
// ----- unicorn/isolated-functions -----
|
|
18222
18277
|
type UnicornIsolatedFunctions = []|[{
|
|
18278
|
+
|
|
18223
18279
|
overrideGlobals?: {
|
|
18224
18280
|
[k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined
|
|
18225
18281
|
}
|
|
18282
|
+
|
|
18226
18283
|
functions?: string[]
|
|
18284
|
+
|
|
18227
18285
|
selectors?: string[]
|
|
18286
|
+
|
|
18228
18287
|
comments?: string[]
|
|
18229
18288
|
}]
|
|
18230
18289
|
// ----- unicorn/no-array-reduce -----
|
|
18231
18290
|
type UnicornNoArrayReduce = []|[{
|
|
18291
|
+
|
|
18232
18292
|
allowSimpleOperations?: boolean
|
|
18233
18293
|
}]
|
|
18234
18294
|
// ----- unicorn/no-array-reverse -----
|
|
@@ -18250,26 +18310,33 @@ type UnicornNoInstanceofBuiltins = []|[{
|
|
|
18250
18310
|
type UnicornNoKeywordPrefix = []|[{
|
|
18251
18311
|
|
|
18252
18312
|
disallowedPrefixes?: []|[string]
|
|
18313
|
+
|
|
18253
18314
|
checkProperties?: boolean
|
|
18315
|
+
|
|
18254
18316
|
onlyCamelCase?: boolean
|
|
18255
18317
|
}]
|
|
18256
18318
|
// ----- unicorn/no-null -----
|
|
18257
18319
|
type UnicornNoNull = []|[{
|
|
18320
|
+
|
|
18258
18321
|
checkStrictEquality?: boolean
|
|
18259
18322
|
}]
|
|
18260
18323
|
// ----- unicorn/no-typeof-undefined -----
|
|
18261
18324
|
type UnicornNoTypeofUndefined = []|[{
|
|
18325
|
+
|
|
18262
18326
|
checkGlobalVariables?: boolean
|
|
18263
18327
|
}]
|
|
18264
18328
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
18265
18329
|
type UnicornNoUnnecessaryPolyfills = []|[{
|
|
18330
|
+
|
|
18266
18331
|
targets: (string | unknown[] | {
|
|
18267
18332
|
[k: string]: unknown | undefined
|
|
18268
18333
|
})
|
|
18269
18334
|
}]
|
|
18270
18335
|
// ----- unicorn/no-useless-undefined -----
|
|
18271
18336
|
type UnicornNoUselessUndefined = []|[{
|
|
18337
|
+
|
|
18272
18338
|
checkArguments?: boolean
|
|
18339
|
+
|
|
18273
18340
|
checkArrowFunctionBody?: boolean
|
|
18274
18341
|
}]
|
|
18275
18342
|
// ----- unicorn/number-literal-case -----
|
|
@@ -18279,84 +18346,119 @@ type UnicornNumberLiteralCase = []|[{
|
|
|
18279
18346
|
// ----- unicorn/numeric-separators-style -----
|
|
18280
18347
|
type UnicornNumericSeparatorsStyle = []|[{
|
|
18281
18348
|
binary?: {
|
|
18349
|
+
|
|
18282
18350
|
onlyIfContainsSeparator?: boolean
|
|
18351
|
+
|
|
18283
18352
|
minimumDigits?: number
|
|
18353
|
+
|
|
18284
18354
|
groupLength?: number
|
|
18285
18355
|
}
|
|
18286
18356
|
octal?: {
|
|
18357
|
+
|
|
18287
18358
|
onlyIfContainsSeparator?: boolean
|
|
18359
|
+
|
|
18288
18360
|
minimumDigits?: number
|
|
18361
|
+
|
|
18289
18362
|
groupLength?: number
|
|
18290
18363
|
}
|
|
18291
18364
|
hexadecimal?: {
|
|
18365
|
+
|
|
18292
18366
|
onlyIfContainsSeparator?: boolean
|
|
18367
|
+
|
|
18293
18368
|
minimumDigits?: number
|
|
18369
|
+
|
|
18294
18370
|
groupLength?: number
|
|
18295
18371
|
}
|
|
18296
18372
|
number?: {
|
|
18373
|
+
|
|
18297
18374
|
onlyIfContainsSeparator?: boolean
|
|
18375
|
+
|
|
18298
18376
|
minimumDigits?: number
|
|
18377
|
+
|
|
18299
18378
|
groupLength?: number
|
|
18300
18379
|
}
|
|
18380
|
+
|
|
18301
18381
|
onlyIfContainsSeparator?: boolean
|
|
18302
18382
|
}]
|
|
18303
18383
|
// ----- unicorn/prefer-add-event-listener -----
|
|
18304
18384
|
type UnicornPreferAddEventListener = []|[{
|
|
18385
|
+
|
|
18305
18386
|
excludedPackages?: string[]
|
|
18306
18387
|
}]
|
|
18307
18388
|
// ----- unicorn/prefer-array-find -----
|
|
18308
18389
|
type UnicornPreferArrayFind = []|[{
|
|
18390
|
+
|
|
18309
18391
|
checkFromLast?: boolean
|
|
18310
18392
|
}]
|
|
18311
18393
|
// ----- unicorn/prefer-array-flat -----
|
|
18312
18394
|
type UnicornPreferArrayFlat = []|[{
|
|
18395
|
+
|
|
18313
18396
|
functions?: unknown[]
|
|
18314
18397
|
}]
|
|
18315
18398
|
// ----- unicorn/prefer-at -----
|
|
18316
18399
|
type UnicornPreferAt = []|[{
|
|
18400
|
+
|
|
18317
18401
|
getLastElementFunctions?: unknown[]
|
|
18402
|
+
|
|
18318
18403
|
checkAllIndexAccess?: boolean
|
|
18319
18404
|
}]
|
|
18320
18405
|
// ----- unicorn/prefer-export-from -----
|
|
18321
18406
|
type UnicornPreferExportFrom = []|[{
|
|
18407
|
+
|
|
18322
18408
|
ignoreUsedVariables?: boolean
|
|
18323
18409
|
}]
|
|
18324
18410
|
// ----- unicorn/prefer-number-properties -----
|
|
18325
18411
|
type UnicornPreferNumberProperties = []|[{
|
|
18412
|
+
|
|
18326
18413
|
checkInfinity?: boolean
|
|
18414
|
+
|
|
18327
18415
|
checkNaN?: boolean
|
|
18328
18416
|
}]
|
|
18329
18417
|
// ----- unicorn/prefer-object-from-entries -----
|
|
18330
18418
|
type UnicornPreferObjectFromEntries = []|[{
|
|
18419
|
+
|
|
18331
18420
|
functions?: unknown[]
|
|
18332
18421
|
}]
|
|
18333
18422
|
// ----- unicorn/prefer-single-call -----
|
|
18334
18423
|
type UnicornPreferSingleCall = []|[{
|
|
18424
|
+
|
|
18335
18425
|
ignore?: unknown[]
|
|
18336
18426
|
}]
|
|
18337
18427
|
// ----- unicorn/prefer-structured-clone -----
|
|
18338
18428
|
type UnicornPreferStructuredClone = []|[{
|
|
18429
|
+
|
|
18339
18430
|
functions?: unknown[]
|
|
18340
18431
|
}]
|
|
18341
18432
|
// ----- unicorn/prefer-switch -----
|
|
18342
18433
|
type UnicornPreferSwitch = []|[{
|
|
18434
|
+
|
|
18343
18435
|
minimumCases?: number
|
|
18436
|
+
|
|
18344
18437
|
emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case")
|
|
18345
18438
|
}]
|
|
18346
18439
|
// ----- unicorn/prefer-ternary -----
|
|
18347
18440
|
type UnicornPreferTernary = []|[("always" | "only-single-line")]
|
|
18348
18441
|
// ----- unicorn/prevent-abbreviations -----
|
|
18349
18442
|
type UnicornPreventAbbreviations = []|[{
|
|
18443
|
+
|
|
18350
18444
|
checkProperties?: boolean
|
|
18445
|
+
|
|
18351
18446
|
checkVariables?: boolean
|
|
18447
|
+
|
|
18352
18448
|
checkDefaultAndNamespaceImports?: (boolean | string)
|
|
18449
|
+
|
|
18353
18450
|
checkShorthandImports?: (boolean | string)
|
|
18451
|
+
|
|
18354
18452
|
checkShorthandProperties?: boolean
|
|
18453
|
+
|
|
18355
18454
|
checkFilenames?: boolean
|
|
18455
|
+
|
|
18356
18456
|
extendDefaultReplacements?: boolean
|
|
18357
18457
|
replacements?: _UnicornPreventAbbreviations_Abbreviations
|
|
18458
|
+
|
|
18358
18459
|
extendDefaultAllowList?: boolean
|
|
18359
18460
|
allowList?: _UnicornPreventAbbreviations_BooleanObject
|
|
18461
|
+
|
|
18360
18462
|
ignore?: unknown[]
|
|
18361
18463
|
}]
|
|
18362
18464
|
type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined
|
|
@@ -18366,10 +18468,14 @@ interface _UnicornPreventAbbreviations_Abbreviations {
|
|
|
18366
18468
|
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
18367
18469
|
[k: string]: boolean | undefined
|
|
18368
18470
|
}
|
|
18471
|
+
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
18472
|
+
[k: string]: boolean | undefined
|
|
18473
|
+
}
|
|
18369
18474
|
// ----- unicorn/relative-url-style -----
|
|
18370
18475
|
type UnicornRelativeUrlStyle = []|[("never" | "always")]
|
|
18371
18476
|
// ----- unicorn/string-content -----
|
|
18372
18477
|
type UnicornStringContent = []|[{
|
|
18478
|
+
|
|
18373
18479
|
patterns?: {
|
|
18374
18480
|
[k: string]: (string | {
|
|
18375
18481
|
suggest: string
|
|
@@ -18382,14 +18488,20 @@ type UnicornStringContent = []|[{
|
|
|
18382
18488
|
type UnicornSwitchCaseBraces = []|[("always" | "avoid")]
|
|
18383
18489
|
// ----- unicorn/template-indent -----
|
|
18384
18490
|
type UnicornTemplateIndent = []|[{
|
|
18491
|
+
|
|
18385
18492
|
indent?: (string | number)
|
|
18493
|
+
|
|
18386
18494
|
tags?: string[]
|
|
18495
|
+
|
|
18387
18496
|
functions?: string[]
|
|
18497
|
+
|
|
18388
18498
|
selectors?: string[]
|
|
18499
|
+
|
|
18389
18500
|
comments?: string[]
|
|
18390
18501
|
}]
|
|
18391
18502
|
// ----- unicorn/text-encoding-identifier-case -----
|
|
18392
18503
|
type UnicornTextEncodingIdentifierCase = []|[{
|
|
18504
|
+
|
|
18393
18505
|
withDash?: boolean
|
|
18394
18506
|
}]
|
|
18395
18507
|
// ----- unused-imports/no-unused-imports -----
|