@2digits/eslint-config 4.8.2 → 4.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +175 -140
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -938,7 +938,7 @@ interface RuleOptions {
|
|
|
938
938
|
* Reports invalid alignment of JSDoc block asterisks.
|
|
939
939
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header
|
|
940
940
|
*/
|
|
941
|
-
'jsdoc/check-alignment'?: Linter.RuleEntry<
|
|
941
|
+
'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment>;
|
|
942
942
|
/**
|
|
943
943
|
* Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
|
|
944
944
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
|
|
@@ -2946,6 +2946,11 @@ interface RuleOptions {
|
|
|
2946
2946
|
* @see https://eslint.org/docs/latest/rules/prefer-template
|
|
2947
2947
|
*/
|
|
2948
2948
|
'prefer-template'?: Linter.RuleEntry<[]>;
|
|
2949
|
+
/**
|
|
2950
|
+
* Disallow losing originally caught error when re-throwing custom errors
|
|
2951
|
+
* @see https://eslint.org/docs/latest/rules/preserve-caught-error
|
|
2952
|
+
*/
|
|
2953
|
+
'preserve-caught-error'?: Linter.RuleEntry<PreserveCaughtError>;
|
|
2949
2954
|
/**
|
|
2950
2955
|
* Require quotes around object literal property names
|
|
2951
2956
|
* @see https://eslint.org/docs/latest/rules/quote-props
|
|
@@ -6663,690 +6668,710 @@ interface RuleOptions {
|
|
|
6663
6668
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6664
6669
|
/**
|
|
6665
6670
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/better-regex.md
|
|
6667
6672
|
*/
|
|
6668
6673
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
6669
6674
|
/**
|
|
6670
6675
|
* Enforce a specific parameter name in catch clauses.
|
|
6671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/catch-error-name.md
|
|
6672
6677
|
*/
|
|
6673
6678
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6674
6679
|
/**
|
|
6675
6680
|
* Enforce consistent assertion style with `node:assert`.
|
|
6676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-assert.md
|
|
6677
6682
|
*/
|
|
6678
6683
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6679
6684
|
/**
|
|
6680
6685
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-date-clone.md
|
|
6682
6687
|
*/
|
|
6683
6688
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6684
6689
|
/**
|
|
6685
6690
|
* Use destructured variables over properties.
|
|
6686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-destructuring.md
|
|
6687
6692
|
*/
|
|
6688
6693
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6689
6694
|
/**
|
|
6690
6695
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-empty-array-spread.md
|
|
6692
6697
|
*/
|
|
6693
6698
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6694
6699
|
/**
|
|
6695
6700
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-existence-index-check.md
|
|
6697
6702
|
*/
|
|
6698
6703
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6699
6704
|
/**
|
|
6700
6705
|
* Move function definitions to the highest possible scope.
|
|
6701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-function-scoping.md
|
|
6702
6707
|
*/
|
|
6703
6708
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6704
6709
|
/**
|
|
6705
6710
|
* Enforce correct `Error` subclassing.
|
|
6706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/custom-error-definition.md
|
|
6707
6712
|
*/
|
|
6708
6713
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6709
6714
|
/**
|
|
6710
6715
|
* Enforce no spaces between braces.
|
|
6711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/empty-brace-spaces.md
|
|
6712
6717
|
*/
|
|
6713
6718
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6714
6719
|
/**
|
|
6715
6720
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/error-message.md
|
|
6717
6722
|
*/
|
|
6718
6723
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6719
6724
|
/**
|
|
6720
6725
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/escape-case.md
|
|
6722
6727
|
*/
|
|
6723
6728
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6724
6729
|
/**
|
|
6725
6730
|
* Add expiration conditions to TODO comments.
|
|
6726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/expiring-todo-comments.md
|
|
6727
6732
|
*/
|
|
6728
6733
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6729
6734
|
/**
|
|
6730
6735
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/explicit-length-check.md
|
|
6732
6737
|
*/
|
|
6733
6738
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6734
6739
|
/**
|
|
6735
6740
|
* Enforce a case style for filenames.
|
|
6736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/filename-case.md
|
|
6737
6742
|
*/
|
|
6738
6743
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6739
6744
|
/**
|
|
6740
6745
|
* Enforce specific import styles per module.
|
|
6741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/import-style.md
|
|
6742
6747
|
*/
|
|
6743
6748
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6744
6749
|
/**
|
|
6745
6750
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/new-for-builtins.md
|
|
6747
6752
|
*/
|
|
6748
6753
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6749
6754
|
/**
|
|
6750
6755
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-abusive-eslint-disable.md
|
|
6752
6757
|
*/
|
|
6753
6758
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6754
6759
|
/**
|
|
6755
6760
|
* Disallow recursive access to `this` within getters and setters.
|
|
6756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-accessor-recursion.md
|
|
6757
6762
|
*/
|
|
6758
6763
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6759
6764
|
/**
|
|
6760
6765
|
* Disallow anonymous functions and classes as the default export.
|
|
6761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-anonymous-default-export.md
|
|
6762
6767
|
*/
|
|
6763
6768
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6764
6769
|
/**
|
|
6765
6770
|
* Prevent passing a function reference directly to iterator methods.
|
|
6766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-callback-reference.md
|
|
6767
6772
|
*/
|
|
6768
6773
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
6769
6774
|
/**
|
|
6770
6775
|
* Prefer `for…of` over the `forEach` method.
|
|
6771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-for-each.md
|
|
6772
6777
|
*/
|
|
6773
6778
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
6774
6779
|
/**
|
|
6775
6780
|
* Disallow using the `this` argument in array methods.
|
|
6776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-method-this-argument.md
|
|
6777
6782
|
*/
|
|
6778
6783
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6779
6784
|
/**
|
|
6780
6785
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-array-push-push
|
|
6782
6787
|
* @deprecated
|
|
6783
6788
|
*/
|
|
6784
6789
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6785
6790
|
/**
|
|
6786
6791
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-reduce.md
|
|
6788
6793
|
*/
|
|
6789
6794
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6790
6795
|
/**
|
|
6791
6796
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-reverse.md
|
|
6793
6798
|
*/
|
|
6794
6799
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6800
|
+
/**
|
|
6801
|
+
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-sort.md
|
|
6803
|
+
*/
|
|
6804
|
+
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6795
6805
|
/**
|
|
6796
6806
|
* Disallow member access from await expression.
|
|
6797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-await-expression-member.md
|
|
6798
6808
|
*/
|
|
6799
6809
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6800
6810
|
/**
|
|
6801
6811
|
* Disallow using `await` in `Promise` method parameters.
|
|
6802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-await-in-promise-methods.md
|
|
6803
6813
|
*/
|
|
6804
6814
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6805
6815
|
/**
|
|
6806
6816
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-console-spaces.md
|
|
6808
6818
|
*/
|
|
6809
6819
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6810
6820
|
/**
|
|
6811
6821
|
* Do not use `document.cookie` directly.
|
|
6812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-document-cookie.md
|
|
6813
6823
|
*/
|
|
6814
6824
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6815
6825
|
/**
|
|
6816
6826
|
* Disallow empty files.
|
|
6817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-empty-file.md
|
|
6818
6828
|
*/
|
|
6819
6829
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
6820
6830
|
/**
|
|
6821
6831
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-for-loop.md
|
|
6823
6833
|
*/
|
|
6824
6834
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6825
6835
|
/**
|
|
6826
6836
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-hex-escape.md
|
|
6828
6838
|
*/
|
|
6829
6839
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6830
6840
|
/**
|
|
6831
6841
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-instanceof-array
|
|
6833
6843
|
* @deprecated
|
|
6834
6844
|
*/
|
|
6835
6845
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6836
6846
|
/**
|
|
6837
6847
|
* Disallow `instanceof` with built-in objects
|
|
6838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-instanceof-builtins.md
|
|
6839
6849
|
*/
|
|
6840
6850
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6841
6851
|
/**
|
|
6842
6852
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-invalid-fetch-options.md
|
|
6844
6854
|
*/
|
|
6845
6855
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6846
6856
|
/**
|
|
6847
6857
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-invalid-remove-event-listener.md
|
|
6849
6859
|
*/
|
|
6850
6860
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6851
6861
|
/**
|
|
6852
6862
|
* Disallow identifiers starting with `new` or `class`.
|
|
6853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-keyword-prefix.md
|
|
6854
6864
|
*/
|
|
6855
6865
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6856
6866
|
/**
|
|
6857
6867
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-length-as-slice-end
|
|
6859
6869
|
* @deprecated
|
|
6860
6870
|
*/
|
|
6861
6871
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6862
6872
|
/**
|
|
6863
6873
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-lonely-if.md
|
|
6865
6875
|
*/
|
|
6866
6876
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6867
6877
|
/**
|
|
6868
6878
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-magic-array-flat-depth.md
|
|
6870
6880
|
*/
|
|
6871
6881
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6872
6882
|
/**
|
|
6873
6883
|
* Disallow named usage of default import and export.
|
|
6874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-named-default.md
|
|
6875
6885
|
*/
|
|
6876
6886
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6877
6887
|
/**
|
|
6878
6888
|
* Disallow negated conditions.
|
|
6879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-negated-condition.md
|
|
6880
6890
|
*/
|
|
6881
6891
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6882
6892
|
/**
|
|
6883
6893
|
* Disallow negated expression in equality check.
|
|
6884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-negation-in-equality-check.md
|
|
6885
6895
|
*/
|
|
6886
6896
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6887
6897
|
/**
|
|
6888
6898
|
* Disallow nested ternary expressions.
|
|
6889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-nested-ternary.md
|
|
6890
6900
|
*/
|
|
6891
6901
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6892
6902
|
/**
|
|
6893
6903
|
* Disallow `new Array()`.
|
|
6894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-new-array.md
|
|
6895
6905
|
*/
|
|
6896
6906
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6897
6907
|
/**
|
|
6898
6908
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-new-buffer.md
|
|
6900
6910
|
*/
|
|
6901
6911
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6902
6912
|
/**
|
|
6903
6913
|
* Disallow the use of the `null` literal.
|
|
6904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-null.md
|
|
6905
6915
|
*/
|
|
6906
6916
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6907
6917
|
/**
|
|
6908
6918
|
* Disallow the use of objects as default parameters.
|
|
6909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-object-as-default-parameter.md
|
|
6910
6920
|
*/
|
|
6911
6921
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6912
6922
|
/**
|
|
6913
6923
|
* Disallow `process.exit()`.
|
|
6914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-process-exit.md
|
|
6915
6925
|
*/
|
|
6916
6926
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6917
6927
|
/**
|
|
6918
6928
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-single-promise-in-promise-methods.md
|
|
6920
6930
|
*/
|
|
6921
6931
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6922
6932
|
/**
|
|
6923
6933
|
* Disallow classes that only have static members.
|
|
6924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-static-only-class.md
|
|
6925
6935
|
*/
|
|
6926
6936
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6927
6937
|
/**
|
|
6928
6938
|
* Disallow `then` property.
|
|
6929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-thenable.md
|
|
6930
6940
|
*/
|
|
6931
6941
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6932
6942
|
/**
|
|
6933
6943
|
* Disallow assigning `this` to a variable.
|
|
6934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-this-assignment.md
|
|
6935
6945
|
*/
|
|
6936
6946
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6937
6947
|
/**
|
|
6938
6948
|
* Disallow comparing `undefined` using `typeof`.
|
|
6939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-typeof-undefined.md
|
|
6940
6950
|
*/
|
|
6941
6951
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6942
6952
|
/**
|
|
6943
6953
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6945
6955
|
*/
|
|
6946
6956
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6947
6957
|
/**
|
|
6948
6958
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-array-splice-count.md
|
|
6950
6960
|
*/
|
|
6951
6961
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6952
6962
|
/**
|
|
6953
6963
|
* Disallow awaiting non-promise values.
|
|
6954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-await.md
|
|
6955
6965
|
*/
|
|
6956
6966
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6957
6967
|
/**
|
|
6958
6968
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-polyfills.md
|
|
6960
6970
|
*/
|
|
6961
6971
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6962
6972
|
/**
|
|
6963
6973
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-slice-end.md
|
|
6965
6975
|
*/
|
|
6966
6976
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6967
6977
|
/**
|
|
6968
6978
|
* Disallow unreadable array destructuring.
|
|
6969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unreadable-array-destructuring.md
|
|
6970
6980
|
*/
|
|
6971
6981
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
6972
6982
|
/**
|
|
6973
6983
|
* Disallow unreadable IIFEs.
|
|
6974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unreadable-iife.md
|
|
6975
6985
|
*/
|
|
6976
6986
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6977
6987
|
/**
|
|
6978
6988
|
* Disallow unused object properties.
|
|
6979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unused-properties.md
|
|
6980
6990
|
*/
|
|
6981
6991
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6982
6992
|
/**
|
|
6983
6993
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6985
6995
|
*/
|
|
6986
6996
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
6987
6997
|
/**
|
|
6988
6998
|
* Disallow useless fallback when spreading in object literals.
|
|
6989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-fallback-in-spread.md
|
|
6990
7000
|
*/
|
|
6991
7001
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
6992
7002
|
/**
|
|
6993
7003
|
* Disallow useless array length check.
|
|
6994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-length-check.md
|
|
6995
7005
|
*/
|
|
6996
7006
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6997
7007
|
/**
|
|
6998
7008
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-promise-resolve-reject.md
|
|
7000
7010
|
*/
|
|
7001
7011
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7002
7012
|
/**
|
|
7003
7013
|
* Disallow unnecessary spread.
|
|
7004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-spread.md
|
|
7005
7015
|
*/
|
|
7006
7016
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7007
7017
|
/**
|
|
7008
7018
|
* Disallow useless case in switch statements.
|
|
7009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-switch-case.md
|
|
7010
7020
|
*/
|
|
7011
7021
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7012
7022
|
/**
|
|
7013
7023
|
* Disallow useless `undefined`.
|
|
7014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-undefined.md
|
|
7015
7025
|
*/
|
|
7016
7026
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7017
7027
|
/**
|
|
7018
7028
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-zero-fractions.md
|
|
7020
7030
|
*/
|
|
7021
7031
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7022
7032
|
/**
|
|
7023
7033
|
* Enforce proper case for numeric literals.
|
|
7024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/number-literal-case.md
|
|
7025
7035
|
*/
|
|
7026
7036
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7027
7037
|
/**
|
|
7028
7038
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/numeric-separators-style.md
|
|
7030
7040
|
*/
|
|
7031
7041
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7032
7042
|
/**
|
|
7033
7043
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-add-event-listener.md
|
|
7035
7045
|
*/
|
|
7036
7046
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7037
7047
|
/**
|
|
7038
7048
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-find.md
|
|
7040
7050
|
*/
|
|
7041
7051
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7042
7052
|
/**
|
|
7043
7053
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-flat.md
|
|
7045
7055
|
*/
|
|
7046
7056
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7047
7057
|
/**
|
|
7048
7058
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
7049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-flat-map.md
|
|
7050
7060
|
*/
|
|
7051
7061
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7052
7062
|
/**
|
|
7053
7063
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-index-of.md
|
|
7055
7065
|
*/
|
|
7056
7066
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7057
7067
|
/**
|
|
7058
7068
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-some.md
|
|
7060
7070
|
*/
|
|
7061
7071
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7062
7072
|
/**
|
|
7063
7073
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-at.md
|
|
7065
7075
|
*/
|
|
7066
7076
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7077
|
+
/**
|
|
7078
|
+
* Prefer `BigInt` literals over the constructor.
|
|
7079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-bigint-literals.md
|
|
7080
|
+
*/
|
|
7081
|
+
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7067
7082
|
/**
|
|
7068
7083
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-blob-reading-methods.md
|
|
7070
7085
|
*/
|
|
7071
7086
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7072
7087
|
/**
|
|
7073
7088
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-class-fields.md
|
|
7075
7090
|
*/
|
|
7076
7091
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7092
|
+
/**
|
|
7093
|
+
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-classlist-toggle.md
|
|
7095
|
+
*/
|
|
7096
|
+
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7077
7097
|
/**
|
|
7078
7098
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-code-point.md
|
|
7080
7100
|
*/
|
|
7081
7101
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7082
7102
|
/**
|
|
7083
7103
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-date-now.md
|
|
7085
7105
|
*/
|
|
7086
7106
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7087
7107
|
/**
|
|
7088
7108
|
* Prefer default parameters over reassignment.
|
|
7089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-default-parameters.md
|
|
7090
7110
|
*/
|
|
7091
7111
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7092
7112
|
/**
|
|
7093
7113
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
7094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-append.md
|
|
7095
7115
|
*/
|
|
7096
7116
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7097
7117
|
/**
|
|
7098
7118
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
7099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-dataset.md
|
|
7100
7120
|
*/
|
|
7101
7121
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7102
7122
|
/**
|
|
7103
7123
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-remove.md
|
|
7105
7125
|
*/
|
|
7106
7126
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7107
7127
|
/**
|
|
7108
7128
|
* Prefer `.textContent` over `.innerText`.
|
|
7109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-text-content.md
|
|
7110
7130
|
*/
|
|
7111
7131
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7112
7132
|
/**
|
|
7113
7133
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-event-target.md
|
|
7115
7135
|
*/
|
|
7116
7136
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7117
7137
|
/**
|
|
7118
7138
|
* Prefer `export…from` when re-exporting.
|
|
7119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-export-from.md
|
|
7120
7140
|
*/
|
|
7121
7141
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7122
7142
|
/**
|
|
7123
7143
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-global-this.md
|
|
7125
7145
|
*/
|
|
7126
7146
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7127
7147
|
/**
|
|
7128
7148
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-import-meta-properties.md
|
|
7130
7150
|
*/
|
|
7131
7151
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7132
7152
|
/**
|
|
7133
7153
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-includes.md
|
|
7135
7155
|
*/
|
|
7136
7156
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7137
7157
|
/**
|
|
7138
7158
|
* Prefer reading a JSON file as a buffer.
|
|
7139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-json-parse-buffer.md
|
|
7140
7160
|
*/
|
|
7141
7161
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7142
7162
|
/**
|
|
7143
7163
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
7144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-keyboard-event-key.md
|
|
7145
7165
|
*/
|
|
7146
7166
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7147
7167
|
/**
|
|
7148
7168
|
* Prefer using a logical operator over a ternary.
|
|
7149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7150
7170
|
*/
|
|
7151
7171
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7152
7172
|
/**
|
|
7153
7173
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-math-min-max.md
|
|
7155
7175
|
*/
|
|
7156
7176
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7157
7177
|
/**
|
|
7158
7178
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
7159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-math-trunc.md
|
|
7160
7180
|
*/
|
|
7161
7181
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7162
7182
|
/**
|
|
7163
7183
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
7164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-modern-dom-apis.md
|
|
7165
7185
|
*/
|
|
7166
7186
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7167
7187
|
/**
|
|
7168
7188
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-modern-math-apis.md
|
|
7170
7190
|
*/
|
|
7171
7191
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7172
7192
|
/**
|
|
7173
7193
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-module.md
|
|
7175
7195
|
*/
|
|
7176
7196
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7177
7197
|
/**
|
|
7178
7198
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-native-coercion-functions.md
|
|
7180
7200
|
*/
|
|
7181
7201
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7182
7202
|
/**
|
|
7183
7203
|
* Prefer negative index over `.length - index` when possible.
|
|
7184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-negative-index.md
|
|
7185
7205
|
*/
|
|
7186
7206
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7187
7207
|
/**
|
|
7188
7208
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-node-protocol.md
|
|
7190
7210
|
*/
|
|
7191
7211
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7192
7212
|
/**
|
|
7193
7213
|
* Prefer `Number` static properties over global ones.
|
|
7194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-number-properties.md
|
|
7195
7215
|
*/
|
|
7196
7216
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7197
7217
|
/**
|
|
7198
7218
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-object-from-entries.md
|
|
7200
7220
|
*/
|
|
7201
7221
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7202
7222
|
/**
|
|
7203
7223
|
* Prefer omitting the `catch` binding parameter.
|
|
7204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-optional-catch-binding.md
|
|
7205
7225
|
*/
|
|
7206
7226
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7207
7227
|
/**
|
|
7208
7228
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-prototype-methods.md
|
|
7210
7230
|
*/
|
|
7211
7231
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7212
7232
|
/**
|
|
7213
7233
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
7214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-query-selector.md
|
|
7215
7235
|
*/
|
|
7216
7236
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
7217
7237
|
/**
|
|
7218
7238
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-reflect-apply.md
|
|
7220
7240
|
*/
|
|
7221
7241
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7222
7242
|
/**
|
|
7223
7243
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
7224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-regexp-test.md
|
|
7225
7245
|
*/
|
|
7226
7246
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7227
7247
|
/**
|
|
7228
7248
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-set-has.md
|
|
7230
7250
|
*/
|
|
7231
7251
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
7232
7252
|
/**
|
|
7233
7253
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-set-size.md
|
|
7235
7255
|
*/
|
|
7236
7256
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7237
7257
|
/**
|
|
7238
7258
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-single-call.md
|
|
7240
7260
|
*/
|
|
7241
7261
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7242
7262
|
/**
|
|
7243
7263
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
7244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-spread.md
|
|
7245
7265
|
*/
|
|
7246
7266
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7247
7267
|
/**
|
|
7248
7268
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-raw.md
|
|
7250
7270
|
*/
|
|
7251
7271
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7252
7272
|
/**
|
|
7253
7273
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
7254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-replace-all.md
|
|
7255
7275
|
*/
|
|
7256
7276
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7257
7277
|
/**
|
|
7258
7278
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-slice.md
|
|
7260
7280
|
*/
|
|
7261
7281
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7262
7282
|
/**
|
|
7263
7283
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-starts-ends-with.md
|
|
7265
7285
|
*/
|
|
7266
7286
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7267
7287
|
/**
|
|
7268
7288
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-trim-start-end.md
|
|
7270
7290
|
*/
|
|
7271
7291
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7272
7292
|
/**
|
|
7273
7293
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-structured-clone.md
|
|
7275
7295
|
*/
|
|
7276
7296
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7277
7297
|
/**
|
|
7278
7298
|
* Prefer `switch` over multiple `else-if`.
|
|
7279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-switch.md
|
|
7280
7300
|
*/
|
|
7281
7301
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7282
7302
|
/**
|
|
7283
7303
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-ternary.md
|
|
7285
7305
|
*/
|
|
7286
7306
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7287
7307
|
/**
|
|
7288
7308
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-top-level-await.md
|
|
7290
7310
|
*/
|
|
7291
7311
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7292
7312
|
/**
|
|
7293
7313
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-type-error.md
|
|
7295
7315
|
*/
|
|
7296
7316
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7297
7317
|
/**
|
|
7298
7318
|
* Prevent abbreviations.
|
|
7299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prevent-abbreviations.md
|
|
7300
7320
|
*/
|
|
7301
7321
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
7302
7322
|
/**
|
|
7303
7323
|
* Enforce consistent relative URL style.
|
|
7304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/relative-url-style.md
|
|
7305
7325
|
*/
|
|
7306
7326
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7307
7327
|
/**
|
|
7308
7328
|
* Enforce using the separator argument with `Array#join()`.
|
|
7309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-array-join-separator.md
|
|
7310
7330
|
*/
|
|
7311
7331
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7332
|
+
/**
|
|
7333
|
+
* Require non-empty module attributes for imports and exports
|
|
7334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-module-attributes.md
|
|
7335
|
+
*/
|
|
7336
|
+
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7312
7337
|
/**
|
|
7313
7338
|
* Require non-empty specifier list in import and export statements.
|
|
7314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-module-specifiers.md
|
|
7315
7340
|
*/
|
|
7316
7341
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7317
7342
|
/**
|
|
7318
7343
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7320
7345
|
*/
|
|
7321
7346
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7322
7347
|
/**
|
|
7323
7348
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-post-message-target-origin.md
|
|
7325
7350
|
*/
|
|
7326
7351
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7327
7352
|
/**
|
|
7328
7353
|
* Enforce better string content.
|
|
7329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/string-content.md
|
|
7330
7355
|
*/
|
|
7331
7356
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7332
7357
|
/**
|
|
7333
7358
|
* Enforce consistent brace style for `case` clauses.
|
|
7334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/switch-case-braces.md
|
|
7335
7360
|
*/
|
|
7336
7361
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7337
7362
|
/**
|
|
7338
7363
|
* Fix whitespace-insensitive template indentation.
|
|
7339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/template-indent.md
|
|
7340
7365
|
*/
|
|
7341
7366
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7342
7367
|
/**
|
|
7343
7368
|
* Enforce consistent case for text encoding identifiers.
|
|
7344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/text-encoding-identifier-case.md
|
|
7345
7370
|
*/
|
|
7346
7371
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
|
|
7347
7372
|
/**
|
|
7348
7373
|
* Require `new` when creating an error.
|
|
7349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/throw-new-error.md
|
|
7350
7375
|
*/
|
|
7351
7376
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7352
7377
|
/**
|
|
@@ -8089,6 +8114,10 @@ type IndentLegacy = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
8089
8114
|
type InitDeclarations = ([] | ["always"] | [] | ["never"] | ["never", {
|
|
8090
8115
|
ignoreForLoopInit?: boolean;
|
|
8091
8116
|
}]);
|
|
8117
|
+
// ----- jsdoc/check-alignment -----
|
|
8118
|
+
type JsdocCheckAlignment = [] | [{
|
|
8119
|
+
innerIndent?: number;
|
|
8120
|
+
}];
|
|
8092
8121
|
// ----- jsdoc/check-examples -----
|
|
8093
8122
|
type JsdocCheckExamples = [] | [{
|
|
8094
8123
|
allowInlineConfig?: boolean;
|
|
@@ -10219,6 +10248,10 @@ type PreferReflect = [] | [{
|
|
|
10219
10248
|
type PreferRegexLiterals = [] | [{
|
|
10220
10249
|
disallowRedundantWrapping?: boolean;
|
|
10221
10250
|
}];
|
|
10251
|
+
// ----- preserve-caught-error -----
|
|
10252
|
+
type PreserveCaughtError = [] | [{
|
|
10253
|
+
requireCatchParameter?: boolean;
|
|
10254
|
+
}];
|
|
10222
10255
|
// ----- quote-props -----
|
|
10223
10256
|
type QuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
10224
10257
|
keywords?: boolean;
|
|
@@ -10253,8 +10286,6 @@ type ReactHooksExhaustiveDeps = [] | [{
|
|
|
10253
10286
|
// ----- react-naming-convention/component-name -----
|
|
10254
10287
|
type ReactNamingConventionComponentName = [] | [(("PascalCase" | "CONSTANT_CASE") | {
|
|
10255
10288
|
allowAllCaps?: boolean;
|
|
10256
|
-
allowLeadingUnderscore?: boolean;
|
|
10257
|
-
allowNamespace?: boolean;
|
|
10258
10289
|
excepts?: string[];
|
|
10259
10290
|
rule?: ("PascalCase" | "CONSTANT_CASE");
|
|
10260
10291
|
})];
|
|
@@ -12883,6 +12914,10 @@ type UnicornNoArrayReduce = [] | [{
|
|
|
12883
12914
|
type UnicornNoArrayReverse = [] | [{
|
|
12884
12915
|
allowExpressionStatement?: boolean;
|
|
12885
12916
|
}];
|
|
12917
|
+
// ----- unicorn/no-array-sort -----
|
|
12918
|
+
type UnicornNoArraySort = [] | [{
|
|
12919
|
+
allowExpressionStatement?: boolean;
|
|
12920
|
+
}];
|
|
12886
12921
|
// ----- unicorn/no-instanceof-builtins -----
|
|
12887
12922
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
12888
12923
|
useErrorIsError?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2digits/eslint-config",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.3",
|
|
4
4
|
"description": "Effortlessly enforce best practices and catch errors with this comprehensive ESLint configuration for TypeScript, featuring popular plugins like @typescript-eslint, eslint-plugin-react, and eslint-plugin-unicorn.",
|
|
5
5
|
"homepage": "https://2d-configs.vercel.app/",
|
|
6
6
|
"repository": {
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"public": true,
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
|
|
30
|
-
"@eslint-react/eslint-plugin": "1.
|
|
30
|
+
"@eslint-react/eslint-plugin": "1.53.0",
|
|
31
31
|
"@eslint/compat": "1.3.2",
|
|
32
32
|
"@eslint/css": "0.11.0",
|
|
33
|
-
"@eslint/js": "9.
|
|
33
|
+
"@eslint/js": "9.35.0",
|
|
34
34
|
"@eslint/markdown": "7.2.0",
|
|
35
35
|
"@graphql-eslint/eslint-plugin": "4.4.0",
|
|
36
36
|
"@next/eslint-plugin-next": "15.5.2",
|
|
37
37
|
"@stylistic/eslint-plugin": "5.3.1",
|
|
38
|
-
"@tanstack/eslint-plugin-query": "5.
|
|
38
|
+
"@tanstack/eslint-plugin-query": "5.86.0",
|
|
39
39
|
"@typescript-eslint/parser": "8.42.0",
|
|
40
40
|
"@typescript-eslint/utils": "8.42.0",
|
|
41
41
|
"eslint-config-flat-gitignore": "2.1.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"eslint-plugin-de-morgan": "1.3.1",
|
|
47
47
|
"eslint-plugin-drizzle": "0.2.3",
|
|
48
48
|
"eslint-plugin-github-action": "0.0.16",
|
|
49
|
-
"eslint-plugin-jsdoc": "54.
|
|
49
|
+
"eslint-plugin-jsdoc": "54.4.0",
|
|
50
50
|
"eslint-plugin-jsonc": "2.20.1",
|
|
51
51
|
"eslint-plugin-n": "17.21.3",
|
|
52
52
|
"eslint-plugin-pnpm": "1.1.1",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
55
55
|
"eslint-plugin-regexp": "2.10.0",
|
|
56
56
|
"eslint-plugin-sonarjs": "3.0.5",
|
|
57
|
-
"eslint-plugin-storybook": "9.1.
|
|
57
|
+
"eslint-plugin-storybook": "9.1.5",
|
|
58
58
|
"eslint-plugin-tailwindcss": "3.18.2",
|
|
59
59
|
"eslint-plugin-turbo": "2.5.6",
|
|
60
|
-
"eslint-plugin-unicorn": "
|
|
60
|
+
"eslint-plugin-unicorn": "61.0.1",
|
|
61
61
|
"eslint-plugin-yml": "1.18.0",
|
|
62
62
|
"find-up": "7.0.0",
|
|
63
63
|
"globals": "16.3.0",
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
"tailwind-csstree": "0.1.4",
|
|
68
68
|
"typescript-eslint": "8.42.0",
|
|
69
69
|
"yaml-eslint-parser": "1.3.0",
|
|
70
|
-
"@2digits/eslint-plugin": "3.1.
|
|
70
|
+
"@2digits/eslint-plugin": "3.1.17",
|
|
71
71
|
"@2digits/constants": "1.1.7"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@eslint/config-inspector": "1.2.0",
|
|
75
75
|
"@types/react": "19.1.12",
|
|
76
|
-
"dedent": "1.
|
|
77
|
-
"eslint": "9.
|
|
76
|
+
"dedent": "1.7.0",
|
|
77
|
+
"eslint": "9.35.0",
|
|
78
78
|
"eslint-typegen": "2.3.0",
|
|
79
79
|
"execa": "9.6.0",
|
|
80
80
|
"react": "19.1.1",
|