@2digits/eslint-config 4.8.3 → 4.8.4

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 CHANGED
@@ -6668,710 +6668,710 @@ interface RuleOptions {
6668
6668
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
6669
6669
  /**
6670
6670
  * Improve regexes by making them shorter, consistent, and safer.
6671
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/better-regex.md
6671
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
6672
6672
  */
6673
6673
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
6674
6674
  /**
6675
6675
  * Enforce a specific parameter name in catch clauses.
6676
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/catch-error-name.md
6676
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
6677
6677
  */
6678
6678
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
6679
6679
  /**
6680
6680
  * Enforce consistent assertion style with `node:assert`.
6681
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-assert.md
6681
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
6682
6682
  */
6683
6683
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
6684
6684
  /**
6685
6685
  * Prefer passing `Date` directly to the constructor when cloning.
6686
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-date-clone.md
6686
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
6687
6687
  */
6688
6688
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
6689
6689
  /**
6690
6690
  * Use destructured variables over properties.
6691
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-destructuring.md
6691
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
6692
6692
  */
6693
6693
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
6694
6694
  /**
6695
6695
  * Prefer consistent types when spreading a ternary in an array literal.
6696
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-empty-array-spread.md
6696
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
6697
6697
  */
6698
6698
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
6699
6699
  /**
6700
6700
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
6701
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-existence-index-check.md
6701
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
6702
6702
  */
6703
6703
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
6704
6704
  /**
6705
6705
  * Move function definitions to the highest possible scope.
6706
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-function-scoping.md
6706
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
6707
6707
  */
6708
6708
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
6709
6709
  /**
6710
6710
  * Enforce correct `Error` subclassing.
6711
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/custom-error-definition.md
6711
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
6712
6712
  */
6713
6713
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
6714
6714
  /**
6715
6715
  * Enforce no spaces between braces.
6716
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/empty-brace-spaces.md
6716
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
6717
6717
  */
6718
6718
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
6719
6719
  /**
6720
6720
  * Enforce passing a `message` value when creating a built-in error.
6721
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/error-message.md
6721
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
6722
6722
  */
6723
6723
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
6724
6724
  /**
6725
6725
  * Require escape sequences to use uppercase or lowercase values.
6726
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/escape-case.md
6726
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
6727
6727
  */
6728
6728
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
6729
6729
  /**
6730
6730
  * Add expiration conditions to TODO comments.
6731
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/expiring-todo-comments.md
6731
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
6732
6732
  */
6733
6733
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
6734
6734
  /**
6735
6735
  * Enforce explicitly comparing the `length` or `size` property of a value.
6736
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/explicit-length-check.md
6736
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
6737
6737
  */
6738
6738
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
6739
6739
  /**
6740
6740
  * Enforce a case style for filenames.
6741
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/filename-case.md
6741
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
6742
6742
  */
6743
6743
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
6744
6744
  /**
6745
6745
  * Enforce specific import styles per module.
6746
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/import-style.md
6746
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
6747
6747
  */
6748
6748
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
6749
6749
  /**
6750
6750
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
6751
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/new-for-builtins.md
6751
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
6752
6752
  */
6753
6753
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
6754
6754
  /**
6755
6755
  * Enforce specifying rules to disable in `eslint-disable` comments.
6756
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-abusive-eslint-disable.md
6756
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
6757
6757
  */
6758
6758
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
6759
6759
  /**
6760
6760
  * Disallow recursive access to `this` within getters and setters.
6761
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-accessor-recursion.md
6761
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
6762
6762
  */
6763
6763
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
6764
6764
  /**
6765
6765
  * Disallow anonymous functions and classes as the default export.
6766
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-anonymous-default-export.md
6766
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
6767
6767
  */
6768
6768
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
6769
6769
  /**
6770
6770
  * Prevent passing a function reference directly to iterator methods.
6771
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-callback-reference.md
6771
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
6772
6772
  */
6773
6773
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
6774
6774
  /**
6775
6775
  * Prefer `for…of` over the `forEach` method.
6776
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-for-each.md
6776
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
6777
6777
  */
6778
6778
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
6779
6779
  /**
6780
6780
  * Disallow using the `this` argument in array methods.
6781
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-method-this-argument.md
6781
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
6782
6782
  */
6783
6783
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
6784
6784
  /**
6785
6785
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
6786
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-array-push-push
6786
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
6787
6787
  * @deprecated
6788
6788
  */
6789
6789
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
6790
6790
  /**
6791
6791
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
6792
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-reduce.md
6792
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
6793
6793
  */
6794
6794
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
6795
6795
  /**
6796
6796
  * Prefer `Array#toReversed()` over `Array#reverse()`.
6797
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-reverse.md
6797
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
6798
6798
  */
6799
6799
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
6800
6800
  /**
6801
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
6802
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
6803
6803
  */
6804
6804
  'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
6805
6805
  /**
6806
6806
  * Disallow member access from await expression.
6807
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-await-expression-member.md
6807
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
6808
6808
  */
6809
6809
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
6810
6810
  /**
6811
6811
  * Disallow using `await` in `Promise` method parameters.
6812
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-await-in-promise-methods.md
6812
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
6813
6813
  */
6814
6814
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
6815
6815
  /**
6816
6816
  * Do not use leading/trailing space between `console.log` parameters.
6817
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-console-spaces.md
6817
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
6818
6818
  */
6819
6819
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
6820
6820
  /**
6821
6821
  * Do not use `document.cookie` directly.
6822
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-document-cookie.md
6822
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
6823
6823
  */
6824
6824
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
6825
6825
  /**
6826
6826
  * Disallow empty files.
6827
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-empty-file.md
6827
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
6828
6828
  */
6829
6829
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
6830
6830
  /**
6831
6831
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
6832
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-for-loop.md
6832
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
6833
6833
  */
6834
6834
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
6835
6835
  /**
6836
6836
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
6837
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-hex-escape.md
6837
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
6838
6838
  */
6839
6839
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
6840
6840
  /**
6841
6841
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
6842
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-instanceof-array
6842
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
6843
6843
  * @deprecated
6844
6844
  */
6845
6845
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
6846
6846
  /**
6847
6847
  * Disallow `instanceof` with built-in objects
6848
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-instanceof-builtins.md
6848
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
6849
6849
  */
6850
6850
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
6851
6851
  /**
6852
6852
  * Disallow invalid options in `fetch()` and `new Request()`.
6853
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-invalid-fetch-options.md
6853
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
6854
6854
  */
6855
6855
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
6856
6856
  /**
6857
6857
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
6858
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-invalid-remove-event-listener.md
6858
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
6859
6859
  */
6860
6860
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
6861
6861
  /**
6862
6862
  * Disallow identifiers starting with `new` or `class`.
6863
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-keyword-prefix.md
6863
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
6864
6864
  */
6865
6865
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
6866
6866
  /**
6867
6867
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
6868
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-length-as-slice-end
6868
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
6869
6869
  * @deprecated
6870
6870
  */
6871
6871
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
6872
6872
  /**
6873
6873
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
6874
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-lonely-if.md
6874
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
6875
6875
  */
6876
6876
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
6877
6877
  /**
6878
6878
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
6879
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-magic-array-flat-depth.md
6879
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
6880
6880
  */
6881
6881
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
6882
6882
  /**
6883
6883
  * Disallow named usage of default import and export.
6884
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-named-default.md
6884
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
6885
6885
  */
6886
6886
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
6887
6887
  /**
6888
6888
  * Disallow negated conditions.
6889
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-negated-condition.md
6889
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
6890
6890
  */
6891
6891
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
6892
6892
  /**
6893
6893
  * Disallow negated expression in equality check.
6894
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-negation-in-equality-check.md
6894
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
6895
6895
  */
6896
6896
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
6897
6897
  /**
6898
6898
  * Disallow nested ternary expressions.
6899
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-nested-ternary.md
6899
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
6900
6900
  */
6901
6901
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
6902
6902
  /**
6903
6903
  * Disallow `new Array()`.
6904
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-new-array.md
6904
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
6905
6905
  */
6906
6906
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
6907
6907
  /**
6908
6908
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
6909
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-new-buffer.md
6909
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
6910
6910
  */
6911
6911
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
6912
6912
  /**
6913
6913
  * Disallow the use of the `null` literal.
6914
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-null.md
6914
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
6915
6915
  */
6916
6916
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
6917
6917
  /**
6918
6918
  * Disallow the use of objects as default parameters.
6919
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-object-as-default-parameter.md
6919
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
6920
6920
  */
6921
6921
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
6922
6922
  /**
6923
6923
  * Disallow `process.exit()`.
6924
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-process-exit.md
6924
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
6925
6925
  */
6926
6926
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
6927
6927
  /**
6928
6928
  * Disallow passing single-element arrays to `Promise` methods.
6929
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-single-promise-in-promise-methods.md
6929
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
6930
6930
  */
6931
6931
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
6932
6932
  /**
6933
6933
  * Disallow classes that only have static members.
6934
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-static-only-class.md
6934
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
6935
6935
  */
6936
6936
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
6937
6937
  /**
6938
6938
  * Disallow `then` property.
6939
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-thenable.md
6939
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
6940
6940
  */
6941
6941
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
6942
6942
  /**
6943
6943
  * Disallow assigning `this` to a variable.
6944
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-this-assignment.md
6944
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
6945
6945
  */
6946
6946
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
6947
6947
  /**
6948
6948
  * Disallow comparing `undefined` using `typeof`.
6949
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-typeof-undefined.md
6949
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
6950
6950
  */
6951
6951
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
6952
6952
  /**
6953
6953
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
6954
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-array-flat-depth.md
6954
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
6955
6955
  */
6956
6956
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
6957
6957
  /**
6958
6958
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
6959
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-array-splice-count.md
6959
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
6960
6960
  */
6961
6961
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
6962
6962
  /**
6963
6963
  * Disallow awaiting non-promise values.
6964
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-await.md
6964
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
6965
6965
  */
6966
6966
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
6967
6967
  /**
6968
6968
  * Enforce the use of built-in methods instead of unnecessary polyfills.
6969
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-polyfills.md
6969
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
6970
6970
  */
6971
6971
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
6972
6972
  /**
6973
6973
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
6974
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-slice-end.md
6974
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
6975
6975
  */
6976
6976
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
6977
6977
  /**
6978
6978
  * Disallow unreadable array destructuring.
6979
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unreadable-array-destructuring.md
6979
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
6980
6980
  */
6981
6981
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
6982
6982
  /**
6983
6983
  * Disallow unreadable IIFEs.
6984
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unreadable-iife.md
6984
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
6985
6985
  */
6986
6986
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
6987
6987
  /**
6988
6988
  * Disallow unused object properties.
6989
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unused-properties.md
6989
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
6990
6990
  */
6991
6991
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
6992
6992
  /**
6993
6993
  * Disallow unnecessary `Error.captureStackTrace(…)`.
6994
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-error-capture-stack-trace.md
6994
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
6995
6995
  */
6996
6996
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
6997
6997
  /**
6998
6998
  * Disallow useless fallback when spreading in object literals.
6999
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-fallback-in-spread.md
6999
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
7000
7000
  */
7001
7001
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
7002
7002
  /**
7003
7003
  * Disallow useless array length check.
7004
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-length-check.md
7004
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
7005
7005
  */
7006
7006
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
7007
7007
  /**
7008
7008
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
7009
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-promise-resolve-reject.md
7009
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
7010
7010
  */
7011
7011
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
7012
7012
  /**
7013
7013
  * Disallow unnecessary spread.
7014
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-spread.md
7014
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
7015
7015
  */
7016
7016
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
7017
7017
  /**
7018
7018
  * Disallow useless case in switch statements.
7019
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-switch-case.md
7019
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
7020
7020
  */
7021
7021
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
7022
7022
  /**
7023
7023
  * Disallow useless `undefined`.
7024
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-undefined.md
7024
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
7025
7025
  */
7026
7026
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
7027
7027
  /**
7028
7028
  * Disallow number literals with zero fractions or dangling dots.
7029
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-zero-fractions.md
7029
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
7030
7030
  */
7031
7031
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
7032
7032
  /**
7033
7033
  * Enforce proper case for numeric literals.
7034
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/number-literal-case.md
7034
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
7035
7035
  */
7036
7036
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
7037
7037
  /**
7038
7038
  * Enforce the style of numeric separators by correctly grouping digits.
7039
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/numeric-separators-style.md
7039
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
7040
7040
  */
7041
7041
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
7042
7042
  /**
7043
7043
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
7044
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-add-event-listener.md
7044
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
7045
7045
  */
7046
7046
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
7047
7047
  /**
7048
7048
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
7049
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-find.md
7049
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
7050
7050
  */
7051
7051
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
7052
7052
  /**
7053
7053
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
7054
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-flat.md
7054
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
7055
7055
  */
7056
7056
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
7057
7057
  /**
7058
7058
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
7059
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-flat-map.md
7059
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
7060
7060
  */
7061
7061
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
7062
7062
  /**
7063
7063
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
7064
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-index-of.md
7064
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
7065
7065
  */
7066
7066
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
7067
7067
  /**
7068
7068
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
7069
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-some.md
7069
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
7070
7070
  */
7071
7071
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
7072
7072
  /**
7073
7073
  * Prefer `.at()` method for index access and `String#charAt()`.
7074
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-at.md
7074
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
7075
7075
  */
7076
7076
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
7077
7077
  /**
7078
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
7079
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
7080
7080
  */
7081
7081
  'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
7082
7082
  /**
7083
7083
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
7084
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-blob-reading-methods.md
7084
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
7085
7085
  */
7086
7086
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
7087
7087
  /**
7088
7088
  * Prefer class field declarations over `this` assignments in constructors.
7089
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-class-fields.md
7089
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
7090
7090
  */
7091
7091
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
7092
7092
  /**
7093
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
7094
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
7095
7095
  */
7096
7096
  'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
7097
7097
  /**
7098
7098
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
7099
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-code-point.md
7099
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
7100
7100
  */
7101
7101
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
7102
7102
  /**
7103
7103
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
7104
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-date-now.md
7104
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
7105
7105
  */
7106
7106
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
7107
7107
  /**
7108
7108
  * Prefer default parameters over reassignment.
7109
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-default-parameters.md
7109
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
7110
7110
  */
7111
7111
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
7112
7112
  /**
7113
7113
  * Prefer `Node#append()` over `Node#appendChild()`.
7114
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-append.md
7114
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
7115
7115
  */
7116
7116
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
7117
7117
  /**
7118
7118
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
7119
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-dataset.md
7119
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
7120
7120
  */
7121
7121
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
7122
7122
  /**
7123
7123
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
7124
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-remove.md
7124
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
7125
7125
  */
7126
7126
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
7127
7127
  /**
7128
7128
  * Prefer `.textContent` over `.innerText`.
7129
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-text-content.md
7129
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
7130
7130
  */
7131
7131
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
7132
7132
  /**
7133
7133
  * Prefer `EventTarget` over `EventEmitter`.
7134
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-event-target.md
7134
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
7135
7135
  */
7136
7136
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
7137
7137
  /**
7138
7138
  * Prefer `export…from` when re-exporting.
7139
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-export-from.md
7139
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
7140
7140
  */
7141
7141
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
7142
7142
  /**
7143
7143
  * Prefer `globalThis` over `window`, `self`, and `global`.
7144
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-global-this.md
7144
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
7145
7145
  */
7146
7146
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
7147
7147
  /**
7148
7148
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
7149
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-import-meta-properties.md
7149
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
7150
7150
  */
7151
7151
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
7152
7152
  /**
7153
7153
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
7154
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-includes.md
7154
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
7155
7155
  */
7156
7156
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
7157
7157
  /**
7158
7158
  * Prefer reading a JSON file as a buffer.
7159
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-json-parse-buffer.md
7159
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
7160
7160
  */
7161
7161
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
7162
7162
  /**
7163
7163
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
7164
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-keyboard-event-key.md
7164
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
7165
7165
  */
7166
7166
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
7167
7167
  /**
7168
7168
  * Prefer using a logical operator over a ternary.
7169
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-logical-operator-over-ternary.md
7169
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
7170
7170
  */
7171
7171
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
7172
7172
  /**
7173
7173
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
7174
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-math-min-max.md
7174
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
7175
7175
  */
7176
7176
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
7177
7177
  /**
7178
7178
  * Enforce the use of `Math.trunc` instead of bitwise operators.
7179
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-math-trunc.md
7179
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
7180
7180
  */
7181
7181
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
7182
7182
  /**
7183
7183
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
7184
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-modern-dom-apis.md
7184
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
7185
7185
  */
7186
7186
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
7187
7187
  /**
7188
7188
  * Prefer modern `Math` APIs over legacy patterns.
7189
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-modern-math-apis.md
7189
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
7190
7190
  */
7191
7191
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
7192
7192
  /**
7193
7193
  * Prefer JavaScript modules (ESM) over CommonJS.
7194
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-module.md
7194
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
7195
7195
  */
7196
7196
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
7197
7197
  /**
7198
7198
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
7199
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-native-coercion-functions.md
7199
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
7200
7200
  */
7201
7201
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
7202
7202
  /**
7203
7203
  * Prefer negative index over `.length - index` when possible.
7204
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-negative-index.md
7204
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
7205
7205
  */
7206
7206
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
7207
7207
  /**
7208
7208
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
7209
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-node-protocol.md
7209
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
7210
7210
  */
7211
7211
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
7212
7212
  /**
7213
7213
  * Prefer `Number` static properties over global ones.
7214
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-number-properties.md
7214
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
7215
7215
  */
7216
7216
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
7217
7217
  /**
7218
7218
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
7219
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-object-from-entries.md
7219
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
7220
7220
  */
7221
7221
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
7222
7222
  /**
7223
7223
  * Prefer omitting the `catch` binding parameter.
7224
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-optional-catch-binding.md
7224
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
7225
7225
  */
7226
7226
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
7227
7227
  /**
7228
7228
  * Prefer borrowing methods from the prototype instead of the instance.
7229
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-prototype-methods.md
7229
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
7230
7230
  */
7231
7231
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
7232
7232
  /**
7233
7233
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
7234
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-query-selector.md
7234
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
7235
7235
  */
7236
7236
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
7237
7237
  /**
7238
7238
  * Prefer `Reflect.apply()` over `Function#apply()`.
7239
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-reflect-apply.md
7239
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
7240
7240
  */
7241
7241
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
7242
7242
  /**
7243
7243
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
7244
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-regexp-test.md
7244
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
7245
7245
  */
7246
7246
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
7247
7247
  /**
7248
7248
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
7249
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-set-has.md
7249
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
7250
7250
  */
7251
7251
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
7252
7252
  /**
7253
7253
  * Prefer using `Set#size` instead of `Array#length`.
7254
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-set-size.md
7254
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
7255
7255
  */
7256
7256
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
7257
7257
  /**
7258
7258
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
7259
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-single-call.md
7259
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
7260
7260
  */
7261
7261
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
7262
7262
  /**
7263
7263
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
7264
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-spread.md
7264
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
7265
7265
  */
7266
7266
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
7267
7267
  /**
7268
7268
  * Prefer using the `String.raw` tag to avoid escaping `\`.
7269
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-raw.md
7269
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
7270
7270
  */
7271
7271
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
7272
7272
  /**
7273
7273
  * Prefer `String#replaceAll()` over regex searches with the global flag.
7274
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-replace-all.md
7274
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
7275
7275
  */
7276
7276
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
7277
7277
  /**
7278
7278
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
7279
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-slice.md
7279
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
7280
7280
  */
7281
7281
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
7282
7282
  /**
7283
7283
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
7284
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-starts-ends-with.md
7284
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
7285
7285
  */
7286
7286
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
7287
7287
  /**
7288
7288
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
7289
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-trim-start-end.md
7289
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
7290
7290
  */
7291
7291
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
7292
7292
  /**
7293
7293
  * Prefer using `structuredClone` to create a deep clone.
7294
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-structured-clone.md
7294
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
7295
7295
  */
7296
7296
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
7297
7297
  /**
7298
7298
  * Prefer `switch` over multiple `else-if`.
7299
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-switch.md
7299
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
7300
7300
  */
7301
7301
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
7302
7302
  /**
7303
7303
  * Prefer ternary expressions over simple `if-else` statements.
7304
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-ternary.md
7304
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
7305
7305
  */
7306
7306
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
7307
7307
  /**
7308
7308
  * Prefer top-level await over top-level promises and async function calls.
7309
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-top-level-await.md
7309
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
7310
7310
  */
7311
7311
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
7312
7312
  /**
7313
7313
  * Enforce throwing `TypeError` in type checking conditions.
7314
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-type-error.md
7314
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
7315
7315
  */
7316
7316
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
7317
7317
  /**
7318
7318
  * Prevent abbreviations.
7319
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prevent-abbreviations.md
7319
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
7320
7320
  */
7321
7321
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
7322
7322
  /**
7323
7323
  * Enforce consistent relative URL style.
7324
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/relative-url-style.md
7324
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
7325
7325
  */
7326
7326
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
7327
7327
  /**
7328
7328
  * Enforce using the separator argument with `Array#join()`.
7329
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-array-join-separator.md
7329
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
7330
7330
  */
7331
7331
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
7332
7332
  /**
7333
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
7334
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
7335
7335
  */
7336
7336
  'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
7337
7337
  /**
7338
7338
  * Require non-empty specifier list in import and export statements.
7339
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-module-specifiers.md
7339
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
7340
7340
  */
7341
7341
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
7342
7342
  /**
7343
7343
  * Enforce using the digits argument with `Number#toFixed()`.
7344
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-number-to-fixed-digits-argument.md
7344
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
7345
7345
  */
7346
7346
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
7347
7347
  /**
7348
7348
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
7349
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-post-message-target-origin.md
7349
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
7350
7350
  */
7351
7351
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
7352
7352
  /**
7353
7353
  * Enforce better string content.
7354
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/string-content.md
7354
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
7355
7355
  */
7356
7356
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
7357
7357
  /**
7358
7358
  * Enforce consistent brace style for `case` clauses.
7359
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/switch-case-braces.md
7359
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
7360
7360
  */
7361
7361
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
7362
7362
  /**
7363
7363
  * Fix whitespace-insensitive template indentation.
7364
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/template-indent.md
7364
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
7365
7365
  */
7366
7366
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
7367
7367
  /**
7368
7368
  * Enforce consistent case for text encoding identifiers.
7369
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/text-encoding-identifier-case.md
7369
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
7370
7370
  */
7371
7371
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
7372
7372
  /**
7373
7373
  * Require `new` when creating an error.
7374
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/throw-new-error.md
7374
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
7375
7375
  */
7376
7376
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
7377
7377
  /**
@@ -8407,6 +8407,7 @@ type JsdocRequireJsdoc = [] | [{
8407
8407
  enableFixer?: boolean;
8408
8408
  exemptEmptyConstructors?: boolean;
8409
8409
  exemptEmptyFunctions?: boolean;
8410
+ exemptOverloadedImplementations?: boolean;
8410
8411
  fixerMessage?: string;
8411
8412
  minLineCount?: number;
8412
8413
  publicOnly?: (boolean | {
@@ -8423,6 +8424,7 @@ type JsdocRequireJsdoc = [] | [{
8423
8424
  FunctionExpression?: boolean;
8424
8425
  MethodDefinition?: boolean;
8425
8426
  };
8427
+ skipInterveningOverloadedDeclarations?: boolean;
8426
8428
  }];
8427
8429
  // ----- jsdoc/require-param -----
8428
8430
  type JsdocRequireParam = [] | [{
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{findUp as r}from"find-up";import{getPackageInfo as i,isPackageExists as a}from"local-pkg";import o from"eslint-plugin-antfu";import s from"eslint-plugin-de-morgan";import c from"@eslint-community/eslint-plugin-eslint-comments";import l from"@eslint-community/eslint-plugin-eslint-comments/configs";import u from"@eslint/css";import{tailwind3 as d,tailwind4 as f}from"tailwind-csstree";import{fixupPluginRules as p}from"@eslint/compat";import m from"eslint-plugin-github-action";import h from"yaml-eslint-parser";import g from"eslint-config-flat-gitignore";import ee from"@eslint/js";import te from"@stylistic/eslint-plugin";import _ from"globals";import ne from"eslint-plugin-jsdoc";import re,{configs as v}from"eslint-plugin-jsonc";import ie from"jsonc-eslint-parser";import y from"@eslint/markdown";import{mergeProcessors as ae,processorPassThrough as oe}from"eslint-merge-processors";import b from"eslint-plugin-n";import x from"eslint-plugin-regexp";import se from"eslint-plugin-sonarjs";import S from"eslint-plugin-unicorn";import ce from"eslint-plugin-yml";const C=`**/*.?([cm])[jt]s?(x)`,w=`**/*.?([cm])ts`,T=`**/*.?([cm])tsx`,E=`.github/workflows/*.y?(a)ml`,D=`**/*.md`,O=`${D}/${C}`,k=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function A(){return[{files:[C],name:`2digits:antfu`,plugins:{antfu:o},rules:{"antfu/if-newline":`error`,"antfu/top-level-function":`error`}}]}function j(){return[{files:[C],name:`2digits:boolean`,plugins:{boolean:s},rules:{...s.configs.recommended.rules}}]}const M={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/hooks-extra":`react-hooks-extra`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`},N=n(l.recommended.rules,M);function P(){return[{files:[C],name:`2digits:comments`,plugins:{comments:c},rules:{...N,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function F(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return d;if(e?.tailwindMajor===4)return f;try{let e=await i(`tailwindcss`),t=e?.version??``,n=Number.parseInt(t.split(`.`)[0]||`0`,10);if(Number.isFinite(n)&&n>=4)return f}catch{}return d}async function I(e={}){let t=await F(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:u},languageOptions:{tolerant:!0,customSyntax:t},rules:{...u.configs.recommended.rules,...e.overrides}}]}async function L(e){let t=await e;return t.default||t}async function R(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await L(import(`eslint-plugin-drizzle`));return[{files:[C],name:`2digits:drizzle`,plugins:{drizzle:p(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const z=Object.fromEntries(m.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function B(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":m}},{name:`2digits:github-actions/recommended`,files:[E],ignores:[`!**/${E}`],languageOptions:{parser:h},rules:{...z}}]}async function V(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([L(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);if(t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings))continue;s[e]=o[e]}let c=n(s,M);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function H(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[k,n].flat(),name:`2digits:ignores`},g({strict:!1,...t,name:`2digits:gitignore`})]}function U(e={}){let{overrides:t={}}=e;return[{files:[C],name:`2digits:javascript`,plugins:{stylistic:te},languageOptions:{ecmaVersion:2022,globals:{..._.browser,..._.es2021,..._.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...ee.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function W(){return[{files:[C],name:`2digits:jsdoc`,plugins:{jsdoc:ne},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields-check":`error`}}]}function G(){return[...v[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(v[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(v[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(v[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...K,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...K,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...v[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:ie},plugins:{jsonc:re}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[D];function le(){return[{name:`2digits:markdown/setup`,plugins:{markdown:y}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ae([y.processors.markdown,oe])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:ue}},{name:`2digits:markdown/rules`,files:J,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}},{name:`2digits:markdown/disables`,files:[O],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},rules:{"no-alert":`off`,"no-console":`off`,"no-labels":`off`,"no-lone-blocks":`off`,"no-restricted-syntax":`off`,"no-undef":`off`,"no-unused-expressions":`off`,"no-unused-labels":`off`,"no-unused-vars":`off`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const ue={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function de(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([L(import(`@next/eslint-plugin-next`)),L(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},M);return[{name:`2digits:next/setup`,plugins:{next:p(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...r}}]}function fe(){return[{files:[C],name:`2digits:node`,settings:{node:{version:`>= 22.0.0`}},plugins:{node:b},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function pe(){let e=await L(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`**/package.json`],languageOptions:{parser:await L(import(`jsonc-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await L(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`}}]}async function me(){let[e,t]=await Promise.all([L(import(`eslint-config-prettier`)),L(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}async function he(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u,d]=await Promise.all([L(import(`@eslint-react/eslint-plugin`)),L(import(`eslint-plugin-react-hooks`)),L(import(`@typescript-eslint/parser`)),o?L(import(`eslint-plugin-react-compiler`)):void 0,L(import(`@stylistic/eslint-plugin`))]),f=s.configs.all.plugins,p=n({...c.configs[`recommended-latest`].rules,...s.configs[`recommended-type-checked`].rules},M);return[{name:`2digits:react/setup`,plugins:{stylistic:d,"react-dom":f[`@eslint-react/dom`],"react-web-api":f[`@eslint-react/web-api`],"react-extra":f[`@eslint-react`],"react-hooks":c,"react-hooks-extra":f[`@eslint-react/hooks-extra`],"react-naming-convention":f[`@eslint-react/naming-convention`],...o?{"react-compiler":u}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:l,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...p,...o?{"react-compiler/react-compiler":`error`}:{},"react-hooks-extra/no-unnecessary-use-callback":`error`,"react-hooks-extra/prefer-use-state-lazy-initialization":`error`,"react-hooks-extra/no-redundant-custom-hook":`error`,"react-hooks-extra/no-unnecessary-use-memo":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/prefer-shorthand-boolean":`error`,"react-extra/prefer-shorthand-fragment":`error`,"react-extra/prefer-react-namespace-import":`error`,"react-naming-convention/use-state":`error`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}function ge(){return[{files:[C],name:`2digits:regexp`,plugins:{regexp:x},rules:{...x.configs[`flat/recommended`].rules}}]}function _e(){return[{files:[C],name:`2digits:sonar`,plugins:{sonar:se},rules:{"sonar/code-eval":`error`,"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function Y(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([L(import(`eslint-plugin-storybook`)),L(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:p(a)}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"react-hooks/rules-of-hooks":`off`,"react/display-name":`off`,"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function ve(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:i},a]=await Promise.all([L(import(`eslint-plugin-tailwindcss`)),L(import(`@2digits/constants`)),r([`tailwind.config.ts`,`tailwind.config.js`])]);return[{files:[C],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:i,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function ye(e={}){let{overrides:t={}}=e,r=await L(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},M);return[{files:[C],name:`2digits:tanstack`,plugins:{tanstack:r},rules:{...i,...t}}]}async function be(e={}){let{overrides:t={}}=e,n=await L(import(`eslint-plugin-turbo`));return[{files:[C],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function xe(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([L(import(`typescript-eslint`)),L(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,M),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[C],ignores:[O],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],ignores:[O],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],ignores:[O],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],ignores:[O],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Se(){return[{files:[C],name:`2digits:unicorn`,plugins:{unicorn:S},rules:{...S.configs.recommended.rules,"unicorn/filename-case":[`off`],"unicorn/prefer-module":[`off`],"unicorn/prevent-abbreviations":[`off`],"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":[`off`]}}]}function Ce(){return[{name:`2digits:yaml/setup`,plugins:{yml:ce}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[`**/*.y?(a)ml`],languageOptions:{parser:h}};function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(t={},...n){let i;t.pnpm===void 0&&(i=r(`pnpm-workspace.yaml`));let o=new e(H(t.ignores),U(t.js),j(),fe(),P(),W(),Se(),_e(),ge(),A(),G(),Ce(),le(),B());Z(t.css)&&(o=o.append(I(Q(t.css)))),Z(t.turbo,a(`turbo`))&&(o=o.append(be(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,a(`typescript`))&&(o=o.append(xe(Q(t.ts)))),Z(t.react,a(`react`))&&(o=o.append(he({...Q(t.react),...c}))),Z(t.next,a(`next`))&&(o=o.append(de({...Q(t.next),...c}))),Z(t.storybook,a(`storybook`))&&(o=o.append(Y({...Q(t.storybook),...c}))),Z(t.tailwind,a(`tailwindcss`))&&(o=o.append(ve(Q(t.tailwind)))),Z(t.tanstack,a(`react-query`)||a(`@tanstack/react-query`)||a(`@tanstack/react-query-devtools`))&&(o=o.append(ye(Q(t.tanstack)))),Z(t.drizzle,a(`drizzle-kit`)||a(`drizzle-orm`))&&(o=o.append(R(Q(t.drizzle)))),Z(t.graphql,a(`graphql`))&&(o=o.append(V(Q(t.graphql)))),Z(t.pnpm,!!await i)&&(o=o.append(pe())),o=o.append(...n),a(`prettier`)&&(o=o.append(me())),o.renamePlugins(M).toConfigs()}export{$ as default,$ as twoDigits};
1
+ import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{findUp as r}from"find-up";import{getPackageInfo as i,isPackageExists as a}from"local-pkg";import o from"eslint-plugin-antfu";import s from"eslint-plugin-de-morgan";import c from"@eslint-community/eslint-plugin-eslint-comments";import l from"@eslint-community/eslint-plugin-eslint-comments/configs";import u from"@eslint/css";import{tailwind3 as d,tailwind4 as f}from"tailwind-csstree";import{fixupPluginRules as p}from"@eslint/compat";import m from"eslint-plugin-github-action";import h from"yaml-eslint-parser";import g from"eslint-config-flat-gitignore";import ee from"@eslint/js";import te from"@stylistic/eslint-plugin";import _ from"globals";import ne from"eslint-plugin-jsdoc";import re,{configs as v}from"eslint-plugin-jsonc";import ie from"jsonc-eslint-parser";import y from"@eslint/markdown";import{mergeProcessors as ae,processorPassThrough as oe}from"eslint-merge-processors";import b from"eslint-plugin-n";import x from"eslint-plugin-regexp";import se from"eslint-plugin-sonarjs";import S from"eslint-plugin-unicorn";import ce from"eslint-plugin-yml";const C=`**/*.?([cm])[jt]s?(x)`,w=`**/*.?([cm])ts`,T=`**/*.?([cm])tsx`,E=`.github/workflows/*.y?(a)ml`,D=`**/*.md`,O=`${D}/${C}`,k=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function A(){return[{files:[C],name:`2digits:antfu`,plugins:{antfu:o},rules:{"antfu/if-newline":`error`,"antfu/top-level-function":`error`}}]}function j(){return[{files:[C],name:`2digits:boolean`,plugins:{boolean:s},rules:{...s.configs.recommended.rules}}]}const M={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/hooks-extra":`react-hooks-extra`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`},N=n(l.recommended.rules,M);function P(){return[{files:[C],name:`2digits:comments`,plugins:{comments:c},rules:{...N,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function F(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return d;if(e?.tailwindMajor===4)return f;try{let e=(await i(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]||`0`,10);if(Number.isFinite(t)&&t>=4)return f}catch{}return d}async function I(e={}){let t=await F(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:u},languageOptions:{tolerant:!0,customSyntax:t},rules:{...u.configs.recommended.rules,...e.overrides}}]}async function L(e){let t=await e;return t.default||t}async function R(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await L(import(`eslint-plugin-drizzle`));return[{files:[C],name:`2digits:drizzle`,plugins:{drizzle:p(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const z=Object.fromEntries(m.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function B(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":m}},{name:`2digits:github-actions/recommended`,files:[E],ignores:[`!**/${E}`],languageOptions:{parser:h},rules:{...z}}]}async function V(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([L(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);if(t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings))continue;s[e]=o[e]}let c=n(s,M);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function H(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[k,n].flat(),name:`2digits:ignores`},g({strict:!1,...t,name:`2digits:gitignore`})]}function U(e={}){let{overrides:t={}}=e;return[{files:[C],name:`2digits:javascript`,plugins:{stylistic:te},languageOptions:{ecmaVersion:2022,globals:{..._.browser,..._.es2021,..._.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...ee.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function W(){return[{files:[C],name:`2digits:jsdoc`,plugins:{jsdoc:ne},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields-check":`error`}}]}function G(){return[...v[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(v[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(v[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(v[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...K,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...K,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...v[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:ie},plugins:{jsonc:re}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[D];function le(){return[{name:`2digits:markdown/setup`,plugins:{markdown:y}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ae([y.processors.markdown,oe])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:ue}},{name:`2digits:markdown/rules`,files:J,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}},{name:`2digits:markdown/disables`,files:[O],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},rules:{"no-alert":`off`,"no-console":`off`,"no-labels":`off`,"no-lone-blocks":`off`,"no-restricted-syntax":`off`,"no-undef":`off`,"no-unused-expressions":`off`,"no-unused-labels":`off`,"no-unused-vars":`off`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const ue={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function de(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([L(import(`@next/eslint-plugin-next`)),L(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},M);return[{name:`2digits:next/setup`,plugins:{next:p(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...r}}]}function fe(){return[{files:[C],name:`2digits:node`,settings:{node:{version:`>= 22.0.0`}},plugins:{node:b},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function pe(){let e=await L(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`**/package.json`],languageOptions:{parser:await L(import(`jsonc-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await L(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`}}]}async function me(){let[e,t]=await Promise.all([L(import(`eslint-config-prettier`)),L(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}async function he(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u,d]=await Promise.all([L(import(`@eslint-react/eslint-plugin`)),L(import(`eslint-plugin-react-hooks`)),L(import(`@typescript-eslint/parser`)),o?L(import(`eslint-plugin-react-compiler`)):void 0,L(import(`@stylistic/eslint-plugin`))]),f=s.configs.all.plugins,p=n({...c.configs[`recommended-latest`].rules,...s.configs[`recommended-type-checked`].rules},M);return[{name:`2digits:react/setup`,plugins:{stylistic:d,"react-dom":f[`@eslint-react/dom`],"react-web-api":f[`@eslint-react/web-api`],"react-extra":f[`@eslint-react`],"react-hooks":c,"react-hooks-extra":f[`@eslint-react/hooks-extra`],"react-naming-convention":f[`@eslint-react/naming-convention`],...o?{"react-compiler":u}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:l,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...p,...o?{"react-compiler/react-compiler":`error`}:{},"react-hooks-extra/no-unnecessary-use-callback":`error`,"react-hooks-extra/prefer-use-state-lazy-initialization":`error`,"react-hooks-extra/no-redundant-custom-hook":`error`,"react-hooks-extra/no-unnecessary-use-memo":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/prefer-shorthand-boolean":`error`,"react-extra/prefer-shorthand-fragment":`error`,"react-extra/prefer-react-namespace-import":`error`,"react-naming-convention/use-state":`error`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}function ge(){return[{files:[C],name:`2digits:regexp`,plugins:{regexp:x},rules:{...x.configs[`flat/recommended`].rules}}]}function _e(){return[{files:[C],name:`2digits:sonar`,plugins:{sonar:se},rules:{"sonar/code-eval":`error`,"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function Y(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([L(import(`eslint-plugin-storybook`)),L(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:p(a)}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"react-hooks/rules-of-hooks":`off`,"react/display-name":`off`,"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function ve(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:i},a]=await Promise.all([L(import(`eslint-plugin-tailwindcss`)),L(import(`@2digits/constants`)),r([`tailwind.config.ts`,`tailwind.config.js`])]);return[{files:[C],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:i,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function ye(e={}){let{overrides:t={}}=e,r=await L(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},M);return[{files:[C],name:`2digits:tanstack`,plugins:{tanstack:r},rules:{...i,...t}}]}async function be(e={}){let{overrides:t={}}=e,n=await L(import(`eslint-plugin-turbo`));return[{files:[C],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function xe(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([L(import(`typescript-eslint`)),L(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,M),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[C],ignores:[O],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],ignores:[O],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],ignores:[O],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],ignores:[O],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Se(){return[{files:[C],name:`2digits:unicorn`,plugins:{unicorn:S},rules:{...S.configs.recommended.rules,"unicorn/filename-case":[`off`],"unicorn/prefer-module":[`off`],"unicorn/prevent-abbreviations":[`off`],"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":[`off`]}}]}function Ce(){return[{name:`2digits:yaml/setup`,plugins:{yml:ce}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[`**/*.y?(a)ml`],languageOptions:{parser:h}};function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(t={},...n){let i;t.pnpm===void 0&&(i=r(`pnpm-workspace.yaml`));let o=new e(H(t.ignores),U(t.js),j(),fe(),P(),W(),Se(),_e(),ge(),A(),G(),Ce(),le(),B());Z(t.css)&&(o=o.append(I(Q(t.css)))),Z(t.turbo,a(`turbo`))&&(o=o.append(be(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,a(`typescript`))&&(o=o.append(xe(Q(t.ts)))),Z(t.react,a(`react`))&&(o=o.append(he({...Q(t.react),...c}))),Z(t.next,a(`next`))&&(o=o.append(de({...Q(t.next),...c}))),Z(t.storybook,a(`storybook`))&&(o=o.append(Y({...Q(t.storybook),...c}))),Z(t.tailwind,a(`tailwindcss`))&&(o=o.append(ve(Q(t.tailwind)))),Z(t.tanstack,a(`react-query`)||a(`@tanstack/react-query`)||a(`@tanstack/react-query-devtools`))&&(o=o.append(ye(Q(t.tanstack)))),Z(t.drizzle,a(`drizzle-kit`)||a(`drizzle-orm`))&&(o=o.append(R(Q(t.drizzle)))),Z(t.graphql,a(`graphql`))&&(o=o.append(V(Q(t.graphql)))),Z(t.pnpm,!!await i)&&(o=o.append(pe())),o=o.append(...n),a(`prettier`)&&(o=o.append(me())),o.renamePlugins(M).toConfigs()}export{$ as default,$ as twoDigits};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "4.8.3",
3
+ "version": "4.8.4",
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": {
@@ -36,8 +36,8 @@
36
36
  "@next/eslint-plugin-next": "15.5.2",
37
37
  "@stylistic/eslint-plugin": "5.3.1",
38
38
  "@tanstack/eslint-plugin-query": "5.86.0",
39
- "@typescript-eslint/parser": "8.42.0",
40
- "@typescript-eslint/utils": "8.42.0",
39
+ "@typescript-eslint/parser": "8.43.0",
40
+ "@typescript-eslint/utils": "8.43.0",
41
41
  "eslint-config-flat-gitignore": "2.1.0",
42
42
  "eslint-config-prettier": "10.1.8",
43
43
  "eslint-flat-config-utils": "2.1.1",
@@ -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.4.0",
49
+ "eslint-plugin-jsdoc": "55.1.2",
50
50
  "eslint-plugin-jsonc": "2.20.1",
51
51
  "eslint-plugin-n": "17.21.3",
52
52
  "eslint-plugin-pnpm": "1.1.1",
@@ -57,18 +57,18 @@
57
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": "61.0.1",
60
+ "eslint-plugin-unicorn": "61.0.2",
61
61
  "eslint-plugin-yml": "1.18.0",
62
62
  "find-up": "7.0.0",
63
- "globals": "16.3.0",
63
+ "globals": "16.4.0",
64
64
  "graphql-config": "5.1.5",
65
65
  "jsonc-eslint-parser": "2.4.0",
66
66
  "local-pkg": "1.1.2",
67
67
  "tailwind-csstree": "0.1.4",
68
- "typescript-eslint": "8.42.0",
68
+ "typescript-eslint": "8.43.0",
69
69
  "yaml-eslint-parser": "1.3.0",
70
- "@2digits/eslint-plugin": "3.1.17",
71
- "@2digits/constants": "1.1.7"
70
+ "@2digits/constants": "1.1.8",
71
+ "@2digits/eslint-plugin": "3.1.18"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@eslint/config-inspector": "1.2.0",
@@ -78,8 +78,8 @@
78
78
  "eslint-typegen": "2.3.0",
79
79
  "execa": "9.6.0",
80
80
  "react": "19.1.1",
81
- "tinyglobby": "0.2.14",
82
- "tsdown": "0.14.2",
81
+ "tinyglobby": "0.2.15",
82
+ "tsdown": "0.15.0",
83
83
  "typescript": "5.9.2",
84
84
  "vitest": "3.2.4",
85
85
  "@2digits/tsconfig": "0.8.2"