@2digits/eslint-config 5.1.7 → 5.1.8

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
@@ -8424,6 +8424,11 @@ interface RuleOptions {
8424
8424
  * @see https://eslint.style/rules/eol-last
8425
8425
  */
8426
8426
  'stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>;
8427
+ /**
8428
+ * Enforce consistent line break styles for JSX props
8429
+ * @see https://eslint.style/rules/jsx-props-style
8430
+ */
8431
+ 'stylistic/exp-jsx-props-style'?: Linter.RuleEntry<StylisticExpJsxPropsStyle>;
8427
8432
  /**
8428
8433
  * Enforce consistent spacing and line break styles inside brackets.
8429
8434
  * @see https://eslint.style/rules/list-style
@@ -9523,7 +9528,7 @@ interface RuleOptions {
9523
9528
  * Disallow default values that will never be used
9524
9529
  * @see https://typescript-eslint.io/rules/no-useless-default-assignment
9525
9530
  */
9526
- 'ts/no-useless-default-assignment'?: Linter.RuleEntry<[]>;
9531
+ 'ts/no-useless-default-assignment'?: Linter.RuleEntry<TsNoUselessDefaultAssignment>;
9527
9532
  /**
9528
9533
  * Disallow empty exports that don't change anything in a module file
9529
9534
  * @see https://typescript-eslint.io/rules/no-useless-empty-export
@@ -9745,725 +9750,730 @@ interface RuleOptions {
9745
9750
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
9746
9751
  /**
9747
9752
  * Improve regexes by making them shorter, consistent, and safer.
9748
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
9753
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md
9749
9754
  */
9750
9755
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
9751
9756
  /**
9752
9757
  * Enforce a specific parameter name in catch clauses.
9753
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
9758
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md
9754
9759
  */
9755
9760
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
9756
9761
  /**
9757
9762
  * Enforce consistent assertion style with `node:assert`.
9758
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
9763
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md
9759
9764
  */
9760
9765
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
9761
9766
  /**
9762
9767
  * Prefer passing `Date` directly to the constructor when cloning.
9763
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
9768
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md
9764
9769
  */
9765
9770
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
9766
9771
  /**
9767
9772
  * Use destructured variables over properties.
9768
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
9773
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md
9769
9774
  */
9770
9775
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
9771
9776
  /**
9772
9777
  * Prefer consistent types when spreading a ternary in an array literal.
9773
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
9778
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md
9774
9779
  */
9775
9780
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
9776
9781
  /**
9777
9782
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
9778
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
9783
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md
9779
9784
  */
9780
9785
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
9781
9786
  /**
9782
9787
  * Move function definitions to the highest possible scope.
9783
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
9788
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md
9784
9789
  */
9785
9790
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
9786
9791
  /**
9787
9792
  * Enforce correct `Error` subclassing.
9788
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
9793
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md
9789
9794
  */
9790
9795
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
9791
9796
  /**
9792
9797
  * Enforce no spaces between braces.
9793
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
9798
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md
9794
9799
  */
9795
9800
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
9796
9801
  /**
9797
9802
  * Enforce passing a `message` value when creating a built-in error.
9798
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
9803
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md
9799
9804
  */
9800
9805
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
9801
9806
  /**
9802
9807
  * Require escape sequences to use uppercase or lowercase values.
9803
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
9808
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md
9804
9809
  */
9805
9810
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
9806
9811
  /**
9807
9812
  * Add expiration conditions to TODO comments.
9808
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
9813
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md
9809
9814
  */
9810
9815
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
9811
9816
  /**
9812
9817
  * Enforce explicitly comparing the `length` or `size` property of a value.
9813
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
9818
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md
9814
9819
  */
9815
9820
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
9816
9821
  /**
9817
9822
  * Enforce a case style for filenames.
9818
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
9823
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md
9819
9824
  */
9820
9825
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
9821
9826
  /**
9822
9827
  * Enforce specific import styles per module.
9823
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
9828
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md
9824
9829
  */
9825
9830
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
9831
+ /**
9832
+ * Prevent usage of variables from outside the scope of isolated functions.
9833
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
9834
+ */
9835
+ 'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
9826
9836
  /**
9827
9837
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
9828
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
9838
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md
9829
9839
  */
9830
9840
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
9831
9841
  /**
9832
9842
  * Enforce specifying rules to disable in `eslint-disable` comments.
9833
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
9843
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md
9834
9844
  */
9835
9845
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
9836
9846
  /**
9837
9847
  * Disallow recursive access to `this` within getters and setters.
9838
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
9848
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md
9839
9849
  */
9840
9850
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
9841
9851
  /**
9842
9852
  * Disallow anonymous functions and classes as the default export.
9843
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
9853
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md
9844
9854
  */
9845
9855
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
9846
9856
  /**
9847
9857
  * Prevent passing a function reference directly to iterator methods.
9848
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
9858
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md
9849
9859
  */
9850
9860
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
9851
9861
  /**
9852
9862
  * Prefer `for…of` over the `forEach` method.
9853
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
9863
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md
9854
9864
  */
9855
9865
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
9856
9866
  /**
9857
9867
  * Disallow using the `this` argument in array methods.
9858
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
9868
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md
9859
9869
  */
9860
9870
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
9861
9871
  /**
9862
9872
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
9863
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
9873
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
9864
9874
  * @deprecated
9865
9875
  */
9866
9876
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
9867
9877
  /**
9868
9878
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
9869
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
9879
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md
9870
9880
  */
9871
9881
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
9872
9882
  /**
9873
9883
  * Prefer `Array#toReversed()` over `Array#reverse()`.
9874
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
9884
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md
9875
9885
  */
9876
9886
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
9877
9887
  /**
9878
9888
  * Prefer `Array#toSorted()` over `Array#sort()`.
9879
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
9889
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
9880
9890
  */
9881
9891
  'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
9882
9892
  /**
9883
9893
  * Disallow member access from await expression.
9884
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
9894
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md
9885
9895
  */
9886
9896
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
9887
9897
  /**
9888
9898
  * Disallow using `await` in `Promise` method parameters.
9889
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
9899
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md
9890
9900
  */
9891
9901
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
9892
9902
  /**
9893
9903
  * Do not use leading/trailing space between `console.log` parameters.
9894
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
9904
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md
9895
9905
  */
9896
9906
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
9897
9907
  /**
9898
9908
  * Do not use `document.cookie` directly.
9899
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
9909
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md
9900
9910
  */
9901
9911
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
9902
9912
  /**
9903
9913
  * Disallow empty files.
9904
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
9914
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md
9905
9915
  */
9906
9916
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
9907
9917
  /**
9908
9918
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
9909
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
9919
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md
9910
9920
  */
9911
9921
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
9912
9922
  /**
9913
9923
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
9914
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
9924
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md
9915
9925
  */
9916
9926
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
9917
9927
  /**
9918
9928
  * Disallow immediate mutation after variable assignment.
9919
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
9929
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
9920
9930
  */
9921
9931
  'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
9922
9932
  /**
9923
9933
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
9924
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
9934
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
9925
9935
  * @deprecated
9926
9936
  */
9927
9937
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
9928
9938
  /**
9929
9939
  * Disallow `instanceof` with built-in objects
9930
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
9940
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md
9931
9941
  */
9932
9942
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
9933
9943
  /**
9934
9944
  * Disallow invalid options in `fetch()` and `new Request()`.
9935
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
9945
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md
9936
9946
  */
9937
9947
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
9938
9948
  /**
9939
9949
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
9940
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
9950
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md
9941
9951
  */
9942
9952
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
9943
9953
  /**
9944
9954
  * Disallow identifiers starting with `new` or `class`.
9945
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
9955
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md
9946
9956
  */
9947
9957
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
9948
9958
  /**
9949
9959
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
9950
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
9960
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
9951
9961
  * @deprecated
9952
9962
  */
9953
9963
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
9954
9964
  /**
9955
9965
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
9956
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
9966
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md
9957
9967
  */
9958
9968
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
9959
9969
  /**
9960
9970
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
9961
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
9971
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md
9962
9972
  */
9963
9973
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
9964
9974
  /**
9965
9975
  * Disallow named usage of default import and export.
9966
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
9976
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md
9967
9977
  */
9968
9978
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
9969
9979
  /**
9970
9980
  * Disallow negated conditions.
9971
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
9981
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md
9972
9982
  */
9973
9983
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
9974
9984
  /**
9975
9985
  * Disallow negated expression in equality check.
9976
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
9986
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md
9977
9987
  */
9978
9988
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
9979
9989
  /**
9980
9990
  * Disallow nested ternary expressions.
9981
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
9991
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md
9982
9992
  */
9983
9993
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
9984
9994
  /**
9985
9995
  * Disallow `new Array()`.
9986
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
9996
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md
9987
9997
  */
9988
9998
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
9989
9999
  /**
9990
10000
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
9991
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
10001
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md
9992
10002
  */
9993
10003
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
9994
10004
  /**
9995
10005
  * Disallow the use of the `null` literal.
9996
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
10006
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md
9997
10007
  */
9998
10008
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
9999
10009
  /**
10000
10010
  * Disallow the use of objects as default parameters.
10001
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
10011
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md
10002
10012
  */
10003
10013
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
10004
10014
  /**
10005
10015
  * Disallow `process.exit()`.
10006
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
10016
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md
10007
10017
  */
10008
10018
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
10009
10019
  /**
10010
10020
  * Disallow passing single-element arrays to `Promise` methods.
10011
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
10021
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md
10012
10022
  */
10013
10023
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
10014
10024
  /**
10015
10025
  * Disallow classes that only have static members.
10016
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
10026
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md
10017
10027
  */
10018
10028
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
10019
10029
  /**
10020
10030
  * Disallow `then` property.
10021
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
10031
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md
10022
10032
  */
10023
10033
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
10024
10034
  /**
10025
10035
  * Disallow assigning `this` to a variable.
10026
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
10036
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md
10027
10037
  */
10028
10038
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
10029
10039
  /**
10030
10040
  * Disallow comparing `undefined` using `typeof`.
10031
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
10041
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md
10032
10042
  */
10033
10043
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
10034
10044
  /**
10035
10045
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
10036
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
10046
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md
10037
10047
  */
10038
10048
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
10039
10049
  /**
10040
10050
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
10041
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
10051
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md
10042
10052
  */
10043
10053
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
10044
10054
  /**
10045
10055
  * Disallow awaiting non-promise values.
10046
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
10056
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md
10047
10057
  */
10048
10058
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
10049
10059
  /**
10050
10060
  * Enforce the use of built-in methods instead of unnecessary polyfills.
10051
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
10061
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md
10052
10062
  */
10053
10063
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
10054
10064
  /**
10055
10065
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
10056
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
10066
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md
10057
10067
  */
10058
10068
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
10059
10069
  /**
10060
10070
  * Disallow unreadable array destructuring.
10061
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
10071
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md
10062
10072
  */
10063
10073
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
10064
10074
  /**
10065
10075
  * Disallow unreadable IIFEs.
10066
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
10076
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md
10067
10077
  */
10068
10078
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
10069
10079
  /**
10070
10080
  * Disallow unused object properties.
10071
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
10081
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md
10072
10082
  */
10073
10083
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
10074
10084
  /**
10075
10085
  * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
10076
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
10086
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
10077
10087
  */
10078
10088
  'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
10079
10089
  /**
10080
10090
  * Disallow unnecessary `Error.captureStackTrace(…)`.
10081
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
10091
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md
10082
10092
  */
10083
10093
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
10084
10094
  /**
10085
10095
  * Disallow useless fallback when spreading in object literals.
10086
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
10096
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md
10087
10097
  */
10088
10098
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
10089
10099
  /**
10090
10100
  * Disallow useless array length check.
10091
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
10101
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md
10092
10102
  */
10093
10103
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
10094
10104
  /**
10095
10105
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
10096
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
10106
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md
10097
10107
  */
10098
10108
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
10099
10109
  /**
10100
10110
  * Disallow unnecessary spread.
10101
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
10111
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md
10102
10112
  */
10103
10113
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
10104
10114
  /**
10105
10115
  * Disallow useless case in switch statements.
10106
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
10116
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md
10107
10117
  */
10108
10118
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
10109
10119
  /**
10110
10120
  * Disallow useless `undefined`.
10111
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
10121
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md
10112
10122
  */
10113
10123
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
10114
10124
  /**
10115
10125
  * Disallow number literals with zero fractions or dangling dots.
10116
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
10126
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md
10117
10127
  */
10118
10128
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
10119
10129
  /**
10120
10130
  * Enforce proper case for numeric literals.
10121
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
10131
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md
10122
10132
  */
10123
10133
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
10124
10134
  /**
10125
10135
  * Enforce the style of numeric separators by correctly grouping digits.
10126
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
10136
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md
10127
10137
  */
10128
10138
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
10129
10139
  /**
10130
10140
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
10131
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
10141
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md
10132
10142
  */
10133
10143
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
10134
10144
  /**
10135
10145
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
10136
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
10146
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md
10137
10147
  */
10138
10148
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
10139
10149
  /**
10140
10150
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
10141
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
10151
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md
10142
10152
  */
10143
10153
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
10144
10154
  /**
10145
10155
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
10146
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
10156
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md
10147
10157
  */
10148
10158
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
10149
10159
  /**
10150
10160
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
10151
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
10161
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md
10152
10162
  */
10153
10163
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
10154
10164
  /**
10155
10165
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
10156
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
10166
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md
10157
10167
  */
10158
10168
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
10159
10169
  /**
10160
10170
  * Prefer `.at()` method for index access and `String#charAt()`.
10161
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
10171
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md
10162
10172
  */
10163
10173
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
10164
10174
  /**
10165
10175
  * Prefer `BigInt` literals over the constructor.
10166
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
10176
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
10167
10177
  */
10168
10178
  'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
10169
10179
  /**
10170
10180
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
10171
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
10181
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md
10172
10182
  */
10173
10183
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
10174
10184
  /**
10175
10185
  * Prefer class field declarations over `this` assignments in constructors.
10176
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
10186
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md
10177
10187
  */
10178
10188
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
10179
10189
  /**
10180
10190
  * Prefer using `Element#classList.toggle()` to toggle class names.
10181
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
10191
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
10182
10192
  */
10183
10193
  'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
10184
10194
  /**
10185
10195
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
10186
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
10196
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md
10187
10197
  */
10188
10198
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
10189
10199
  /**
10190
10200
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
10191
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
10201
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md
10192
10202
  */
10193
10203
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
10194
10204
  /**
10195
10205
  * Prefer default parameters over reassignment.
10196
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
10206
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md
10197
10207
  */
10198
10208
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
10199
10209
  /**
10200
10210
  * Prefer `Node#append()` over `Node#appendChild()`.
10201
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
10211
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md
10202
10212
  */
10203
10213
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
10204
10214
  /**
10205
10215
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
10206
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
10216
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md
10207
10217
  */
10208
10218
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
10209
10219
  /**
10210
10220
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
10211
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
10221
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md
10212
10222
  */
10213
10223
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
10214
10224
  /**
10215
10225
  * Prefer `.textContent` over `.innerText`.
10216
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
10226
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md
10217
10227
  */
10218
10228
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
10219
10229
  /**
10220
10230
  * Prefer `EventTarget` over `EventEmitter`.
10221
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
10231
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md
10222
10232
  */
10223
10233
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
10224
10234
  /**
10225
10235
  * Prefer `export…from` when re-exporting.
10226
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
10236
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md
10227
10237
  */
10228
10238
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
10229
10239
  /**
10230
10240
  * Prefer `globalThis` over `window`, `self`, and `global`.
10231
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
10241
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md
10232
10242
  */
10233
10243
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
10234
10244
  /**
10235
10245
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
10236
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
10246
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md
10237
10247
  */
10238
10248
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
10239
10249
  /**
10240
10250
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
10241
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
10251
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md
10242
10252
  */
10243
10253
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
10244
10254
  /**
10245
10255
  * Prefer reading a JSON file as a buffer.
10246
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
10256
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md
10247
10257
  */
10248
10258
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
10249
10259
  /**
10250
10260
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
10251
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
10261
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md
10252
10262
  */
10253
10263
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
10254
10264
  /**
10255
10265
  * Prefer using a logical operator over a ternary.
10256
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
10266
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md
10257
10267
  */
10258
10268
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
10259
10269
  /**
10260
10270
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
10261
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
10271
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md
10262
10272
  */
10263
10273
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
10264
10274
  /**
10265
10275
  * Enforce the use of `Math.trunc` instead of bitwise operators.
10266
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
10276
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md
10267
10277
  */
10268
10278
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
10269
10279
  /**
10270
10280
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
10271
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
10281
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md
10272
10282
  */
10273
10283
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
10274
10284
  /**
10275
10285
  * Prefer modern `Math` APIs over legacy patterns.
10276
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
10286
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md
10277
10287
  */
10278
10288
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
10279
10289
  /**
10280
10290
  * Prefer JavaScript modules (ESM) over CommonJS.
10281
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
10291
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md
10282
10292
  */
10283
10293
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
10284
10294
  /**
10285
10295
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
10286
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
10296
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md
10287
10297
  */
10288
10298
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
10289
10299
  /**
10290
10300
  * Prefer negative index over `.length - index` when possible.
10291
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
10301
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md
10292
10302
  */
10293
10303
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
10294
10304
  /**
10295
10305
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
10296
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
10306
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md
10297
10307
  */
10298
10308
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
10299
10309
  /**
10300
10310
  * Prefer `Number` static properties over global ones.
10301
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
10311
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md
10302
10312
  */
10303
10313
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
10304
10314
  /**
10305
10315
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
10306
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
10316
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md
10307
10317
  */
10308
10318
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
10309
10319
  /**
10310
10320
  * Prefer omitting the `catch` binding parameter.
10311
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
10321
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md
10312
10322
  */
10313
10323
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
10314
10324
  /**
10315
10325
  * Prefer borrowing methods from the prototype instead of the instance.
10316
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
10326
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md
10317
10327
  */
10318
10328
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
10319
10329
  /**
10320
10330
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
10321
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
10331
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md
10322
10332
  */
10323
10333
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
10324
10334
  /**
10325
10335
  * Prefer `Reflect.apply()` over `Function#apply()`.
10326
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
10336
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md
10327
10337
  */
10328
10338
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
10329
10339
  /**
10330
10340
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
10331
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
10341
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md
10332
10342
  */
10333
10343
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
10334
10344
  /**
10335
10345
  * Prefer `Response.json()` over `new Response(JSON.stringify())`.
10336
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
10346
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
10337
10347
  */
10338
10348
  'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
10339
10349
  /**
10340
10350
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
10341
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
10351
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md
10342
10352
  */
10343
10353
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
10344
10354
  /**
10345
10355
  * Prefer using `Set#size` instead of `Array#length`.
10346
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
10356
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md
10347
10357
  */
10348
10358
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
10349
10359
  /**
10350
10360
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
10351
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
10361
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md
10352
10362
  */
10353
10363
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
10354
10364
  /**
10355
10365
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
10356
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
10366
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md
10357
10367
  */
10358
10368
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
10359
10369
  /**
10360
10370
  * Prefer using the `String.raw` tag to avoid escaping `\`.
10361
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
10371
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md
10362
10372
  */
10363
10373
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
10364
10374
  /**
10365
10375
  * Prefer `String#replaceAll()` over regex searches with the global flag.
10366
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
10376
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md
10367
10377
  */
10368
10378
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
10369
10379
  /**
10370
10380
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
10371
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
10381
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md
10372
10382
  */
10373
10383
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
10374
10384
  /**
10375
10385
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
10376
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
10386
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md
10377
10387
  */
10378
10388
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
10379
10389
  /**
10380
10390
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
10381
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
10391
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md
10382
10392
  */
10383
10393
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
10384
10394
  /**
10385
10395
  * Prefer using `structuredClone` to create a deep clone.
10386
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
10396
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md
10387
10397
  */
10388
10398
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
10389
10399
  /**
10390
10400
  * Prefer `switch` over multiple `else-if`.
10391
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
10401
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md
10392
10402
  */
10393
10403
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
10394
10404
  /**
10395
10405
  * Prefer ternary expressions over simple `if-else` statements.
10396
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
10406
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md
10397
10407
  */
10398
10408
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
10399
10409
  /**
10400
10410
  * Prefer top-level await over top-level promises and async function calls.
10401
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
10411
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md
10402
10412
  */
10403
10413
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
10404
10414
  /**
10405
10415
  * Enforce throwing `TypeError` in type checking conditions.
10406
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
10416
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md
10407
10417
  */
10408
10418
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
10409
10419
  /**
10410
10420
  * Prevent abbreviations.
10411
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
10421
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md
10412
10422
  */
10413
10423
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
10414
10424
  /**
10415
10425
  * Enforce consistent relative URL style.
10416
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
10426
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md
10417
10427
  */
10418
10428
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
10419
10429
  /**
10420
10430
  * Enforce using the separator argument with `Array#join()`.
10421
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
10431
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md
10422
10432
  */
10423
10433
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
10424
10434
  /**
10425
10435
  * Require non-empty module attributes for imports and exports
10426
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
10436
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
10427
10437
  */
10428
10438
  'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
10429
10439
  /**
10430
10440
  * Require non-empty specifier list in import and export statements.
10431
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
10441
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md
10432
10442
  */
10433
10443
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
10434
10444
  /**
10435
10445
  * Enforce using the digits argument with `Number#toFixed()`.
10436
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
10446
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md
10437
10447
  */
10438
10448
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
10439
10449
  /**
10440
10450
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
10441
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
10451
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md
10442
10452
  */
10443
10453
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
10444
10454
  /**
10445
10455
  * Enforce better string content.
10446
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
10456
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md
10447
10457
  */
10448
10458
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
10449
10459
  /**
10450
10460
  * Enforce consistent brace style for `case` clauses.
10451
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
10461
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md
10452
10462
  */
10453
10463
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
10454
10464
  /**
10455
10465
  * Fix whitespace-insensitive template indentation.
10456
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
10466
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md
10457
10467
  */
10458
10468
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
10459
10469
  /**
10460
10470
  * Enforce consistent case for text encoding identifiers.
10461
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
10471
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md
10462
10472
  */
10463
10473
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
10464
10474
  /**
10465
10475
  * Require `new` when creating an error.
10466
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
10476
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md
10467
10477
  */
10468
10478
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
10469
10479
  /**
@@ -14112,15 +14122,24 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
14112
14122
  consistent?: boolean;
14113
14123
  })]; // ----- stylistic/dot-location -----
14114
14124
  type StylisticDotLocation = [] | [("object" | "property")]; // ----- stylistic/eol-last -----
14115
- type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")]; // ----- stylistic/exp-list-style -----
14125
+ type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")]; // ----- stylistic/exp-jsx-props-style -----
14126
+ type StylisticExpJsxPropsStyle = [] | [{
14127
+ singleLine?: {
14128
+ maxItems?: number;
14129
+ };
14130
+ multiLine?: {
14131
+ minItems?: number;
14132
+ maxItemsPerLine?: number;
14133
+ };
14134
+ }]; // ----- stylistic/exp-list-style -----
14116
14135
  type StylisticExpListStyle = [] | [{
14117
14136
  singleLine?: _StylisticExpListStyle_SingleLineConfig;
14118
14137
  multiLine?: _StylisticExpListStyle_MultiLineConfig;
14119
14138
  overrides?: {
14139
+ "()"?: _StylisticExpListStyle_BaseConfig;
14120
14140
  "[]"?: _StylisticExpListStyle_BaseConfig;
14121
14141
  "{}"?: _StylisticExpListStyle_BaseConfig;
14122
14142
  "<>"?: _StylisticExpListStyle_BaseConfig;
14123
- "()"?: _StylisticExpListStyle_BaseConfig;
14124
14143
  ArrayExpression?: _StylisticExpListStyle_BaseConfig;
14125
14144
  ArrayPattern?: _StylisticExpListStyle_BaseConfig;
14126
14145
  ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
@@ -14128,21 +14147,22 @@ type StylisticExpListStyle = [] | [{
14128
14147
  ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
14129
14148
  FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
14130
14149
  FunctionExpression?: _StylisticExpListStyle_BaseConfig;
14131
- ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
14150
+ IfStatement?: _StylisticExpListStyle_BaseConfig;
14132
14151
  ImportAttributes?: _StylisticExpListStyle_BaseConfig;
14152
+ ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
14153
+ JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
14154
+ JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
14133
14155
  NewExpression?: _StylisticExpListStyle_BaseConfig;
14134
14156
  ObjectExpression?: _StylisticExpListStyle_BaseConfig;
14135
14157
  ObjectPattern?: _StylisticExpListStyle_BaseConfig;
14136
14158
  TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
14159
+ TSEnumBody?: _StylisticExpListStyle_BaseConfig;
14137
14160
  TSFunctionType?: _StylisticExpListStyle_BaseConfig;
14138
14161
  TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
14139
- TSEnumBody?: _StylisticExpListStyle_BaseConfig;
14140
14162
  TSTupleType?: _StylisticExpListStyle_BaseConfig;
14141
14163
  TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
14142
14164
  TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
14143
14165
  TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
14144
- JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
14145
- JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
14146
14166
  };
14147
14167
  }];
14148
14168
  interface _StylisticExpListStyle_SingleLineConfig {
@@ -15975,7 +15995,10 @@ type TsNoUseBeforeDefine = [] | [("nofunc" | {
15975
15995
  ignoreTypeReferences?: boolean;
15976
15996
  typedefs?: boolean;
15977
15997
  variables?: boolean;
15978
- })]; // ----- ts/no-var-requires -----
15998
+ })]; // ----- ts/no-useless-default-assignment -----
15999
+ type TsNoUselessDefaultAssignment = [] | [{
16000
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
16001
+ }]; // ----- ts/no-var-requires -----
15979
16002
  type TsNoVarRequires = [] | [{
15980
16003
  allow?: string[];
15981
16004
  }]; // ----- ts/only-throw-error -----
@@ -16226,7 +16249,15 @@ interface _UnicornImportStyle_ModuleStyles {
16226
16249
  }
16227
16250
  interface _UnicornImportStyle_BooleanObject {
16228
16251
  [k: string]: boolean | undefined;
16229
- } // ----- unicorn/no-array-reduce -----
16252
+ } // ----- unicorn/isolated-functions -----
16253
+ type UnicornIsolatedFunctions = [] | [{
16254
+ overrideGlobals?: {
16255
+ [k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined;
16256
+ };
16257
+ functions?: string[];
16258
+ selectors?: string[];
16259
+ comments?: string[];
16260
+ }]; // ----- unicorn/no-array-reduce -----
16230
16261
  type UnicornNoArrayReduce = [] | [{
16231
16262
  allowSimpleOperations?: boolean;
16232
16263
  }]; // ----- unicorn/no-array-reverse -----
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{i as e}from"./chunk-DM4wYaYk.mjs";import{FlatConfigComposer as t,renamePluginsInConfigs as n,renamePluginsInRules as r}from"eslint-flat-config-utils";import{getPackageInfo as i,isPackageExists as a}from"local-pkg";import{findWorkspaceDir as o}from"pkg-types";import s from"eslint-plugin-antfu";import c from"eslint-plugin-de-morgan";import l from"@eslint-community/eslint-plugin-eslint-comments";import u from"@eslint-community/eslint-plugin-eslint-comments/configs";import d from"@eslint/css";import{tailwind3 as f,tailwind4 as p}from"tailwind-csstree";import m from"eslint-plugin-depend";import{fixupPluginRules as h}from"@eslint/compat";import g from"eslint-plugin-github-action";import*as _ from"yaml-eslint-parser";import v from"eslint-config-flat-gitignore";import ee from"@eslint/js";import te from"@stylistic/eslint-plugin";import y from"globals";import ne from"eslint-plugin-jsdoc";import re,{configs as b}from"eslint-plugin-jsonc";import ie from"jsonc-eslint-parser";import x from"@eslint/markdown";import{mergeProcessors as ae,processorPassThrough as oe}from"eslint-merge-processors";import se from"eslint-plugin-n";import S from"eslint-plugin-regexp";import C from"eslint-plugin-sonarjs";import*as w from"empathic/find";import T from"eslint-plugin-toml";import E from"eslint-plugin-unicorn";import ce from"eslint-plugin-yml";const D=`**/*.?([cm])[jt]s?(x)`,O=`**/*.?([cm])ts`,k=`**/*.?([cm])tsx`,A=`.github/workflows/*.y?(a)ml`,j=`**/*.md`,M=`${j}/${D}`,N=`**/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 P(){return[{files:[D],name:`2digits:antfu`,plugins:{antfu:s},rules:{"antfu/top-level-function":`error`}}]}function F(){return[{files:[D],name:`2digits:boolean`,plugins:{boolean:c},rules:{...c.configs.recommended.rules}}]}const I={"@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/rsc":`react-rsc`,"@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-query`,"@tanstack/router":`tanstack-router`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`,antfu:`antfu`,css:`css`,depend:`depend`,"github-action":`github-action`,jsonc:`jsonc`,markdown:`markdown`,pnpm:`pnpm`,regexp:`regexp`,yml:`yml`,zod:`zod`,toml:`toml`},L=[`storybook`,`@storybook/nextjs`,`@storybook/nextjs-vite`,`@storybook/react-vite`,`@storybook/react-webpack5`,`@storybook/react-native-web-vite`],R=r(u.recommended.rules,I);function z(){return[{files:[D],name:`2digits:comments`,plugins:{comments:l},rules:{...R,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function B(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return f;if(e?.tailwindMajor===4)return p;try{let e=(await i(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]||`0`,10);if(Number.isFinite(t)&&t>=4)return p}catch{}return f}async function V(e={}){let t=await B(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:d},languageOptions:{tolerant:!0,customSyntax:t},rules:{...d.configs.recommended.rules,...e.overrides}}]}function H(){return[{files:[D],name:`2digits:depend`,plugins:{depend:m},rules:{"depend/ban-dependencies":`warn`}}]}async function U(e){let t=await e;return t.default||t}async function W(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await U(import(`eslint-plugin-drizzle`));return[{files:[D],name:`2digits:drizzle`,plugins:{drizzle:h(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const G=Object.fromEntries(g.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function le(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":g}},{name:`2digits:github-actions/recommended`,files:[A],ignores:[`!**/${A}`],languageOptions:{parser:_},rules:{...G}}]}async function ue(e={}){let{overrides:t={},files:n=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([U(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/`,``);t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings)||(s[e]=o[e])}let c=r(s,I);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:n,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function de(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[N,n].flat(),name:`2digits:ignores`},v({strict:!1,...t,name:`2digits:gitignore`})]}function fe(e={}){let{overrides:t={}}=e;return[{files:[D],name:`2digits:javascript`,plugins:{stylistic:te},languageOptions:{ecmaVersion:2022,globals:{...y.browser,...y.es2021,...y.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 pe(){return[{files:[D],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 me(){return[...b[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(b[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(b[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(b[`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$`}]}},...b[`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=[j];function he(){return[{name:`2digits:markdown/setup`,plugins:{markdown:x}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ae([x.processors.markdown,oe])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:_e}},{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`}}]}async function ge(){let e=await U(import(`typescript-eslint`)),t=await U(import(`@eslint-react/eslint-plugin`)),n=r({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},I);return[{name:`2digits:markdown/disables`,files:[M],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...n,"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 _e={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 ve(e={}){let{files:t=[O,k],overrides:n={},parserOptions:i}=e,[a,o]=await Promise.all([U(import(`@next/eslint-plugin-next`)),U(import(`@typescript-eslint/parser`))]),s=r({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},I);return[{name:`2digits:next/setup`,plugins:{next:h(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`,...n}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var ye={node:`24.13.0`};function be(){return[{files:[D],name:`2digits:node`,settings:{node:{version:ye.node}},plugins:{node:se},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 xe(){let e=await U(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`package.json`,`**/package.json`],languageOptions:{parser:await U(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 U(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`,"pnpm/yaml-valid-packages":`error`,"pnpm/yaml-enforce-settings":[`error`,{autofix:!0,settings:{catalogMode:`strict`,savePrefix:``,preferWorkspacePackages:!0,cleanupUnusedCatalogs:!0}}]}}]}async function Se(){let[e,t]=await Promise.all([U(import(`eslint-config-prettier`)),U(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 Ce(t={}){let{files:n=[O,k],overrides:i={},parserOptions:a,tsconfigRootDir:o,reactCompiler:s=!0}=t,[c,l,u,d,f]=await Promise.all([U(import(`@eslint-react/eslint-plugin`)),U(import(`./eslint-plugin-react-hooks-21xKLr_l.mjs`).then(t=>e(t.default,1))),U(import(`@typescript-eslint/parser`)),s?U(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),U(import(`@stylistic/eslint-plugin`))]),p=c.configs.all.plugins,m=r({...c.configs[`disable-conflict-eslint-plugin-react`].rules,...c.configs[`recommended-type-checked`].rules},I);return[{name:`2digits:react/setup`,plugins:{stylistic:f,"react-dom":p[`@eslint-react/dom`],"react-web-api":p[`@eslint-react/web-api`],"react-extra":p[`@eslint-react`],"react-hooks":l,"react-hooks-extra":p[`@eslint-react/hooks-extra`],"react-naming-convention":p[`@eslint-react/naming-convention`],"react-rsc":p[`@eslint-react/rsc`],...s?{"react-compiler":d}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:n,languageOptions:{parser:u,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:o,projectService:!0,...a},sourceType:`module`},rules:{...m,...s?{"react-compiler/react-compiler":`error`}:{},"react-extra/no-unnecessary-use-callback":`error`,"react-extra/prefer-use-state-lazy-initialization":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/no-unnecessary-use-ref":`error`,"react-hooks-extra/no-direct-set-state-in-use-effect":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/jsx-shorthand-boolean":`error`,"react-extra/jsx-shorthand-fragment":`error`,"react-extra/prefer-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`,"react-hooks/rules-of-hooks":`error`,"react-hooks/exhaustive-deps":`warn`,...i}}]}function we(){return[{files:[D],name:`2digits:regexp`,plugins:{regexp:S},rules:{...S.configs[`flat/recommended`].rules}}]}function Te(){return[{files:[D],name:`2digits:sonar`,plugins:{sonar:C},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 Ee(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([U(import(`eslint-plugin-storybook`)),U(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook: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`,"storybook/no-renderer-packages":`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 De(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([U(import(`eslint-plugin-tailwindcss`)),U(import(`@2digits/constants`)),o().catch(()=>void 0)]),a=w.file(`tailwind.config.ts`,{last:i})??w.file(`tailwind.config.js`,{last:i});return[{files:[D],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function Oe(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-query`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[D],name:`2digits:tanstack-query`,plugins:{"tanstack-query":n},rules:{...i,...t}}]}async function ke(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-router`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[D],name:`2digits:tanstack-router`,plugins:{"tanstack-router":n},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const Ae=Object.fromEntries(T.configs.standard.flatMap(({rules:e})=>Object.entries({...e})));function je(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:T},rules:{...Ae,"toml/array-bracket-spacing":[`error`,`never`],"toml/indent":[`error`,2,{keyValuePairs:1,subTables:1}]}}]}async function Y(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-turbo`));return[{files:[D],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function Me(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([U(import(`typescript-eslint`)),U(import(`@2digits/eslint-plugin`))]),c=n(a.strictTypeChecked,I),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:[D],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,...t}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],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)`],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Ne(){return[{files:[D],name:`2digits:unicorn`,plugins:{unicorn:E},rules:{...E.configs.recommended.rules,"unicorn/no-array-callback-reference":`off`,"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 Pe(){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:_}};async function Fe(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-zod`));return[{files:[D],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-throw-in-refine":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/require-brand-type-parameter":`error`,"zod/require-schema-suffix":[`warn`,{suffix:`Schema`}],"zod/schema-error-property-style":[`error`,{selector:`Literal,TemplateLiteral`,example:`"This is an error message"`}],...t}}]}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 $(e={},...n){let r;e.pnpm===void 0&&(r=o());let i=new t(de(e.ignores),fe(e.js),F(),be(),z(),pe(),Ne(),Te(),we(),P(),me(),je(),Pe(),he(),le());Z(e.css)&&(i=i.append(V(Q(e.css)))),Z(e.depend,!0)&&(i=i.append(H())),Z(e.turbo,a(`turbo`))&&(i=i.append(Y(Q(e.turbo))));let{overrides:s,...c}=Q(e.ts);return Z(e.ts,a(`typescript`))&&(i=i.append(Me(Q(e.ts)))),Z(e.react,a(`react`))&&(i=i.append(Ce({...Q(e.react),...c}))),Z(e.next,a(`next`))&&(i=i.append(ve({...Q(e.next),...c}))),Z(e.storybook,L.some(e=>a(e)))&&(i=i.append(Ee({...Q(e.storybook),...c}))),Z(e.tailwind,a(`tailwindcss`))&&(i=i.append(De(Q(e.tailwind)))),Z(e.tanstackQuery,a(`react-query`)||a(`@tanstack/react-query`)||a(`@tanstack/react-query-devtools`))&&(i=i.append(Oe(Q(e.tanstackQuery)))),Z(e.tanstackRouter,a(`@tanstack/react-router`))&&(i=i.append(ke(Q(e.tanstackRouter)))),Z(e.drizzle,a(`drizzle-kit`)||a(`drizzle-orm`))&&(i=i.append(W(Q(e.drizzle)))),Z(e.zod,a(`zod`))&&(i=i.append(Fe(Q(e.zod)))),Z(e.graphql,a(`graphql`))&&(i=i.append(ue(Q(e.graphql)))),Z(e.pnpm,!!await r)&&(i=i.append(xe())),i=i.append(...n),a(`prettier`)&&(i=i.append(Se())),i=i.append(ge()),i.renamePlugins(I).toConfigs()}export{$ as default,$ as twoDigits};
1
+ import{i as e}from"./chunk-DM4wYaYk.mjs";import{FlatConfigComposer as t,renamePluginsInConfigs as n,renamePluginsInRules as r}from"eslint-flat-config-utils";import{getPackageInfo as i,isPackageExists as a}from"local-pkg";import{findWorkspaceDir as o}from"pkg-types";import s from"eslint-plugin-antfu";import c from"eslint-plugin-de-morgan";import l from"@eslint-community/eslint-plugin-eslint-comments";import u from"@eslint-community/eslint-plugin-eslint-comments/configs";import d from"@eslint/css";import{tailwind3 as f,tailwind4 as p}from"tailwind-csstree";import m from"eslint-plugin-depend";import{fixupPluginRules as h}from"@eslint/compat";import g from"eslint-plugin-github-action";import*as _ from"yaml-eslint-parser";import v from"eslint-config-flat-gitignore";import ee from"@eslint/js";import te from"@stylistic/eslint-plugin";import y from"globals";import ne from"eslint-plugin-jsdoc";import re,{configs as b}from"eslint-plugin-jsonc";import ie from"jsonc-eslint-parser";import x from"@eslint/markdown";import{mergeProcessors as ae,processorPassThrough as oe}from"eslint-merge-processors";import se from"eslint-plugin-n";import S from"eslint-plugin-regexp";import C from"eslint-plugin-sonarjs";import*as w from"empathic/find";import T from"eslint-plugin-toml";import E from"eslint-plugin-unicorn";import ce from"eslint-plugin-yml";const D=`**/*.?([cm])[jt]s?(x)`,O=`**/*.?([cm])ts`,k=`**/*.?([cm])tsx`,A=`.github/workflows/*.y?(a)ml`,j=`**/*.md`,M=`${j}/${D}`,N=`**/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 P(){return[{files:[D],name:`2digits:antfu`,plugins:{antfu:s},rules:{"antfu/top-level-function":`error`}}]}function F(){return[{files:[D],name:`2digits:boolean`,plugins:{boolean:c},rules:{...c.configs.recommended.rules}}]}const I={"@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/rsc":`react-rsc`,"@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-query`,"@tanstack/router":`tanstack-router`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`,antfu:`antfu`,css:`css`,depend:`depend`,"github-action":`github-action`,jsonc:`jsonc`,markdown:`markdown`,pnpm:`pnpm`,regexp:`regexp`,yml:`yml`,zod:`zod`,toml:`toml`},L=[`storybook`,`@storybook/nextjs`,`@storybook/nextjs-vite`,`@storybook/react-vite`,`@storybook/react-webpack5`,`@storybook/react-native-web-vite`],R=r(u.recommended.rules,I);function z(){return[{files:[D],name:`2digits:comments`,plugins:{comments:l},rules:{...R,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function B(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return f;if(e?.tailwindMajor===4)return p;try{let e=(await i(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]||`0`,10);if(Number.isFinite(t)&&t>=4)return p}catch{}return f}async function V(e={}){let t=await B(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:d},languageOptions:{tolerant:!0,customSyntax:t},rules:{...d.configs.recommended.rules,...e.overrides}}]}function H(){return[{files:[D],name:`2digits:depend`,plugins:{depend:m},rules:{"depend/ban-dependencies":`warn`}}]}async function U(e){let t=await e;return t.default||t}async function W(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await U(import(`eslint-plugin-drizzle`));return[{files:[D],name:`2digits:drizzle`,plugins:{drizzle:h(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const G=Object.fromEntries(g.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function le(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":g}},{name:`2digits:github-actions/recommended`,files:[A],ignores:[`!**/${A}`],languageOptions:{parser:_},rules:{...G}}]}async function ue(e={}){let{overrides:t={},files:n=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([U(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/`,``);t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings)||(s[e]=o[e])}let c=r(s,I);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:n,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function de(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[N,n].flat(),name:`2digits:ignores`},v({strict:!1,...t,name:`2digits:gitignore`})]}function fe(e={}){let{overrides:t={}}=e;return[{files:[D],name:`2digits:javascript`,plugins:{stylistic:te},languageOptions:{ecmaVersion:2022,globals:{...y.browser,...y.es2021,...y.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 pe(){return[{files:[D],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 me(){return[...b[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(b[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(b[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(b[`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$`}]}},...b[`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=[j];function he(){return[{name:`2digits:markdown/setup`,plugins:{markdown:x}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ae([x.processors.markdown,oe])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:_e}},{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`}}]}async function ge(){let e=await U(import(`typescript-eslint`)),t=await U(import(`@eslint-react/eslint-plugin`)),n=r({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},I);return[{name:`2digits:markdown/disables`,files:[M],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...n,"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 _e={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 ve(e={}){let{files:t=[O,k],overrides:n={},parserOptions:i}=e,[a,o]=await Promise.all([U(import(`@next/eslint-plugin-next`)),U(import(`@typescript-eslint/parser`))]),s=r({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},I);return[{name:`2digits:next/setup`,plugins:{next:h(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`,...n}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var ye={node:`24.13.1`};function be(){return[{files:[D],name:`2digits:node`,settings:{node:{version:ye.node}},plugins:{node:se},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 xe(){let e=await U(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`package.json`,`**/package.json`],languageOptions:{parser:await U(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 U(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`,"pnpm/yaml-valid-packages":`error`,"pnpm/yaml-enforce-settings":[`error`,{autofix:!0,settings:{catalogMode:`strict`,savePrefix:``,preferWorkspacePackages:!0,cleanupUnusedCatalogs:!0}}]}}]}async function Se(){let[e,t]=await Promise.all([U(import(`eslint-config-prettier`)),U(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 Ce(t={}){let{files:n=[O,k],overrides:i={},parserOptions:a,tsconfigRootDir:o,reactCompiler:s=!0}=t,[c,l,u,d,f]=await Promise.all([U(import(`@eslint-react/eslint-plugin`)),U(import(`./eslint-plugin-react-hooks-21xKLr_l.mjs`).then(t=>e(t.default,1))),U(import(`@typescript-eslint/parser`)),s?U(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),U(import(`@stylistic/eslint-plugin`))]),p=c.configs.all.plugins,m=r({...c.configs[`disable-conflict-eslint-plugin-react`].rules,...c.configs[`recommended-type-checked`].rules},I);return[{name:`2digits:react/setup`,plugins:{stylistic:f,"react-dom":p[`@eslint-react/dom`],"react-web-api":p[`@eslint-react/web-api`],"react-extra":p[`@eslint-react`],"react-hooks":l,"react-hooks-extra":p[`@eslint-react/hooks-extra`],"react-naming-convention":p[`@eslint-react/naming-convention`],"react-rsc":p[`@eslint-react/rsc`],...s?{"react-compiler":d}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:n,languageOptions:{parser:u,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:o,projectService:!0,...a},sourceType:`module`},rules:{...m,...s?{"react-compiler/react-compiler":`error`}:{},"react-extra/no-unnecessary-use-callback":`error`,"react-extra/prefer-use-state-lazy-initialization":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/no-unnecessary-use-ref":`error`,"react-hooks-extra/no-direct-set-state-in-use-effect":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/jsx-shorthand-boolean":`error`,"react-extra/jsx-shorthand-fragment":`error`,"react-extra/prefer-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`,"react-hooks/rules-of-hooks":`error`,"react-hooks/exhaustive-deps":`warn`,...i}}]}function we(){return[{files:[D],name:`2digits:regexp`,plugins:{regexp:S},rules:{...S.configs[`flat/recommended`].rules}}]}function Te(){return[{files:[D],name:`2digits:sonar`,plugins:{sonar:C},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 Ee(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([U(import(`eslint-plugin-storybook`)),U(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook: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`,"storybook/no-renderer-packages":`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 De(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([U(import(`eslint-plugin-tailwindcss`)),U(import(`@2digits/constants`)),o().catch(()=>void 0)]),a=w.file(`tailwind.config.ts`,{last:i})??w.file(`tailwind.config.js`,{last:i});return[{files:[D],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function Oe(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-query`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[D],name:`2digits:tanstack-query`,plugins:{"tanstack-query":n},rules:{...i,...t}}]}async function ke(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-router`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[D],name:`2digits:tanstack-router`,plugins:{"tanstack-router":n},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const Ae=Object.fromEntries(T.configs.standard.flatMap(({rules:e})=>Object.entries({...e})));function je(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:T},rules:{...Ae,"toml/array-bracket-spacing":[`error`,`never`],"toml/indent":[`error`,2,{keyValuePairs:1,subTables:1}]}}]}async function Y(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-turbo`));return[{files:[D],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function Me(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([U(import(`typescript-eslint`)),U(import(`@2digits/eslint-plugin`))]),c=n(a.strictTypeChecked,I),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:[D],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,...t}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],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)`],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Ne(){return[{files:[D],name:`2digits:unicorn`,plugins:{unicorn:E},rules:{...E.configs.recommended.rules,"unicorn/no-array-callback-reference":`off`,"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 Pe(){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:_}};async function Fe(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-zod`));return[{files:[D],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-throw-in-refine":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/require-brand-type-parameter":`error`,"zod/require-schema-suffix":[`warn`,{suffix:`Schema`}],"zod/schema-error-property-style":[`error`,{selector:`Literal,TemplateLiteral`,example:`"This is an error message"`}],...t}}]}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 $(e={},...n){let r;e.pnpm===void 0&&(r=o());let i=new t(de(e.ignores),fe(e.js),F(),be(),z(),pe(),Ne(),Te(),we(),P(),me(),je(),Pe(),he(),le());Z(e.css)&&(i=i.append(V(Q(e.css)))),Z(e.depend,!0)&&(i=i.append(H())),Z(e.turbo,a(`turbo`))&&(i=i.append(Y(Q(e.turbo))));let{overrides:s,...c}=Q(e.ts);return Z(e.ts,a(`typescript`))&&(i=i.append(Me(Q(e.ts)))),Z(e.react,a(`react`))&&(i=i.append(Ce({...Q(e.react),...c}))),Z(e.next,a(`next`))&&(i=i.append(ve({...Q(e.next),...c}))),Z(e.storybook,L.some(e=>a(e)))&&(i=i.append(Ee({...Q(e.storybook),...c}))),Z(e.tailwind,a(`tailwindcss`))&&(i=i.append(De(Q(e.tailwind)))),Z(e.tanstackQuery,a(`react-query`)||a(`@tanstack/react-query`)||a(`@tanstack/react-query-devtools`))&&(i=i.append(Oe(Q(e.tanstackQuery)))),Z(e.tanstackRouter,a(`@tanstack/react-router`))&&(i=i.append(ke(Q(e.tanstackRouter)))),Z(e.drizzle,a(`drizzle-kit`)||a(`drizzle-orm`))&&(i=i.append(W(Q(e.drizzle)))),Z(e.zod,a(`zod`))&&(i=i.append(Fe(Q(e.zod)))),Z(e.graphql,a(`graphql`))&&(i=i.append(ue(Q(e.graphql)))),Z(e.pnpm,!!await r)&&(i=i.append(xe())),i=i.append(...n),a(`prettier`)&&(i=i.append(Se())),i=i.append(ge()),i.renamePlugins(I).toConfigs()}export{$ as default,$ as twoDigits};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "5.1.7",
3
+ "version": "5.1.8",
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": {
@@ -25,18 +25,18 @@
25
25
  "public": true,
26
26
  "dependencies": {
27
27
  "@eslint-community/eslint-plugin-eslint-comments": "4.6.0",
28
- "@eslint-react/eslint-plugin": "2.12.2",
28
+ "@eslint-react/eslint-plugin": "2.12.4",
29
29
  "@eslint/compat": "2.0.2",
30
30
  "@eslint/css": "0.14.1",
31
31
  "@eslint/js": "9.39.2",
32
32
  "@eslint/markdown": "7.5.1",
33
33
  "@graphql-eslint/eslint-plugin": "4.4.0",
34
34
  "@next/eslint-plugin-next": "16.1.6",
35
- "@stylistic/eslint-plugin": "5.7.1",
35
+ "@stylistic/eslint-plugin": "5.8.0",
36
36
  "@tanstack/eslint-plugin-query": "5.91.4",
37
37
  "@tanstack/eslint-plugin-router": "1.155.0",
38
- "@typescript-eslint/parser": "8.54.0",
39
- "@typescript-eslint/utils": "8.54.0",
38
+ "@typescript-eslint/parser": "8.55.0",
39
+ "@typescript-eslint/utils": "8.55.0",
40
40
  "empathic": "2.0.0",
41
41
  "eslint-config-flat-gitignore": "2.1.0",
42
42
  "eslint-config-prettier": "10.1.8",
@@ -48,17 +48,17 @@
48
48
  "eslint-plugin-drizzle": "0.2.3",
49
49
  "eslint-plugin-github-action": "0.1.0",
50
50
  "eslint-plugin-jsdoc": "62.5.4",
51
- "eslint-plugin-jsonc": "2.21.0",
51
+ "eslint-plugin-jsonc": "2.21.1",
52
52
  "eslint-plugin-n": "17.23.2",
53
53
  "eslint-plugin-pnpm": "1.5.0",
54
54
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
55
55
  "eslint-plugin-regexp": "3.0.0",
56
56
  "eslint-plugin-sonarjs": "3.0.6",
57
- "eslint-plugin-storybook": "10.2.7",
57
+ "eslint-plugin-storybook": "10.2.8",
58
58
  "eslint-plugin-tailwindcss": "3.18.2",
59
59
  "eslint-plugin-toml": "1.0.4",
60
- "eslint-plugin-turbo": "2.8.3",
61
- "eslint-plugin-unicorn": "62.0.0",
60
+ "eslint-plugin-turbo": "2.8.4",
61
+ "eslint-plugin-unicorn": "63.0.0",
62
62
  "eslint-plugin-yml": "3.1.2",
63
63
  "eslint-plugin-zod": "3.1.0",
64
64
  "globals": "17.3.0",
@@ -67,7 +67,7 @@
67
67
  "local-pkg": "1.1.2",
68
68
  "pkg-types": "2.3.0",
69
69
  "tailwind-csstree": "0.1.4",
70
- "typescript-eslint": "8.54.0",
70
+ "typescript-eslint": "8.55.0",
71
71
  "yaml-eslint-parser": "2.0.0",
72
72
  "@2digits/constants": "1.1.16",
73
73
  "@2digits/eslint-plugin": "4.0.4"
@@ -76,7 +76,7 @@
76
76
  "@arethetypeswrong/core": "0.18.2",
77
77
  "@eslint/config-inspector": "1.4.2",
78
78
  "@types/react": "19.2.13",
79
- "@typescript/native-preview": "7.0.0-dev.20260208.1",
79
+ "@typescript/native-preview": "7.0.0-dev.20260210.1",
80
80
  "dedent": "1.7.1",
81
81
  "eslint": "9.39.2",
82
82
  "eslint-plugin-react-hooks": "7.0.1",
@@ -92,7 +92,7 @@
92
92
  "@2digits/tsconfig": "0.8.6"
93
93
  },
94
94
  "engines": {
95
- "node": "24.13.0"
95
+ "node": "24.13.1"
96
96
  },
97
97
  "scripts": {
98
98
  "build": "tsdown --minify --config-loader unconfig",