@isentinel/eslint-config 3.1.0 → 3.1.2
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/cli.js +1 -1
- package/dist/index.d.ts +161 -137
- package/dist/index.js +3 -0
- package/package.json +3 -3
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -6687,690 +6687,710 @@ interface RuleOptions {
|
|
|
6687
6687
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6688
6688
|
/**
|
|
6689
6689
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
|
|
6691
6691
|
*/
|
|
6692
6692
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
6693
6693
|
/**
|
|
6694
6694
|
* Enforce a specific parameter name in catch clauses.
|
|
6695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
|
|
6696
6696
|
*/
|
|
6697
6697
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6698
6698
|
/**
|
|
6699
6699
|
* Enforce consistent assertion style with `node:assert`.
|
|
6700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
|
|
6701
6701
|
*/
|
|
6702
6702
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6703
6703
|
/**
|
|
6704
6704
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
|
|
6706
6706
|
*/
|
|
6707
6707
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6708
6708
|
/**
|
|
6709
6709
|
* Use destructured variables over properties.
|
|
6710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
|
|
6711
6711
|
*/
|
|
6712
6712
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6713
6713
|
/**
|
|
6714
6714
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
|
|
6716
6716
|
*/
|
|
6717
6717
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6718
6718
|
/**
|
|
6719
6719
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
|
|
6721
6721
|
*/
|
|
6722
6722
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6723
6723
|
/**
|
|
6724
6724
|
* Move function definitions to the highest possible scope.
|
|
6725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
|
|
6726
6726
|
*/
|
|
6727
6727
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6728
6728
|
/**
|
|
6729
6729
|
* Enforce correct `Error` subclassing.
|
|
6730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
|
|
6731
6731
|
*/
|
|
6732
6732
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6733
6733
|
/**
|
|
6734
6734
|
* Enforce no spaces between braces.
|
|
6735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
|
|
6736
6736
|
*/
|
|
6737
6737
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6738
6738
|
/**
|
|
6739
6739
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
|
|
6741
6741
|
*/
|
|
6742
6742
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6743
6743
|
/**
|
|
6744
6744
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
|
|
6746
6746
|
*/
|
|
6747
6747
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6748
6748
|
/**
|
|
6749
6749
|
* Add expiration conditions to TODO comments.
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
|
|
6751
6751
|
*/
|
|
6752
6752
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6753
6753
|
/**
|
|
6754
6754
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
|
|
6756
6756
|
*/
|
|
6757
6757
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6758
6758
|
/**
|
|
6759
6759
|
* Enforce a case style for filenames.
|
|
6760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
|
|
6761
6761
|
*/
|
|
6762
6762
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6763
6763
|
/**
|
|
6764
6764
|
* Enforce specific import styles per module.
|
|
6765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
|
|
6766
6766
|
*/
|
|
6767
6767
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6768
6768
|
/**
|
|
6769
6769
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
|
|
6771
6771
|
*/
|
|
6772
6772
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6773
6773
|
/**
|
|
6774
6774
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
|
|
6776
6776
|
*/
|
|
6777
6777
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6778
6778
|
/**
|
|
6779
6779
|
* Disallow recursive access to `this` within getters and setters.
|
|
6780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
|
|
6781
6781
|
*/
|
|
6782
6782
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6783
6783
|
/**
|
|
6784
6784
|
* Disallow anonymous functions and classes as the default export.
|
|
6785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
|
|
6786
6786
|
*/
|
|
6787
6787
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6788
6788
|
/**
|
|
6789
6789
|
* Prevent passing a function reference directly to iterator methods.
|
|
6790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
|
|
6791
6791
|
*/
|
|
6792
6792
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
6793
6793
|
/**
|
|
6794
6794
|
* Prefer `for…of` over the `forEach` method.
|
|
6795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
|
|
6796
6796
|
*/
|
|
6797
6797
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
6798
6798
|
/**
|
|
6799
6799
|
* Disallow using the `this` argument in array methods.
|
|
6800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
|
|
6801
6801
|
*/
|
|
6802
6802
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6803
6803
|
/**
|
|
6804
6804
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
|
|
6806
6806
|
* @deprecated
|
|
6807
6807
|
*/
|
|
6808
6808
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6809
6809
|
/**
|
|
6810
6810
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
|
|
6812
6812
|
*/
|
|
6813
6813
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6814
6814
|
/**
|
|
6815
6815
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
|
|
6817
6817
|
*/
|
|
6818
6818
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6819
|
+
/**
|
|
6820
|
+
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
|
|
6822
|
+
*/
|
|
6823
|
+
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6819
6824
|
/**
|
|
6820
6825
|
* Disallow member access from await expression.
|
|
6821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
|
|
6822
6827
|
*/
|
|
6823
6828
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6824
6829
|
/**
|
|
6825
6830
|
* Disallow using `await` in `Promise` method parameters.
|
|
6826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
|
|
6827
6832
|
*/
|
|
6828
6833
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6829
6834
|
/**
|
|
6830
6835
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
|
|
6832
6837
|
*/
|
|
6833
6838
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6834
6839
|
/**
|
|
6835
6840
|
* Do not use `document.cookie` directly.
|
|
6836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
|
|
6837
6842
|
*/
|
|
6838
6843
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6839
6844
|
/**
|
|
6840
6845
|
* Disallow empty files.
|
|
6841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
|
|
6842
6847
|
*/
|
|
6843
6848
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
6844
6849
|
/**
|
|
6845
6850
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
|
|
6847
6852
|
*/
|
|
6848
6853
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6849
6854
|
/**
|
|
6850
6855
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
|
|
6852
6857
|
*/
|
|
6853
6858
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6854
6859
|
/**
|
|
6855
6860
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
|
|
6857
6862
|
* @deprecated
|
|
6858
6863
|
*/
|
|
6859
6864
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6860
6865
|
/**
|
|
6861
6866
|
* Disallow `instanceof` with built-in objects
|
|
6862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
|
|
6863
6868
|
*/
|
|
6864
6869
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6865
6870
|
/**
|
|
6866
6871
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
|
|
6868
6873
|
*/
|
|
6869
6874
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6870
6875
|
/**
|
|
6871
6876
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
|
|
6873
6878
|
*/
|
|
6874
6879
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6875
6880
|
/**
|
|
6876
6881
|
* Disallow identifiers starting with `new` or `class`.
|
|
6877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
|
|
6878
6883
|
*/
|
|
6879
6884
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6880
6885
|
/**
|
|
6881
6886
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
|
|
6883
6888
|
* @deprecated
|
|
6884
6889
|
*/
|
|
6885
6890
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6886
6891
|
/**
|
|
6887
6892
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
|
|
6889
6894
|
*/
|
|
6890
6895
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6891
6896
|
/**
|
|
6892
6897
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
|
|
6894
6899
|
*/
|
|
6895
6900
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6896
6901
|
/**
|
|
6897
6902
|
* Disallow named usage of default import and export.
|
|
6898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
|
|
6899
6904
|
*/
|
|
6900
6905
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6901
6906
|
/**
|
|
6902
6907
|
* Disallow negated conditions.
|
|
6903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
|
|
6904
6909
|
*/
|
|
6905
6910
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6906
6911
|
/**
|
|
6907
6912
|
* Disallow negated expression in equality check.
|
|
6908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
|
|
6909
6914
|
*/
|
|
6910
6915
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6911
6916
|
/**
|
|
6912
6917
|
* Disallow nested ternary expressions.
|
|
6913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
|
|
6914
6919
|
*/
|
|
6915
6920
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6916
6921
|
/**
|
|
6917
6922
|
* Disallow `new Array()`.
|
|
6918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
|
|
6919
6924
|
*/
|
|
6920
6925
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6921
6926
|
/**
|
|
6922
6927
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
|
|
6924
6929
|
*/
|
|
6925
6930
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6926
6931
|
/**
|
|
6927
6932
|
* Disallow the use of the `null` literal.
|
|
6928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
|
|
6929
6934
|
*/
|
|
6930
6935
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6931
6936
|
/**
|
|
6932
6937
|
* Disallow the use of objects as default parameters.
|
|
6933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
|
|
6934
6939
|
*/
|
|
6935
6940
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6936
6941
|
/**
|
|
6937
6942
|
* Disallow `process.exit()`.
|
|
6938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
|
|
6939
6944
|
*/
|
|
6940
6945
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6941
6946
|
/**
|
|
6942
6947
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
|
|
6944
6949
|
*/
|
|
6945
6950
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6946
6951
|
/**
|
|
6947
6952
|
* Disallow classes that only have static members.
|
|
6948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
|
|
6949
6954
|
*/
|
|
6950
6955
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6951
6956
|
/**
|
|
6952
6957
|
* Disallow `then` property.
|
|
6953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
|
|
6954
6959
|
*/
|
|
6955
6960
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6956
6961
|
/**
|
|
6957
6962
|
* Disallow assigning `this` to a variable.
|
|
6958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
|
|
6959
6964
|
*/
|
|
6960
6965
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6961
6966
|
/**
|
|
6962
6967
|
* Disallow comparing `undefined` using `typeof`.
|
|
6963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
|
|
6964
6969
|
*/
|
|
6965
6970
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6966
6971
|
/**
|
|
6967
6972
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6969
6974
|
*/
|
|
6970
6975
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6971
6976
|
/**
|
|
6972
6977
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
|
|
6974
6979
|
*/
|
|
6975
6980
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6976
6981
|
/**
|
|
6977
6982
|
* Disallow awaiting non-promise values.
|
|
6978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
|
|
6979
6984
|
*/
|
|
6980
6985
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6981
6986
|
/**
|
|
6982
6987
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
|
|
6984
6989
|
*/
|
|
6985
6990
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6986
6991
|
/**
|
|
6987
6992
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
|
|
6989
6994
|
*/
|
|
6990
6995
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6991
6996
|
/**
|
|
6992
6997
|
* Disallow unreadable array destructuring.
|
|
6993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
|
|
6994
6999
|
*/
|
|
6995
7000
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
6996
7001
|
/**
|
|
6997
7002
|
* Disallow unreadable IIFEs.
|
|
6998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
|
|
6999
7004
|
*/
|
|
7000
7005
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7001
7006
|
/**
|
|
7002
7007
|
* Disallow unused object properties.
|
|
7003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
|
|
7004
7009
|
*/
|
|
7005
7010
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7006
7011
|
/**
|
|
7007
7012
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7009
7014
|
*/
|
|
7010
7015
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7011
7016
|
/**
|
|
7012
7017
|
* Disallow useless fallback when spreading in object literals.
|
|
7013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
|
|
7014
7019
|
*/
|
|
7015
7020
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7016
7021
|
/**
|
|
7017
7022
|
* Disallow useless array length check.
|
|
7018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
|
|
7019
7024
|
*/
|
|
7020
7025
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7021
7026
|
/**
|
|
7022
7027
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
|
|
7024
7029
|
*/
|
|
7025
7030
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7026
7031
|
/**
|
|
7027
7032
|
* Disallow unnecessary spread.
|
|
7028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
|
|
7029
7034
|
*/
|
|
7030
7035
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7031
7036
|
/**
|
|
7032
7037
|
* Disallow useless case in switch statements.
|
|
7033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
|
|
7034
7039
|
*/
|
|
7035
7040
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7036
7041
|
/**
|
|
7037
7042
|
* Disallow useless `undefined`.
|
|
7038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
|
|
7039
7044
|
*/
|
|
7040
7045
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7041
7046
|
/**
|
|
7042
7047
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
|
|
7044
7049
|
*/
|
|
7045
7050
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7046
7051
|
/**
|
|
7047
7052
|
* Enforce proper case for numeric literals.
|
|
7048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
|
|
7049
7054
|
*/
|
|
7050
7055
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7051
7056
|
/**
|
|
7052
7057
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
|
|
7054
7059
|
*/
|
|
7055
7060
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7056
7061
|
/**
|
|
7057
7062
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
|
|
7059
7064
|
*/
|
|
7060
7065
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7061
7066
|
/**
|
|
7062
7067
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
|
|
7064
7069
|
*/
|
|
7065
7070
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7066
7071
|
/**
|
|
7067
7072
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
|
|
7069
7074
|
*/
|
|
7070
7075
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7071
7076
|
/**
|
|
7072
7077
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
7073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
|
|
7074
7079
|
*/
|
|
7075
7080
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7076
7081
|
/**
|
|
7077
7082
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
|
|
7079
7084
|
*/
|
|
7080
7085
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7081
7086
|
/**
|
|
7082
7087
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
|
|
7084
7089
|
*/
|
|
7085
7090
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7086
7091
|
/**
|
|
7087
7092
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
|
|
7089
7094
|
*/
|
|
7090
7095
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7096
|
+
/**
|
|
7097
|
+
* Prefer `BigInt` literals over the constructor.
|
|
7098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
|
|
7099
|
+
*/
|
|
7100
|
+
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7091
7101
|
/**
|
|
7092
7102
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
|
|
7094
7104
|
*/
|
|
7095
7105
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7096
7106
|
/**
|
|
7097
7107
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
|
|
7099
7109
|
*/
|
|
7100
7110
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7111
|
+
/**
|
|
7112
|
+
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
|
|
7114
|
+
*/
|
|
7115
|
+
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7101
7116
|
/**
|
|
7102
7117
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
|
|
7104
7119
|
*/
|
|
7105
7120
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7106
7121
|
/**
|
|
7107
7122
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
|
|
7109
7124
|
*/
|
|
7110
7125
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7111
7126
|
/**
|
|
7112
7127
|
* Prefer default parameters over reassignment.
|
|
7113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
|
|
7114
7129
|
*/
|
|
7115
7130
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7116
7131
|
/**
|
|
7117
7132
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
7118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
|
|
7119
7134
|
*/
|
|
7120
7135
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7121
7136
|
/**
|
|
7122
7137
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
7123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
|
|
7124
7139
|
*/
|
|
7125
7140
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7126
7141
|
/**
|
|
7127
7142
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
|
|
7129
7144
|
*/
|
|
7130
7145
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7131
7146
|
/**
|
|
7132
7147
|
* Prefer `.textContent` over `.innerText`.
|
|
7133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
|
|
7134
7149
|
*/
|
|
7135
7150
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7136
7151
|
/**
|
|
7137
7152
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
|
|
7139
7154
|
*/
|
|
7140
7155
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7141
7156
|
/**
|
|
7142
7157
|
* Prefer `export…from` when re-exporting.
|
|
7143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
|
|
7144
7159
|
*/
|
|
7145
7160
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7146
7161
|
/**
|
|
7147
7162
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
|
|
7149
7164
|
*/
|
|
7150
7165
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7151
7166
|
/**
|
|
7152
7167
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
|
|
7154
7169
|
*/
|
|
7155
7170
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7156
7171
|
/**
|
|
7157
7172
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
|
|
7159
7174
|
*/
|
|
7160
7175
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7161
7176
|
/**
|
|
7162
7177
|
* Prefer reading a JSON file as a buffer.
|
|
7163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
|
|
7164
7179
|
*/
|
|
7165
7180
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7166
7181
|
/**
|
|
7167
7182
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
7168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
|
|
7169
7184
|
*/
|
|
7170
7185
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7171
7186
|
/**
|
|
7172
7187
|
* Prefer using a logical operator over a ternary.
|
|
7173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7174
7189
|
*/
|
|
7175
7190
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7176
7191
|
/**
|
|
7177
7192
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
|
|
7179
7194
|
*/
|
|
7180
7195
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7181
7196
|
/**
|
|
7182
7197
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
7183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
|
|
7184
7199
|
*/
|
|
7185
7200
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7186
7201
|
/**
|
|
7187
7202
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
7188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
|
|
7189
7204
|
*/
|
|
7190
7205
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7191
7206
|
/**
|
|
7192
7207
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
|
|
7194
7209
|
*/
|
|
7195
7210
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7196
7211
|
/**
|
|
7197
7212
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
|
|
7199
7214
|
*/
|
|
7200
7215
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7201
7216
|
/**
|
|
7202
7217
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
|
|
7204
7219
|
*/
|
|
7205
7220
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7206
7221
|
/**
|
|
7207
7222
|
* Prefer negative index over `.length - index` when possible.
|
|
7208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
|
|
7209
7224
|
*/
|
|
7210
7225
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7211
7226
|
/**
|
|
7212
7227
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
|
|
7214
7229
|
*/
|
|
7215
7230
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7216
7231
|
/**
|
|
7217
7232
|
* Prefer `Number` static properties over global ones.
|
|
7218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
|
|
7219
7234
|
*/
|
|
7220
7235
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7221
7236
|
/**
|
|
7222
7237
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
|
|
7224
7239
|
*/
|
|
7225
7240
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7226
7241
|
/**
|
|
7227
7242
|
* Prefer omitting the `catch` binding parameter.
|
|
7228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
|
|
7229
7244
|
*/
|
|
7230
7245
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7231
7246
|
/**
|
|
7232
7247
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
|
|
7234
7249
|
*/
|
|
7235
7250
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7236
7251
|
/**
|
|
7237
7252
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
7238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
|
|
7239
7254
|
*/
|
|
7240
7255
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
7241
7256
|
/**
|
|
7242
7257
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
|
|
7244
7259
|
*/
|
|
7245
7260
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7246
7261
|
/**
|
|
7247
7262
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
7248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
|
|
7249
7264
|
*/
|
|
7250
7265
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7251
7266
|
/**
|
|
7252
7267
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
|
|
7254
7269
|
*/
|
|
7255
7270
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
7256
7271
|
/**
|
|
7257
7272
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
|
|
7259
7274
|
*/
|
|
7260
7275
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7261
7276
|
/**
|
|
7262
7277
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
|
|
7264
7279
|
*/
|
|
7265
7280
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7266
7281
|
/**
|
|
7267
7282
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
7268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
|
|
7269
7284
|
*/
|
|
7270
7285
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7271
7286
|
/**
|
|
7272
7287
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
|
|
7274
7289
|
*/
|
|
7275
7290
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7276
7291
|
/**
|
|
7277
7292
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
7278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
|
|
7279
7294
|
*/
|
|
7280
7295
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7281
7296
|
/**
|
|
7282
7297
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
|
|
7284
7299
|
*/
|
|
7285
7300
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7286
7301
|
/**
|
|
7287
7302
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
|
|
7289
7304
|
*/
|
|
7290
7305
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7291
7306
|
/**
|
|
7292
7307
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
|
|
7294
7309
|
*/
|
|
7295
7310
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7296
7311
|
/**
|
|
7297
7312
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
|
|
7299
7314
|
*/
|
|
7300
7315
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7301
7316
|
/**
|
|
7302
7317
|
* Prefer `switch` over multiple `else-if`.
|
|
7303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
|
|
7304
7319
|
*/
|
|
7305
7320
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7306
7321
|
/**
|
|
7307
7322
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
|
|
7309
7324
|
*/
|
|
7310
7325
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7311
7326
|
/**
|
|
7312
7327
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
|
|
7314
7329
|
*/
|
|
7315
7330
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7316
7331
|
/**
|
|
7317
7332
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
|
|
7319
7334
|
*/
|
|
7320
7335
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7321
7336
|
/**
|
|
7322
7337
|
* Prevent abbreviations.
|
|
7323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
|
|
7324
7339
|
*/
|
|
7325
7340
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
7326
7341
|
/**
|
|
7327
7342
|
* Enforce consistent relative URL style.
|
|
7328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
|
|
7329
7344
|
*/
|
|
7330
7345
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7331
7346
|
/**
|
|
7332
7347
|
* Enforce using the separator argument with `Array#join()`.
|
|
7333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
|
|
7334
7349
|
*/
|
|
7335
7350
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7351
|
+
/**
|
|
7352
|
+
* Require non-empty module attributes for imports and exports
|
|
7353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
|
|
7354
|
+
*/
|
|
7355
|
+
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7336
7356
|
/**
|
|
7337
7357
|
* Require non-empty specifier list in import and export statements.
|
|
7338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
|
|
7339
7359
|
*/
|
|
7340
7360
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7341
7361
|
/**
|
|
7342
7362
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7344
7364
|
*/
|
|
7345
7365
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7346
7366
|
/**
|
|
7347
7367
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
|
|
7349
7369
|
*/
|
|
7350
7370
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7351
7371
|
/**
|
|
7352
7372
|
* Enforce better string content.
|
|
7353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
|
|
7354
7374
|
*/
|
|
7355
7375
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7356
7376
|
/**
|
|
7357
7377
|
* Enforce consistent brace style for `case` clauses.
|
|
7358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
|
|
7359
7379
|
*/
|
|
7360
7380
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7361
7381
|
/**
|
|
7362
7382
|
* Fix whitespace-insensitive template indentation.
|
|
7363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
|
|
7364
7384
|
*/
|
|
7365
7385
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7366
7386
|
/**
|
|
7367
7387
|
* Enforce consistent case for text encoding identifiers.
|
|
7368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
|
|
7369
7389
|
*/
|
|
7370
7390
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
|
|
7371
7391
|
/**
|
|
7372
7392
|
* Require `new` when creating an error.
|
|
7373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
|
|
7374
7394
|
*/
|
|
7375
7395
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7376
7396
|
/**
|
|
@@ -15067,6 +15087,10 @@ type UnicornNoArrayReduce = [] | [{
|
|
|
15067
15087
|
type UnicornNoArrayReverse = [] | [{
|
|
15068
15088
|
allowExpressionStatement?: boolean;
|
|
15069
15089
|
}];
|
|
15090
|
+
// ----- unicorn/no-array-sort -----
|
|
15091
|
+
type UnicornNoArraySort = [] | [{
|
|
15092
|
+
allowExpressionStatement?: boolean;
|
|
15093
|
+
}];
|
|
15070
15094
|
// ----- unicorn/no-instanceof-builtins -----
|
|
15071
15095
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
15072
15096
|
useErrorIsError?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -413,8 +413,10 @@ async function disables() {
|
|
|
413
413
|
"antfu/no-top-level-await": "off",
|
|
414
414
|
"max-lines": "off",
|
|
415
415
|
"max-lines-per-function": "off",
|
|
416
|
+
"no-empty-function": "off",
|
|
416
417
|
"no-unused-expressions": "off",
|
|
417
418
|
"ts/explicit-function-return-type": "off",
|
|
419
|
+
"ts/no-empty-function": "off",
|
|
418
420
|
"ts/no-non-null-assertion": "off"
|
|
419
421
|
}
|
|
420
422
|
},
|
|
@@ -6221,6 +6223,7 @@ async function typescript(options = {}) {
|
|
|
6221
6223
|
//#region src/configs/unicorn.ts
|
|
6222
6224
|
const abbreviations = {
|
|
6223
6225
|
args: false,
|
|
6226
|
+
ctx: false,
|
|
6224
6227
|
dist: { distance: true },
|
|
6225
6228
|
e: false,
|
|
6226
6229
|
err: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isentinel/eslint-config",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "iSentinel's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"eslint-plugin-sentinel": "0.1.2",
|
|
76
76
|
"eslint-plugin-sonarjs": "3.0.5",
|
|
77
77
|
"eslint-plugin-toml": "0.12.0",
|
|
78
|
-
"eslint-plugin-unicorn": "
|
|
78
|
+
"eslint-plugin-unicorn": "61.0.2",
|
|
79
79
|
"eslint-plugin-yml": "1.18.0",
|
|
80
80
|
"jsonc-eslint-parser": "2.4.0",
|
|
81
81
|
"local-pkg": "1.1.2",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"tsdown": "0.14.2",
|
|
120
120
|
"type-fest": "4.41.0",
|
|
121
121
|
"typescript": "5.9.2",
|
|
122
|
-
"@isentinel/eslint-config": "3.1.
|
|
122
|
+
"@isentinel/eslint-config": "3.1.2"
|
|
123
123
|
},
|
|
124
124
|
"peerDependencies": {
|
|
125
125
|
"@eslint-react/eslint-plugin": "^1.45.0",
|