@bfra.me/eslint-config 0.48.1 → 0.50.0
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 +170 -148
- package/lib/index.js +40 -20
- package/package.json +17 -17
- package/src/config.d.ts +0 -2
- package/src/configs/jsonc.ts +4 -6
- package/src/configs/markdown.ts +18 -8
- package/src/configs/pnpm.ts +5 -6
- package/src/configs/prettier.ts +23 -2
- package/src/configs/react.ts +2 -2
- package/src/configs/toml.ts +1 -1
- package/src/rules.d.ts +170 -146
package/lib/index.d.ts
CHANGED
|
@@ -5806,725 +5806,730 @@ interface Rules {
|
|
|
5806
5806
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
5807
5807
|
/**
|
|
5808
5808
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md
|
|
5810
5810
|
*/
|
|
5811
5811
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
5812
5812
|
/**
|
|
5813
5813
|
* Enforce a specific parameter name in catch clauses.
|
|
5814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md
|
|
5815
5815
|
*/
|
|
5816
5816
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
5817
5817
|
/**
|
|
5818
5818
|
* Enforce consistent assertion style with `node:assert`.
|
|
5819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md
|
|
5820
5820
|
*/
|
|
5821
5821
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
5822
5822
|
/**
|
|
5823
5823
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md
|
|
5825
5825
|
*/
|
|
5826
5826
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
5827
5827
|
/**
|
|
5828
5828
|
* Use destructured variables over properties.
|
|
5829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md
|
|
5830
5830
|
*/
|
|
5831
5831
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
5832
5832
|
/**
|
|
5833
5833
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5835
5835
|
*/
|
|
5836
5836
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
5837
5837
|
/**
|
|
5838
5838
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md
|
|
5840
5840
|
*/
|
|
5841
5841
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
5842
5842
|
/**
|
|
5843
5843
|
* Move function definitions to the highest possible scope.
|
|
5844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md
|
|
5845
5845
|
*/
|
|
5846
5846
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
5847
5847
|
/**
|
|
5848
5848
|
* Enforce correct `Error` subclassing.
|
|
5849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md
|
|
5850
5850
|
*/
|
|
5851
5851
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
5852
5852
|
/**
|
|
5853
5853
|
* Enforce no spaces between braces.
|
|
5854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md
|
|
5855
5855
|
*/
|
|
5856
5856
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
5857
5857
|
/**
|
|
5858
5858
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md
|
|
5860
5860
|
*/
|
|
5861
5861
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
5862
5862
|
/**
|
|
5863
5863
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md
|
|
5865
5865
|
*/
|
|
5866
5866
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
5867
5867
|
/**
|
|
5868
5868
|
* Add expiration conditions to TODO comments.
|
|
5869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md
|
|
5870
5870
|
*/
|
|
5871
5871
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
5872
5872
|
/**
|
|
5873
5873
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md
|
|
5875
5875
|
*/
|
|
5876
5876
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
5877
5877
|
/**
|
|
5878
5878
|
* Enforce a case style for filenames.
|
|
5879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md
|
|
5880
5880
|
*/
|
|
5881
5881
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
5882
5882
|
/**
|
|
5883
5883
|
* Enforce specific import styles per module.
|
|
5884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md
|
|
5885
5885
|
*/
|
|
5886
5886
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
5887
|
+
/**
|
|
5888
|
+
* Prevent usage of variables from outside the scope of isolated functions.
|
|
5889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
|
|
5890
|
+
*/
|
|
5891
|
+
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>
|
|
5887
5892
|
/**
|
|
5888
5893
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md
|
|
5890
5895
|
*/
|
|
5891
5896
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
5892
5897
|
/**
|
|
5893
5898
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5895
5900
|
*/
|
|
5896
5901
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
5897
5902
|
/**
|
|
5898
5903
|
* Disallow recursive access to `this` within getters and setters.
|
|
5899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md
|
|
5900
5905
|
*/
|
|
5901
5906
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
5902
5907
|
/**
|
|
5903
5908
|
* Disallow anonymous functions and classes as the default export.
|
|
5904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md
|
|
5905
5910
|
*/
|
|
5906
5911
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
5907
5912
|
/**
|
|
5908
5913
|
* Prevent passing a function reference directly to iterator methods.
|
|
5909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md
|
|
5910
5915
|
*/
|
|
5911
5916
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
5912
5917
|
/**
|
|
5913
5918
|
* Prefer `for…of` over the `forEach` method.
|
|
5914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md
|
|
5915
5920
|
*/
|
|
5916
5921
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
5917
5922
|
/**
|
|
5918
5923
|
* Disallow using the `this` argument in array methods.
|
|
5919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md
|
|
5920
5925
|
*/
|
|
5921
5926
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
5922
5927
|
/**
|
|
5923
5928
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
5925
5930
|
* @deprecated
|
|
5926
5931
|
*/
|
|
5927
5932
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
5928
5933
|
/**
|
|
5929
5934
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md
|
|
5931
5936
|
*/
|
|
5932
5937
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
5933
5938
|
/**
|
|
5934
5939
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md
|
|
5936
5941
|
*/
|
|
5937
5942
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
5938
5943
|
/**
|
|
5939
5944
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
|
|
5941
5946
|
*/
|
|
5942
5947
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
|
|
5943
5948
|
/**
|
|
5944
5949
|
* Disallow member access from await expression.
|
|
5945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md
|
|
5946
5951
|
*/
|
|
5947
5952
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
5948
5953
|
/**
|
|
5949
5954
|
* Disallow using `await` in `Promise` method parameters.
|
|
5950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5951
5956
|
*/
|
|
5952
5957
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
5953
5958
|
/**
|
|
5954
5959
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md
|
|
5956
5961
|
*/
|
|
5957
5962
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
5958
5963
|
/**
|
|
5959
5964
|
* Do not use `document.cookie` directly.
|
|
5960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md
|
|
5961
5966
|
*/
|
|
5962
5967
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
5963
5968
|
/**
|
|
5964
5969
|
* Disallow empty files.
|
|
5965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md
|
|
5966
5971
|
*/
|
|
5967
5972
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
5968
5973
|
/**
|
|
5969
5974
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md
|
|
5971
5976
|
*/
|
|
5972
5977
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
5973
5978
|
/**
|
|
5974
5979
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md
|
|
5976
5981
|
*/
|
|
5977
5982
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
5978
5983
|
/**
|
|
5979
5984
|
* Disallow immediate mutation after variable assignment.
|
|
5980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
|
|
5981
5986
|
*/
|
|
5982
5987
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>
|
|
5983
5988
|
/**
|
|
5984
5989
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
5986
5991
|
* @deprecated
|
|
5987
5992
|
*/
|
|
5988
5993
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
5989
5994
|
/**
|
|
5990
5995
|
* Disallow `instanceof` with built-in objects
|
|
5991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md
|
|
5992
5997
|
*/
|
|
5993
5998
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
5994
5999
|
/**
|
|
5995
6000
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5997
6002
|
*/
|
|
5998
6003
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
5999
6004
|
/**
|
|
6000
6005
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6002
6007
|
*/
|
|
6003
6008
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
6004
6009
|
/**
|
|
6005
6010
|
* Disallow identifiers starting with `new` or `class`.
|
|
6006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md
|
|
6007
6012
|
*/
|
|
6008
6013
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
6009
6014
|
/**
|
|
6010
6015
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6012
6017
|
* @deprecated
|
|
6013
6018
|
*/
|
|
6014
6019
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
6015
6020
|
/**
|
|
6016
6021
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md
|
|
6018
6023
|
*/
|
|
6019
6024
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
6020
6025
|
/**
|
|
6021
6026
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6023
6028
|
*/
|
|
6024
6029
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6025
6030
|
/**
|
|
6026
6031
|
* Disallow named usage of default import and export.
|
|
6027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md
|
|
6028
6033
|
*/
|
|
6029
6034
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
6030
6035
|
/**
|
|
6031
6036
|
* Disallow negated conditions.
|
|
6032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md
|
|
6033
6038
|
*/
|
|
6034
6039
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
6035
6040
|
/**
|
|
6036
6041
|
* Disallow negated expression in equality check.
|
|
6037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6038
6043
|
*/
|
|
6039
6044
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
6040
6045
|
/**
|
|
6041
6046
|
* Disallow nested ternary expressions.
|
|
6042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md
|
|
6043
6048
|
*/
|
|
6044
6049
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
6045
6050
|
/**
|
|
6046
6051
|
* Disallow `new Array()`.
|
|
6047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md
|
|
6048
6053
|
*/
|
|
6049
6054
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
6050
6055
|
/**
|
|
6051
6056
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md
|
|
6053
6058
|
*/
|
|
6054
6059
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
6055
6060
|
/**
|
|
6056
6061
|
* Disallow the use of the `null` literal.
|
|
6057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md
|
|
6058
6063
|
*/
|
|
6059
6064
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
6060
6065
|
/**
|
|
6061
6066
|
* Disallow the use of objects as default parameters.
|
|
6062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6063
6068
|
*/
|
|
6064
6069
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
6065
6070
|
/**
|
|
6066
6071
|
* Disallow `process.exit()`.
|
|
6067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md
|
|
6068
6073
|
*/
|
|
6069
6074
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
6070
6075
|
/**
|
|
6071
6076
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6073
6078
|
*/
|
|
6074
6079
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6075
6080
|
/**
|
|
6076
6081
|
* Disallow classes that only have static members.
|
|
6077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md
|
|
6078
6083
|
*/
|
|
6079
6084
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
6080
6085
|
/**
|
|
6081
6086
|
* Disallow `then` property.
|
|
6082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md
|
|
6083
6088
|
*/
|
|
6084
6089
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
6085
6090
|
/**
|
|
6086
6091
|
* Disallow assigning `this` to a variable.
|
|
6087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md
|
|
6088
6093
|
*/
|
|
6089
6094
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
6090
6095
|
/**
|
|
6091
6096
|
* Disallow comparing `undefined` using `typeof`.
|
|
6092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md
|
|
6093
6098
|
*/
|
|
6094
6099
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
6095
6100
|
/**
|
|
6096
6101
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6098
6103
|
*/
|
|
6099
6104
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6100
6105
|
/**
|
|
6101
6106
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6103
6108
|
*/
|
|
6104
6109
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
6105
6110
|
/**
|
|
6106
6111
|
* Disallow awaiting non-promise values.
|
|
6107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md
|
|
6108
6113
|
*/
|
|
6109
6114
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
6110
6115
|
/**
|
|
6111
6116
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6113
6118
|
*/
|
|
6114
6119
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
6115
6120
|
/**
|
|
6116
6121
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6118
6123
|
*/
|
|
6119
6124
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
6120
6125
|
/**
|
|
6121
6126
|
* Disallow unreadable array destructuring.
|
|
6122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6123
6128
|
*/
|
|
6124
6129
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
6125
6130
|
/**
|
|
6126
6131
|
* Disallow unreadable IIFEs.
|
|
6127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md
|
|
6128
6133
|
*/
|
|
6129
6134
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
6130
6135
|
/**
|
|
6131
6136
|
* Disallow unused object properties.
|
|
6132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md
|
|
6133
6138
|
*/
|
|
6134
6139
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
6135
6140
|
/**
|
|
6136
6141
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
|
|
6138
6143
|
*/
|
|
6139
6144
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>
|
|
6140
6145
|
/**
|
|
6141
6146
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6143
6148
|
*/
|
|
6144
6149
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
6145
6150
|
/**
|
|
6146
6151
|
* Disallow useless fallback when spreading in object literals.
|
|
6147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
6148
6153
|
*/
|
|
6149
6154
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
6150
6155
|
/**
|
|
6151
6156
|
* Disallow useless array length check.
|
|
6152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md
|
|
6153
6158
|
*/
|
|
6154
6159
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
6155
6160
|
/**
|
|
6156
6161
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
6158
6163
|
*/
|
|
6159
6164
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
6160
6165
|
/**
|
|
6161
6166
|
* Disallow unnecessary spread.
|
|
6162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md
|
|
6163
6168
|
*/
|
|
6164
6169
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
6165
6170
|
/**
|
|
6166
6171
|
* Disallow useless case in switch statements.
|
|
6167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md
|
|
6168
6173
|
*/
|
|
6169
6174
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
6170
6175
|
/**
|
|
6171
6176
|
* Disallow useless `undefined`.
|
|
6172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md
|
|
6173
6178
|
*/
|
|
6174
6179
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
6175
6180
|
/**
|
|
6176
6181
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md
|
|
6178
6183
|
*/
|
|
6179
6184
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
6180
6185
|
/**
|
|
6181
6186
|
* Enforce proper case for numeric literals.
|
|
6182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md
|
|
6183
6188
|
*/
|
|
6184
6189
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
6185
6190
|
/**
|
|
6186
6191
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md
|
|
6188
6193
|
*/
|
|
6189
6194
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
6190
6195
|
/**
|
|
6191
6196
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md
|
|
6193
6198
|
*/
|
|
6194
6199
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
6195
6200
|
/**
|
|
6196
6201
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md
|
|
6198
6203
|
*/
|
|
6199
6204
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
6200
6205
|
/**
|
|
6201
6206
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md
|
|
6203
6208
|
*/
|
|
6204
6209
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
6205
6210
|
/**
|
|
6206
6211
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md
|
|
6208
6213
|
*/
|
|
6209
6214
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
6210
6215
|
/**
|
|
6211
6216
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md
|
|
6213
6218
|
*/
|
|
6214
6219
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
6215
6220
|
/**
|
|
6216
6221
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md
|
|
6218
6223
|
*/
|
|
6219
6224
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
6220
6225
|
/**
|
|
6221
6226
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md
|
|
6223
6228
|
*/
|
|
6224
6229
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
6225
6230
|
/**
|
|
6226
6231
|
* Prefer `BigInt` literals over the constructor.
|
|
6227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
|
|
6228
6233
|
*/
|
|
6229
6234
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
|
|
6230
6235
|
/**
|
|
6231
6236
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
6233
6238
|
*/
|
|
6234
6239
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
6235
6240
|
/**
|
|
6236
6241
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md
|
|
6238
6243
|
*/
|
|
6239
6244
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
6240
6245
|
/**
|
|
6241
6246
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
|
|
6243
6248
|
*/
|
|
6244
6249
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
|
|
6245
6250
|
/**
|
|
6246
6251
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md
|
|
6248
6253
|
*/
|
|
6249
6254
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
6250
6255
|
/**
|
|
6251
6256
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md
|
|
6253
6258
|
*/
|
|
6254
6259
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
6255
6260
|
/**
|
|
6256
6261
|
* Prefer default parameters over reassignment.
|
|
6257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md
|
|
6258
6263
|
*/
|
|
6259
6264
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
6260
6265
|
/**
|
|
6261
6266
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md
|
|
6263
6268
|
*/
|
|
6264
6269
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
6265
6270
|
/**
|
|
6266
6271
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
6268
6273
|
*/
|
|
6269
6274
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
6270
6275
|
/**
|
|
6271
6276
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md
|
|
6273
6278
|
*/
|
|
6274
6279
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
6275
6280
|
/**
|
|
6276
6281
|
* Prefer `.textContent` over `.innerText`.
|
|
6277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
6278
6283
|
*/
|
|
6279
6284
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
6280
6285
|
/**
|
|
6281
6286
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md
|
|
6283
6288
|
*/
|
|
6284
6289
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
6285
6290
|
/**
|
|
6286
6291
|
* Prefer `export…from` when re-exporting.
|
|
6287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md
|
|
6288
6293
|
*/
|
|
6289
6294
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
6290
6295
|
/**
|
|
6291
6296
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md
|
|
6293
6298
|
*/
|
|
6294
6299
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
6295
6300
|
/**
|
|
6296
6301
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6298
6303
|
*/
|
|
6299
6304
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
6300
6305
|
/**
|
|
6301
6306
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md
|
|
6303
6308
|
*/
|
|
6304
6309
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
6305
6310
|
/**
|
|
6306
6311
|
* Prefer reading a JSON file as a buffer.
|
|
6307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
6308
6313
|
*/
|
|
6309
6314
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
6310
6315
|
/**
|
|
6311
6316
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6313
6318
|
*/
|
|
6314
6319
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
6315
6320
|
/**
|
|
6316
6321
|
* Prefer using a logical operator over a ternary.
|
|
6317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6318
6323
|
*/
|
|
6319
6324
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
6320
6325
|
/**
|
|
6321
6326
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md
|
|
6323
6328
|
*/
|
|
6324
6329
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
6325
6330
|
/**
|
|
6326
6331
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md
|
|
6328
6333
|
*/
|
|
6329
6334
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
6330
6335
|
/**
|
|
6331
6336
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6333
6338
|
*/
|
|
6334
6339
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
6335
6340
|
/**
|
|
6336
6341
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6338
6343
|
*/
|
|
6339
6344
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
6340
6345
|
/**
|
|
6341
6346
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md
|
|
6343
6348
|
*/
|
|
6344
6349
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
6345
6350
|
/**
|
|
6346
6351
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6348
6353
|
*/
|
|
6349
6354
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
6350
6355
|
/**
|
|
6351
6356
|
* Prefer negative index over `.length - index` when possible.
|
|
6352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md
|
|
6353
6358
|
*/
|
|
6354
6359
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
6355
6360
|
/**
|
|
6356
6361
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md
|
|
6358
6363
|
*/
|
|
6359
6364
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
6360
6365
|
/**
|
|
6361
6366
|
* Prefer `Number` static properties over global ones.
|
|
6362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md
|
|
6363
6368
|
*/
|
|
6364
6369
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
6365
6370
|
/**
|
|
6366
6371
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md
|
|
6368
6373
|
*/
|
|
6369
6374
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
6370
6375
|
/**
|
|
6371
6376
|
* Prefer omitting the `catch` binding parameter.
|
|
6372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6373
6378
|
*/
|
|
6374
6379
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
6375
6380
|
/**
|
|
6376
6381
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md
|
|
6378
6383
|
*/
|
|
6379
6384
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
6380
6385
|
/**
|
|
6381
6386
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md
|
|
6383
6388
|
*/
|
|
6384
6389
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
6385
6390
|
/**
|
|
6386
6391
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md
|
|
6388
6393
|
*/
|
|
6389
6394
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
6390
6395
|
/**
|
|
6391
6396
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md
|
|
6393
6398
|
*/
|
|
6394
6399
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
6395
6400
|
/**
|
|
6396
6401
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
|
|
6398
6403
|
*/
|
|
6399
6404
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>
|
|
6400
6405
|
/**
|
|
6401
6406
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md
|
|
6403
6408
|
*/
|
|
6404
6409
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
6405
6410
|
/**
|
|
6406
6411
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md
|
|
6408
6413
|
*/
|
|
6409
6414
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
6410
6415
|
/**
|
|
6411
6416
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md
|
|
6413
6418
|
*/
|
|
6414
6419
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
6415
6420
|
/**
|
|
6416
6421
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md
|
|
6418
6423
|
*/
|
|
6419
6424
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
6420
6425
|
/**
|
|
6421
6426
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md
|
|
6423
6428
|
*/
|
|
6424
6429
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
6425
6430
|
/**
|
|
6426
6431
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md
|
|
6428
6433
|
*/
|
|
6429
6434
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
6430
6435
|
/**
|
|
6431
6436
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md
|
|
6433
6438
|
*/
|
|
6434
6439
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
6435
6440
|
/**
|
|
6436
6441
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
6438
6443
|
*/
|
|
6439
6444
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
6440
6445
|
/**
|
|
6441
6446
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6443
6448
|
*/
|
|
6444
6449
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
6445
6450
|
/**
|
|
6446
6451
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md
|
|
6448
6453
|
*/
|
|
6449
6454
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
6450
6455
|
/**
|
|
6451
6456
|
* Prefer `switch` over multiple `else-if`.
|
|
6452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md
|
|
6453
6458
|
*/
|
|
6454
6459
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
6455
6460
|
/**
|
|
6456
6461
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md
|
|
6458
6463
|
*/
|
|
6459
6464
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
6460
6465
|
/**
|
|
6461
6466
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md
|
|
6463
6468
|
*/
|
|
6464
6469
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
6465
6470
|
/**
|
|
6466
6471
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md
|
|
6468
6473
|
*/
|
|
6469
6474
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
6470
6475
|
/**
|
|
6471
6476
|
* Prevent abbreviations.
|
|
6472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md
|
|
6473
6478
|
*/
|
|
6474
6479
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
6475
6480
|
/**
|
|
6476
6481
|
* Enforce consistent relative URL style.
|
|
6477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md
|
|
6478
6483
|
*/
|
|
6479
6484
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
6480
6485
|
/**
|
|
6481
6486
|
* Enforce using the separator argument with `Array#join()`.
|
|
6482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md
|
|
6483
6488
|
*/
|
|
6484
6489
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
6485
6490
|
/**
|
|
6486
6491
|
* Require non-empty module attributes for imports and exports
|
|
6487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
|
|
6488
6493
|
*/
|
|
6489
6494
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
|
|
6490
6495
|
/**
|
|
6491
6496
|
* Require non-empty specifier list in import and export statements.
|
|
6492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md
|
|
6493
6498
|
*/
|
|
6494
6499
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
6495
6500
|
/**
|
|
6496
6501
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6498
6503
|
*/
|
|
6499
6504
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
6500
6505
|
/**
|
|
6501
6506
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md
|
|
6503
6508
|
*/
|
|
6504
6509
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
6505
6510
|
/**
|
|
6506
6511
|
* Enforce better string content.
|
|
6507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md
|
|
6508
6513
|
*/
|
|
6509
6514
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
6510
6515
|
/**
|
|
6511
6516
|
* Enforce consistent brace style for `case` clauses.
|
|
6512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md
|
|
6513
6518
|
*/
|
|
6514
6519
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
6515
6520
|
/**
|
|
6516
6521
|
* Fix whitespace-insensitive template indentation.
|
|
6517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md
|
|
6518
6523
|
*/
|
|
6519
6524
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
6520
6525
|
/**
|
|
6521
6526
|
* Enforce consistent case for text encoding identifiers.
|
|
6522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6523
6528
|
*/
|
|
6524
6529
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>
|
|
6525
6530
|
/**
|
|
6526
6531
|
* Require `new` when creating an error.
|
|
6527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md
|
|
6528
6533
|
*/
|
|
6529
6534
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
6530
6535
|
/**
|
|
@@ -8268,13 +8273,17 @@ type StylisticPaddedBlocks = []|[(("always" | "never" | "start" | "end") | {
|
|
|
8268
8273
|
}]
|
|
8269
8274
|
// ----- @stylistic/padding-line-between-statements -----
|
|
8270
8275
|
type _StylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
|
|
8271
|
-
type _StylisticPaddingLineBetweenStatementsStatementOption = (
|
|
8276
|
+
type _StylisticPaddingLineBetweenStatementsStatementOption = (_StylisticPaddingLineBetweenStatementsStatementMatcher | [_StylisticPaddingLineBetweenStatementsStatementMatcher, ...(_StylisticPaddingLineBetweenStatementsStatementMatcher)[]])
|
|
8277
|
+
type _StylisticPaddingLineBetweenStatementsStatementMatcher = (_StylisticPaddingLineBetweenStatementsStatementType | _StylisticPaddingLineBetweenStatements_SelectorOption)
|
|
8272
8278
|
type _StylisticPaddingLineBetweenStatementsStatementType = ("*" | "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")
|
|
8273
8279
|
type StylisticPaddingLineBetweenStatements = {
|
|
8274
8280
|
blankLine: _StylisticPaddingLineBetweenStatementsPaddingType
|
|
8275
8281
|
prev: _StylisticPaddingLineBetweenStatementsStatementOption
|
|
8276
8282
|
next: _StylisticPaddingLineBetweenStatementsStatementOption
|
|
8277
8283
|
}[]
|
|
8284
|
+
interface _StylisticPaddingLineBetweenStatements_SelectorOption {
|
|
8285
|
+
selector: string
|
|
8286
|
+
}
|
|
8278
8287
|
// ----- @stylistic/quote-props -----
|
|
8279
8288
|
type StylisticQuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent-as-needed")] | []|[("always" | "as-needed" | "consistent" | "consistent-as-needed")]|[("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
8280
8289
|
keywords?: boolean
|
|
@@ -11067,6 +11076,8 @@ type JsdocTagLines = []|[("always" | "any" | "never")]|[("always" | "any" | "nev
|
|
|
11067
11076
|
|
|
11068
11077
|
startLines?: (number | null)
|
|
11069
11078
|
|
|
11079
|
+
startLinesWithNoTags?: number
|
|
11080
|
+
|
|
11070
11081
|
tags?: {
|
|
11071
11082
|
[k: string]: {
|
|
11072
11083
|
count?: number
|
|
@@ -11141,6 +11152,8 @@ type JsdocTypeFormatting = []|[{
|
|
|
11141
11152
|
|
|
11142
11153
|
objectFieldSeparatorTrailingPunctuation?: boolean
|
|
11143
11154
|
|
|
11155
|
+
objectTypeBracketSpacing?: string
|
|
11156
|
+
|
|
11144
11157
|
parameterDefaultValueSpacing?: string
|
|
11145
11158
|
|
|
11146
11159
|
postMethodNameSpacing?: string
|
|
@@ -11151,6 +11164,8 @@ type JsdocTypeFormatting = []|[{
|
|
|
11151
11164
|
|
|
11152
11165
|
stringQuotes?: ("double" | "single")
|
|
11153
11166
|
|
|
11167
|
+
trailingPunctuationMultilineOnly?: boolean
|
|
11168
|
+
|
|
11154
11169
|
typeBracketSpacing?: string
|
|
11155
11170
|
|
|
11156
11171
|
unionSpacing?: string
|
|
@@ -17363,9 +17378,9 @@ type ReactNamingConventionUseState = []|[{
|
|
|
17363
17378
|
}]
|
|
17364
17379
|
// ----- react-refresh/only-export-components -----
|
|
17365
17380
|
type ReactRefreshOnlyExportComponents = []|[{
|
|
17381
|
+
extraHOCs?: string[]
|
|
17366
17382
|
allowExportNames?: string[]
|
|
17367
17383
|
allowConstantExport?: boolean
|
|
17368
|
-
customHOCs?: string[]
|
|
17369
17384
|
checkJS?: boolean
|
|
17370
17385
|
}]
|
|
17371
17386
|
// ----- react/jsx-shorthand-boolean -----
|
|
@@ -17797,6 +17812,15 @@ interface _UnicornImportStyle_ModuleStyles {
|
|
|
17797
17812
|
interface _UnicornImportStyle_BooleanObject {
|
|
17798
17813
|
[k: string]: boolean | undefined
|
|
17799
17814
|
}
|
|
17815
|
+
// ----- unicorn/isolated-functions -----
|
|
17816
|
+
type UnicornIsolatedFunctions = []|[{
|
|
17817
|
+
overrideGlobals?: {
|
|
17818
|
+
[k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined
|
|
17819
|
+
}
|
|
17820
|
+
functions?: string[]
|
|
17821
|
+
selectors?: string[]
|
|
17822
|
+
comments?: string[]
|
|
17823
|
+
}]
|
|
17800
17824
|
// ----- unicorn/no-array-reduce -----
|
|
17801
17825
|
type UnicornNoArrayReduce = []|[{
|
|
17802
17826
|
allowSimpleOperations?: boolean
|
|
@@ -18402,8 +18426,6 @@ type ConfigNames =
|
|
|
18402
18426
|
| '@bfra.me/javascript/options'
|
|
18403
18427
|
| '@bfra.me/javascript/rules'
|
|
18404
18428
|
| '@bfra.me/jsdoc'
|
|
18405
|
-
| '@bfra.me/jsonc/plugins'
|
|
18406
|
-
| '@bfra.me/jsonc/unnamed1'
|
|
18407
18429
|
| '@bfra.me/jsonc/json-schema/plugins'
|
|
18408
18430
|
| '@bfra.me/jsonc/json-schema/unnamed1'
|
|
18409
18431
|
| '@bfra.me/jsonc/json-schema'
|