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