@lobehub/eslint-config 2.1.2 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2808,725 +2808,730 @@ export interface RuleOptions {
2808
2808
  'simple-import-sort/imports'?: Linter.RuleEntry<SimpleImportSortImports>
2809
2809
  /**
2810
2810
  * Improve regexes by making them shorter, consistent, and safer.
2811
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
2811
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md
2812
2812
  */
2813
2813
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
2814
2814
  /**
2815
2815
  * Enforce a specific parameter name in catch clauses.
2816
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
2816
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md
2817
2817
  */
2818
2818
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
2819
2819
  /**
2820
2820
  * Enforce consistent assertion style with `node:assert`.
2821
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
2821
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md
2822
2822
  */
2823
2823
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
2824
2824
  /**
2825
2825
  * Prefer passing `Date` directly to the constructor when cloning.
2826
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
2826
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md
2827
2827
  */
2828
2828
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
2829
2829
  /**
2830
2830
  * Use destructured variables over properties.
2831
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
2831
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md
2832
2832
  */
2833
2833
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
2834
2834
  /**
2835
2835
  * Prefer consistent types when spreading a ternary in an array literal.
2836
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
2836
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md
2837
2837
  */
2838
2838
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
2839
2839
  /**
2840
2840
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
2841
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
2841
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md
2842
2842
  */
2843
2843
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
2844
2844
  /**
2845
2845
  * Move function definitions to the highest possible scope.
2846
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
2846
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md
2847
2847
  */
2848
2848
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
2849
2849
  /**
2850
2850
  * Enforce correct `Error` subclassing.
2851
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
2851
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md
2852
2852
  */
2853
2853
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
2854
2854
  /**
2855
2855
  * Enforce no spaces between braces.
2856
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
2856
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md
2857
2857
  */
2858
2858
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
2859
2859
  /**
2860
2860
  * Enforce passing a `message` value when creating a built-in error.
2861
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
2861
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md
2862
2862
  */
2863
2863
  'unicorn/error-message'?: Linter.RuleEntry<[]>
2864
2864
  /**
2865
2865
  * Require escape sequences to use uppercase or lowercase values.
2866
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
2866
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md
2867
2867
  */
2868
2868
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
2869
2869
  /**
2870
2870
  * Add expiration conditions to TODO comments.
2871
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
2871
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md
2872
2872
  */
2873
2873
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
2874
2874
  /**
2875
2875
  * Enforce explicitly comparing the `length` or `size` property of a value.
2876
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
2876
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md
2877
2877
  */
2878
2878
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
2879
2879
  /**
2880
2880
  * Enforce a case style for filenames.
2881
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
2881
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md
2882
2882
  */
2883
2883
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
2884
2884
  /**
2885
2885
  * Enforce specific import styles per module.
2886
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
2886
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md
2887
2887
  */
2888
2888
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
2889
+ /**
2890
+ * Prevent usage of variables from outside the scope of isolated functions.
2891
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
2892
+ */
2893
+ 'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>
2889
2894
  /**
2890
2895
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
2891
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
2896
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md
2892
2897
  */
2893
2898
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
2894
2899
  /**
2895
2900
  * Enforce specifying rules to disable in `eslint-disable` comments.
2896
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
2901
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md
2897
2902
  */
2898
2903
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
2899
2904
  /**
2900
2905
  * Disallow recursive access to `this` within getters and setters.
2901
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
2906
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md
2902
2907
  */
2903
2908
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
2904
2909
  /**
2905
2910
  * Disallow anonymous functions and classes as the default export.
2906
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
2911
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md
2907
2912
  */
2908
2913
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
2909
2914
  /**
2910
2915
  * Prevent passing a function reference directly to iterator methods.
2911
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
2916
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md
2912
2917
  */
2913
2918
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
2914
2919
  /**
2915
2920
  * Prefer `for…of` over the `forEach` method.
2916
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
2921
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md
2917
2922
  */
2918
2923
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
2919
2924
  /**
2920
2925
  * Disallow using the `this` argument in array methods.
2921
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
2926
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md
2922
2927
  */
2923
2928
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
2924
2929
  /**
2925
2930
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
2926
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
2931
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
2927
2932
  * @deprecated
2928
2933
  */
2929
2934
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
2930
2935
  /**
2931
2936
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
2932
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
2937
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md
2933
2938
  */
2934
2939
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
2935
2940
  /**
2936
2941
  * Prefer `Array#toReversed()` over `Array#reverse()`.
2937
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
2942
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md
2938
2943
  */
2939
2944
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
2940
2945
  /**
2941
2946
  * Prefer `Array#toSorted()` over `Array#sort()`.
2942
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
2947
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
2943
2948
  */
2944
2949
  'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
2945
2950
  /**
2946
2951
  * Disallow member access from await expression.
2947
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
2952
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md
2948
2953
  */
2949
2954
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
2950
2955
  /**
2951
2956
  * Disallow using `await` in `Promise` method parameters.
2952
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
2957
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md
2953
2958
  */
2954
2959
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
2955
2960
  /**
2956
2961
  * Do not use leading/trailing space between `console.log` parameters.
2957
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
2962
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md
2958
2963
  */
2959
2964
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
2960
2965
  /**
2961
2966
  * Do not use `document.cookie` directly.
2962
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
2967
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md
2963
2968
  */
2964
2969
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
2965
2970
  /**
2966
2971
  * Disallow empty files.
2967
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
2972
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md
2968
2973
  */
2969
2974
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
2970
2975
  /**
2971
2976
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
2972
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
2977
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md
2973
2978
  */
2974
2979
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
2975
2980
  /**
2976
2981
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
2977
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
2982
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md
2978
2983
  */
2979
2984
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
2980
2985
  /**
2981
2986
  * Disallow immediate mutation after variable assignment.
2982
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
2987
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
2983
2988
  */
2984
2989
  'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>
2985
2990
  /**
2986
2991
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
2987
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
2992
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
2988
2993
  * @deprecated
2989
2994
  */
2990
2995
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
2991
2996
  /**
2992
2997
  * Disallow `instanceof` with built-in objects
2993
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
2998
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md
2994
2999
  */
2995
3000
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
2996
3001
  /**
2997
3002
  * Disallow invalid options in `fetch()` and `new Request()`.
2998
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
3003
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md
2999
3004
  */
3000
3005
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
3001
3006
  /**
3002
3007
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
3003
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
3008
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md
3004
3009
  */
3005
3010
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
3006
3011
  /**
3007
3012
  * Disallow identifiers starting with `new` or `class`.
3008
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
3013
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md
3009
3014
  */
3010
3015
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
3011
3016
  /**
3012
3017
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
3013
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
3018
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
3014
3019
  * @deprecated
3015
3020
  */
3016
3021
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
3017
3022
  /**
3018
3023
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
3019
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
3024
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md
3020
3025
  */
3021
3026
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
3022
3027
  /**
3023
3028
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
3024
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
3029
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md
3025
3030
  */
3026
3031
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
3027
3032
  /**
3028
3033
  * Disallow named usage of default import and export.
3029
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
3034
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md
3030
3035
  */
3031
3036
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>
3032
3037
  /**
3033
3038
  * Disallow negated conditions.
3034
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
3039
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md
3035
3040
  */
3036
3041
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
3037
3042
  /**
3038
3043
  * Disallow negated expression in equality check.
3039
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
3044
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md
3040
3045
  */
3041
3046
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
3042
3047
  /**
3043
3048
  * Disallow nested ternary expressions.
3044
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
3049
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md
3045
3050
  */
3046
3051
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
3047
3052
  /**
3048
3053
  * Disallow `new Array()`.
3049
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
3054
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md
3050
3055
  */
3051
3056
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>
3052
3057
  /**
3053
3058
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
3054
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
3059
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md
3055
3060
  */
3056
3061
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
3057
3062
  /**
3058
3063
  * Disallow the use of the `null` literal.
3059
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
3064
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md
3060
3065
  */
3061
3066
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
3062
3067
  /**
3063
3068
  * Disallow the use of objects as default parameters.
3064
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
3069
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md
3065
3070
  */
3066
3071
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
3067
3072
  /**
3068
3073
  * Disallow `process.exit()`.
3069
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
3074
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md
3070
3075
  */
3071
3076
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
3072
3077
  /**
3073
3078
  * Disallow passing single-element arrays to `Promise` methods.
3074
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
3079
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md
3075
3080
  */
3076
3081
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
3077
3082
  /**
3078
3083
  * Disallow classes that only have static members.
3079
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
3084
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md
3080
3085
  */
3081
3086
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
3082
3087
  /**
3083
3088
  * Disallow `then` property.
3084
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
3089
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md
3085
3090
  */
3086
3091
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>
3087
3092
  /**
3088
3093
  * Disallow assigning `this` to a variable.
3089
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
3094
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md
3090
3095
  */
3091
3096
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
3092
3097
  /**
3093
3098
  * Disallow comparing `undefined` using `typeof`.
3094
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
3099
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md
3095
3100
  */
3096
3101
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
3097
3102
  /**
3098
3103
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
3099
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
3104
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md
3100
3105
  */
3101
3106
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
3102
3107
  /**
3103
3108
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
3104
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
3109
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md
3105
3110
  */
3106
3111
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
3107
3112
  /**
3108
3113
  * Disallow awaiting non-promise values.
3109
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
3114
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md
3110
3115
  */
3111
3116
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
3112
3117
  /**
3113
3118
  * Enforce the use of built-in methods instead of unnecessary polyfills.
3114
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
3119
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md
3115
3120
  */
3116
3121
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
3117
3122
  /**
3118
3123
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
3119
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
3124
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md
3120
3125
  */
3121
3126
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
3122
3127
  /**
3123
3128
  * Disallow unreadable array destructuring.
3124
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
3129
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md
3125
3130
  */
3126
3131
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
3127
3132
  /**
3128
3133
  * Disallow unreadable IIFEs.
3129
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
3134
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md
3130
3135
  */
3131
3136
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
3132
3137
  /**
3133
3138
  * Disallow unused object properties.
3134
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
3139
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md
3135
3140
  */
3136
3141
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
3137
3142
  /**
3138
3143
  * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
3139
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
3144
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
3140
3145
  */
3141
3146
  'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>
3142
3147
  /**
3143
3148
  * Disallow unnecessary `Error.captureStackTrace(…)`.
3144
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
3149
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md
3145
3150
  */
3146
3151
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
3147
3152
  /**
3148
3153
  * Disallow useless fallback when spreading in object literals.
3149
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
3154
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md
3150
3155
  */
3151
3156
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
3152
3157
  /**
3153
3158
  * Disallow useless array length check.
3154
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
3159
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md
3155
3160
  */
3156
3161
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
3157
3162
  /**
3158
3163
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
3159
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
3164
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md
3160
3165
  */
3161
3166
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
3162
3167
  /**
3163
3168
  * Disallow unnecessary spread.
3164
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
3169
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md
3165
3170
  */
3166
3171
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
3167
3172
  /**
3168
3173
  * Disallow useless case in switch statements.
3169
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
3174
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md
3170
3175
  */
3171
3176
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
3172
3177
  /**
3173
3178
  * Disallow useless `undefined`.
3174
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
3179
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md
3175
3180
  */
3176
3181
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
3177
3182
  /**
3178
3183
  * Disallow number literals with zero fractions or dangling dots.
3179
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
3184
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md
3180
3185
  */
3181
3186
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
3182
3187
  /**
3183
3188
  * Enforce proper case for numeric literals.
3184
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
3189
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md
3185
3190
  */
3186
3191
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
3187
3192
  /**
3188
3193
  * Enforce the style of numeric separators by correctly grouping digits.
3189
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
3194
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md
3190
3195
  */
3191
3196
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
3192
3197
  /**
3193
3198
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
3194
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
3199
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md
3195
3200
  */
3196
3201
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
3197
3202
  /**
3198
3203
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
3199
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
3204
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md
3200
3205
  */
3201
3206
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
3202
3207
  /**
3203
3208
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
3204
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
3209
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md
3205
3210
  */
3206
3211
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
3207
3212
  /**
3208
3213
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
3209
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
3214
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md
3210
3215
  */
3211
3216
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
3212
3217
  /**
3213
3218
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
3214
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
3219
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md
3215
3220
  */
3216
3221
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
3217
3222
  /**
3218
3223
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
3219
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
3224
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md
3220
3225
  */
3221
3226
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
3222
3227
  /**
3223
3228
  * Prefer `.at()` method for index access and `String#charAt()`.
3224
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
3229
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md
3225
3230
  */
3226
3231
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
3227
3232
  /**
3228
3233
  * Prefer `BigInt` literals over the constructor.
3229
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
3234
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
3230
3235
  */
3231
3236
  'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
3232
3237
  /**
3233
3238
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
3234
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
3239
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md
3235
3240
  */
3236
3241
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
3237
3242
  /**
3238
3243
  * Prefer class field declarations over `this` assignments in constructors.
3239
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
3244
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md
3240
3245
  */
3241
3246
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
3242
3247
  /**
3243
3248
  * Prefer using `Element#classList.toggle()` to toggle class names.
3244
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
3249
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
3245
3250
  */
3246
3251
  'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
3247
3252
  /**
3248
3253
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
3249
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
3254
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md
3250
3255
  */
3251
3256
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
3252
3257
  /**
3253
3258
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
3254
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
3259
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md
3255
3260
  */
3256
3261
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
3257
3262
  /**
3258
3263
  * Prefer default parameters over reassignment.
3259
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
3264
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md
3260
3265
  */
3261
3266
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
3262
3267
  /**
3263
3268
  * Prefer `Node#append()` over `Node#appendChild()`.
3264
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
3269
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md
3265
3270
  */
3266
3271
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
3267
3272
  /**
3268
3273
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
3269
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
3274
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md
3270
3275
  */
3271
3276
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
3272
3277
  /**
3273
3278
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
3274
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
3279
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md
3275
3280
  */
3276
3281
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
3277
3282
  /**
3278
3283
  * Prefer `.textContent` over `.innerText`.
3279
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
3284
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md
3280
3285
  */
3281
3286
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
3282
3287
  /**
3283
3288
  * Prefer `EventTarget` over `EventEmitter`.
3284
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
3289
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md
3285
3290
  */
3286
3291
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
3287
3292
  /**
3288
3293
  * Prefer `export…from` when re-exporting.
3289
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
3294
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md
3290
3295
  */
3291
3296
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
3292
3297
  /**
3293
3298
  * Prefer `globalThis` over `window`, `self`, and `global`.
3294
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
3299
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md
3295
3300
  */
3296
3301
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
3297
3302
  /**
3298
3303
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
3299
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
3304
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md
3300
3305
  */
3301
3306
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
3302
3307
  /**
3303
3308
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
3304
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
3309
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md
3305
3310
  */
3306
3311
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
3307
3312
  /**
3308
3313
  * Prefer reading a JSON file as a buffer.
3309
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
3314
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md
3310
3315
  */
3311
3316
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
3312
3317
  /**
3313
3318
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
3314
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
3319
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md
3315
3320
  */
3316
3321
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
3317
3322
  /**
3318
3323
  * Prefer using a logical operator over a ternary.
3319
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
3324
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md
3320
3325
  */
3321
3326
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
3322
3327
  /**
3323
3328
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
3324
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
3329
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md
3325
3330
  */
3326
3331
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
3327
3332
  /**
3328
3333
  * Enforce the use of `Math.trunc` instead of bitwise operators.
3329
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
3334
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md
3330
3335
  */
3331
3336
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
3332
3337
  /**
3333
3338
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
3334
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
3339
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md
3335
3340
  */
3336
3341
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
3337
3342
  /**
3338
3343
  * Prefer modern `Math` APIs over legacy patterns.
3339
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
3344
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md
3340
3345
  */
3341
3346
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
3342
3347
  /**
3343
3348
  * Prefer JavaScript modules (ESM) over CommonJS.
3344
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
3349
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md
3345
3350
  */
3346
3351
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>
3347
3352
  /**
3348
3353
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
3349
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
3354
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md
3350
3355
  */
3351
3356
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
3352
3357
  /**
3353
3358
  * Prefer negative index over `.length - index` when possible.
3354
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
3359
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md
3355
3360
  */
3356
3361
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
3357
3362
  /**
3358
3363
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
3359
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
3364
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md
3360
3365
  */
3361
3366
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
3362
3367
  /**
3363
3368
  * Prefer `Number` static properties over global ones.
3364
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
3369
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md
3365
3370
  */
3366
3371
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
3367
3372
  /**
3368
3373
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
3369
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
3374
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md
3370
3375
  */
3371
3376
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
3372
3377
  /**
3373
3378
  * Prefer omitting the `catch` binding parameter.
3374
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
3379
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md
3375
3380
  */
3376
3381
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
3377
3382
  /**
3378
3383
  * Prefer borrowing methods from the prototype instead of the instance.
3379
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
3384
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md
3380
3385
  */
3381
3386
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
3382
3387
  /**
3383
3388
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
3384
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
3389
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md
3385
3390
  */
3386
3391
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
3387
3392
  /**
3388
3393
  * Prefer `Reflect.apply()` over `Function#apply()`.
3389
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
3394
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md
3390
3395
  */
3391
3396
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
3392
3397
  /**
3393
3398
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
3394
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
3399
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md
3395
3400
  */
3396
3401
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
3397
3402
  /**
3398
3403
  * Prefer `Response.json()` over `new Response(JSON.stringify())`.
3399
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
3404
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
3400
3405
  */
3401
3406
  'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>
3402
3407
  /**
3403
3408
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
3404
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
3409
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md
3405
3410
  */
3406
3411
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
3407
3412
  /**
3408
3413
  * Prefer using `Set#size` instead of `Array#length`.
3409
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
3414
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md
3410
3415
  */
3411
3416
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
3412
3417
  /**
3413
3418
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
3414
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
3419
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md
3415
3420
  */
3416
3421
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
3417
3422
  /**
3418
3423
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
3419
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
3424
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md
3420
3425
  */
3421
3426
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
3422
3427
  /**
3423
3428
  * Prefer using the `String.raw` tag to avoid escaping `\`.
3424
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
3429
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md
3425
3430
  */
3426
3431
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
3427
3432
  /**
3428
3433
  * Prefer `String#replaceAll()` over regex searches with the global flag.
3429
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
3434
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md
3430
3435
  */
3431
3436
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
3432
3437
  /**
3433
3438
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
3434
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
3439
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md
3435
3440
  */
3436
3441
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
3437
3442
  /**
3438
3443
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
3439
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
3444
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md
3440
3445
  */
3441
3446
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
3442
3447
  /**
3443
3448
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
3444
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
3449
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md
3445
3450
  */
3446
3451
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
3447
3452
  /**
3448
3453
  * Prefer using `structuredClone` to create a deep clone.
3449
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
3454
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md
3450
3455
  */
3451
3456
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
3452
3457
  /**
3453
3458
  * Prefer `switch` over multiple `else-if`.
3454
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
3459
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md
3455
3460
  */
3456
3461
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
3457
3462
  /**
3458
3463
  * Prefer ternary expressions over simple `if-else` statements.
3459
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
3464
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md
3460
3465
  */
3461
3466
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
3462
3467
  /**
3463
3468
  * Prefer top-level await over top-level promises and async function calls.
3464
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
3469
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md
3465
3470
  */
3466
3471
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
3467
3472
  /**
3468
3473
  * Enforce throwing `TypeError` in type checking conditions.
3469
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
3474
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md
3470
3475
  */
3471
3476
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
3472
3477
  /**
3473
3478
  * Prevent abbreviations.
3474
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
3479
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md
3475
3480
  */
3476
3481
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
3477
3482
  /**
3478
3483
  * Enforce consistent relative URL style.
3479
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
3484
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md
3480
3485
  */
3481
3486
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
3482
3487
  /**
3483
3488
  * Enforce using the separator argument with `Array#join()`.
3484
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
3489
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md
3485
3490
  */
3486
3491
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
3487
3492
  /**
3488
3493
  * Require non-empty module attributes for imports and exports
3489
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
3494
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
3490
3495
  */
3491
3496
  'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
3492
3497
  /**
3493
3498
  * Require non-empty specifier list in import and export statements.
3494
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
3499
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md
3495
3500
  */
3496
3501
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
3497
3502
  /**
3498
3503
  * Enforce using the digits argument with `Number#toFixed()`.
3499
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
3504
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md
3500
3505
  */
3501
3506
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
3502
3507
  /**
3503
3508
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
3504
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
3509
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md
3505
3510
  */
3506
3511
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
3507
3512
  /**
3508
3513
  * Enforce better string content.
3509
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
3514
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md
3510
3515
  */
3511
3516
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
3512
3517
  /**
3513
3518
  * Enforce consistent brace style for `case` clauses.
3514
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
3519
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md
3515
3520
  */
3516
3521
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
3517
3522
  /**
3518
3523
  * Fix whitespace-insensitive template indentation.
3519
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
3524
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md
3520
3525
  */
3521
3526
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
3522
3527
  /**
3523
3528
  * Enforce consistent case for text encoding identifiers.
3524
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
3529
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md
3525
3530
  */
3526
3531
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>
3527
3532
  /**
3528
3533
  * Require `new` when creating an error.
3529
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
3534
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md
3530
3535
  */
3531
3536
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
3532
3537
  /**
@@ -9972,6 +9977,15 @@ interface _UnicornImportStyle_ModuleStyles {
9972
9977
  interface _UnicornImportStyle_BooleanObject {
9973
9978
  [k: string]: boolean | undefined
9974
9979
  }
9980
+ // ----- unicorn/isolated-functions -----
9981
+ type UnicornIsolatedFunctions = []|[{
9982
+ overrideGlobals?: {
9983
+ [k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined
9984
+ }
9985
+ functions?: string[]
9986
+ selectors?: string[]
9987
+ comments?: string[]
9988
+ }]
9975
9989
  // ----- unicorn/no-array-reduce -----
9976
9990
  type UnicornNoArrayReduce = []|[{
9977
9991
  allowSimpleOperations?: boolean
package/dist/index.cjs CHANGED
@@ -168,6 +168,12 @@ function javascript() {
168
168
  linterOptions: { reportUnusedDisableDirectives: "error" },
169
169
  rules: {
170
170
  ...__eslint_js.default.configs.recommended.rules,
171
+ "no-useless-rename": "error",
172
+ "object-shorthand": [
173
+ "error",
174
+ "properties",
175
+ { avoidQuotes: true }
176
+ ],
171
177
  "no-console": ["error", { allow: [
172
178
  "warn",
173
179
  "error",
@@ -349,7 +355,7 @@ function typescript(options) {
349
355
  rules: {
350
356
  "@typescript-eslint/consistent-type-imports": ["error", {
351
357
  disallowTypeAnnotations: false,
352
- fixStyle: "inline-type-imports",
358
+ fixStyle: "separate-type-imports",
353
359
  prefer: "type-imports"
354
360
  }],
355
361
  "@typescript-eslint/method-signature-style": ["error", "property"],
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/globs.ts","../src/index.ts"],"sourcesContent":null,"mappings":";;;;UAGiB,OAAA;;AAAjB;AAmFA;AACA;;;;ACvFA;EACa,OAAA,CAAA,EAAA,MAAQ,EAAA;EACR;AACb;AAEA;AACA;EACa,IAAA,CAAA,EAAA,OAA2C;EAE3C;AAMb;AAEA;kBDOkB;;;AEHlB;;EAA4B,KAAU,CAAA,EAAA,OAAA,GAAA,MAAA,GAAA,OAAA,GAAA,MAAA,GAAA,MAAA;EAAY;;AAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KFiEtF,UAAA,GAAa,QAAA,CAAO;KACpB,eAAA,GAAkB,QAAA,CAAO;;cCvFxB,OAAA;cACA,QAAA;cACA,OAAA;cACA,QAAA;ADAI,cCEJ,WDmBK,EAAA,MAAa,EAAA;AA8DnB,cChFC,WDgFY,EAAA,MAAO,EAAA;AACpB,cChFC,QDgFc,EAAA,MAAG,EAAA;cC9EjB;cAMA;cAEA;;;;AAjBb;iBCqBgB,YAAA,WAAsB,yBAA8B,eAAe"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/globs.ts","../src/index.ts"],"sourcesContent":null,"mappings":";;;;UAGiB,OAAA;;AAAjB;AAmFA;AACA;;;;ACvFA;EACa,OAAA,CAAA,EAAA,MAAQ,EAAA;EACR;AACb;AAEA;AACA;EACa,IAAA,CAAA,EAAA,OAA2C;EAE3C;AAMb;AAEA;kBDOkB;;;AEHlB;;EAA4B,KAAU,CAAA,EAAA,OAAA,GAAA,MAAA,GAAA,OAAA,GAAA,MAAA,GAAA,MAAA;EAAY;;AAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KFiEtF,UAAA,GAAa,QAAA,CAAO;KACpB,eAAA,GAAkB,QAAA,CAAO;;cCvFxB,OAAA;cACA,QAAA;cACA,OAAA;cACA,QAAA;ADAI,cCEJ,WDmBK,EAAA,MAAa,EAAA;AA8DnB,cChFC,WDgFY,EAAA,MAAO,EAAM;AAC1B,cChFC,QDgFc,EAAA,MAAG,EAAA;cC9EjB;cAMA;cAEA;;;;AAjBb;iBCqBgB,YAAA,WAAsB,yBAA8B,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/globs.ts","../src/index.ts"],"sourcesContent":null,"mappings":";;;;UAGiB,OAAA;;AAAjB;AAmFA;AACA;;;;ACvFA;EACa,OAAA,CAAA,EAAA,MAAQ,EAAA;EACR;AACb;AAEA;AACA;EACa,IAAA,CAAA,EAAA,OAA2C;EAE3C;AAMb;AAEA;kBDOkB;;;AEHlB;;EAA4B,KAAU,CAAA,EAAA,OAAA,GAAA,MAAA,GAAA,OAAA,GAAA,MAAA,GAAA,MAAA;EAAY;;AAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KFiEtF,UAAA,GAAa,QAAA,CAAO;KACpB,eAAA,GAAkB,QAAA,CAAO;;cCvFxB,OAAA;cACA,QAAA;cACA,OAAA;cACA,QAAA;ADAI,cCEJ,WDmBK,EAAA,MAAa,EAAA;AA8DnB,cChFC,WDgFY,EAAA,MAAO,EAAM;AAC1B,cChFC,QDgFc,EAAA,MAAG,EAAA;cC9EjB;cAMA;cAEA;;;;AAjBb;iBCqBgB,YAAA,WAAsB,yBAA8B,eAAe"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/globs.ts","../src/index.ts"],"sourcesContent":null,"mappings":";;;;UAGiB,OAAA;;AAAjB;AAmFA;AACA;;;;ACvFA;EACa,OAAA,CAAA,EAAA,MAAQ,EAAA;EACR;AACb;AAEA;AACA;EACa,IAAA,CAAA,EAAA,OAA2C;EAE3C;AAMb;AAEA;kBDOkB;;;AEHlB;;EAA4B,KAAU,CAAA,EAAA,OAAA,GAAA,MAAA,GAAA,OAAA,GAAA,MAAA,GAAA,MAAA;EAAY;;AAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KFiEtF,UAAA,GAAa,QAAA,CAAO;KACpB,eAAA,GAAkB,QAAA,CAAO;;cCvFxB,OAAA;cACA,QAAA;cACA,OAAA;cACA,QAAA;ADAI,cCEJ,WDmBK,EAAA,MAAa,EAAA;AA8DnB,cChFC,WDgFY,EAAA,MAAO,EAAA;AACpB,cChFC,QDgFc,EAAA,MAAG,EAAA;cC9EjB;cAMA;cAEA;;;;AAjBb;iBCqBgB,YAAA,WAAsB,yBAA8B,eAAe"}
package/dist/index.js CHANGED
@@ -144,6 +144,12 @@ function javascript() {
144
144
  linterOptions: { reportUnusedDisableDirectives: "error" },
145
145
  rules: {
146
146
  ...js.configs.recommended.rules,
147
+ "no-useless-rename": "error",
148
+ "object-shorthand": [
149
+ "error",
150
+ "properties",
151
+ { avoidQuotes: true }
152
+ ],
147
153
  "no-console": ["error", { allow: [
148
154
  "warn",
149
155
  "error",
@@ -325,7 +331,7 @@ function typescript(options) {
325
331
  rules: {
326
332
  "@typescript-eslint/consistent-type-imports": ["error", {
327
333
  disallowTypeAnnotations: false,
328
- fixStyle: "inline-type-imports",
334
+ fixStyle: "separate-type-imports",
329
335
  prefer: "type-imports"
330
336
  }],
331
337
  "@typescript-eslint/method-signature-style": ["error", "property"],
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["options: Options","userIgnores: string[]","options: Options","options: Options","options: Options","options: Options","options: Options","options: Options","options: Options","options: Options","options: Options","configs: FlatConfigArray"],"sources":["../src/globs.ts","../src/configs/a11y.ts","../src/configs/eslint-comments.ts","../src/configs/ignores.ts","../src/configs/imports.ts","../src/configs/javascript.ts","../src/configs/next.ts","../src/configs/react.ts","../src/configs/react-native.ts","../src/configs/regexp.ts","../src/configs/sorting.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/configs/unused.ts","../src/configs/yml.ts","../src/index.ts"],"sourcesContent":["export const GLOB_JS = '**/*.?([cm])js';\nexport const GLOB_JSX = '**/*.?([cm])jsx';\nexport const GLOB_TS = '**/*.?([cm])ts';\nexport const GLOB_TSX = '**/*.?([cm])tsx';\n\nexport const GLOB_JS_ALL = [GLOB_JS, GLOB_JSX];\nexport const GLOB_TS_ALL = [GLOB_TS, GLOB_TSX];\nexport const GLOB_SRC = [...GLOB_JS_ALL, ...GLOB_TS_ALL];\n\nexport const GLOB_TEST = [\n '**/*.test.{js,jsx,ts,tsx}',\n '**/*.spec.{js,jsx,ts,tsx}',\n '**/__tests__/**/*.{js,jsx,ts,tsx}',\n];\n\nexport const GLOB_YAML = ['**/*.yaml', '**/*.yml'];\n\nexport const GLOB_IGNORES = [\n '**/node_modules/**',\n '**/dist/**',\n '**/build/**',\n '**/.next/**',\n '**/coverage/**',\n '**/.turbo/**',\n '**/out/**',\n '**/*.min.*',\n '**/public/**',\n];\n","import { defineConfig } from 'eslint/config';\nimport jsxA11y from 'eslint-plugin-jsx-a11y';\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function a11y(options: Options) {\n const { a11y: a11yOption, react: reactOption } = options;\n\n if (!a11yOption || !reactOption) return [];\n\n const files = [GLOB_JSX, GLOB_TSX];\n\n return defineConfig([\n {\n files,\n plugins: {\n 'jsx-a11y': jsxA11y,\n },\n rules: {\n ...jsxA11y.flatConfigs.recommended.rules,\n 'jsx-a11y/alt-text': 'warn',\n 'jsx-a11y/anchor-has-content': 'warn',\n 'jsx-a11y/anchor-is-valid': 'warn',\n 'jsx-a11y/click-events-have-key-events': 'warn',\n 'jsx-a11y/no-static-element-interactions': 'warn',\n },\n },\n ]);\n}\n","import eslintComments from '@eslint-community/eslint-plugin-eslint-comments/configs';\nimport { defineConfig } from 'eslint/config';\n\nimport { GLOB_SRC } from '../globs';\n\nexport function eslintCommentsConfig() {\n return defineConfig([\n {\n ...eslintComments.recommended,\n files: GLOB_SRC,\n rules: {\n ...eslintComments.recommended.rules,\n // 允许文件级别的 eslint-disable 没有对应的 eslint-enable\n '@eslint-community/eslint-comments/disable-enable-pair': 'off',\n // 禁止未使用的 eslint-disable 注释(可自动修复)\n '@eslint-community/eslint-comments/no-unused-disable': 'error',\n // 禁止没有规则名的 eslint-disable(必须指定具体规则)\n '@eslint-community/eslint-comments/no-unlimited-disable': 'error',\n // 禁止重复的 eslint-disable\n '@eslint-community/eslint-comments/no-duplicate-disable': 'error',\n // 禁止一个 eslint-enable 同时启用多个 eslint-disable(鼓励合并多行 disable 注释)\n '@eslint-community/eslint-comments/no-aggregating-enable': 'error',\n },\n },\n ]);\n}\n","import { GLOB_IGNORES } from '../globs';\nimport { type FlatConfig } from '../types';\n\nexport function ignores(userIgnores: string[] = []): FlatConfig {\n return {\n ignores: [...GLOB_IGNORES, ...userIgnores],\n };\n}\n","import { defineConfig } from 'eslint/config';\nimport { importX } from 'eslint-plugin-import-x';\nimport simpleImportSort from 'eslint-plugin-simple-import-sort';\n\nimport { GLOB_SRC } from '../globs';\nimport { type Options } from '../types';\n\nexport function imports(options: Options) {\n const { sortImports = true } = options;\n\n const configs = defineConfig([\n {\n files: GLOB_SRC,\n plugins: {\n 'import-x': importX as any,\n },\n settings: {\n 'import-x/resolver': {\n node: true,\n typescript: true,\n },\n },\n rules: {\n 'import-x/first': 'error',\n 'import-x/newline-after-import': 'error',\n 'import-x/no-duplicates': 'error',\n 'import-x/no-mutable-exports': 'error',\n 'import-x/no-self-import': 'error',\n 'import-x/consistent-type-specifier-style': 0,\n },\n },\n ]);\n\n if (sortImports) {\n configs.push({\n files: GLOB_SRC,\n plugins: {\n 'simple-import-sort': simpleImportSort,\n },\n rules: {\n 'simple-import-sort/imports': 'error',\n 'simple-import-sort/exports': 'error',\n 'sort-imports': 'off',\n },\n });\n }\n\n return configs;\n}\n","import js from '@eslint/js';\nimport { defineConfig } from 'eslint/config';\nimport globals from 'globals';\n\nimport { GLOB_SRC, GLOB_TEST } from '../globs';\n\nconst GLOB_SCRIPTS = ['**/scripts/**'];\n\nexport function javascript() {\n return defineConfig([\n {\n ...js.configs.recommended,\n files: GLOB_SRC,\n languageOptions: {\n ecmaVersion: 'latest',\n globals: {\n ...globals.browser,\n ...globals.node,\n ...globals.es2021,\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 'latest',\n sourceType: 'module',\n },\n sourceType: 'module',\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n },\n rules: {\n ...js.configs.recommended.rules,\n // Only disallow console.log, allow console.warn/error/info/etc.\n 'no-console': [\n 'error',\n {\n allow: [\n 'warn',\n 'error',\n 'info',\n\n 'table',\n\n 'group',\n 'groupCollapsed',\n 'groupEnd',\n\n 'assert',\n 'clear',\n ],\n },\n ],\n 'no-empty': 'warn',\n 'no-extra-boolean-cast': 'off',\n 'no-unused-vars': 'off',\n },\n },\n // Allow all console in test and script files\n {\n files: [...GLOB_TEST, ...GLOB_SCRIPTS],\n rules: {\n 'no-console': 'off',\n },\n },\n ]);\n}\n","import nextPlugin from '@next/eslint-plugin-next';\nimport { defineConfig } from 'eslint/config';\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function next(options: Options) {\n const { next: nextOption } = options;\n\n if (!nextOption) return [];\n\n const files = [GLOB_JSX, GLOB_TSX];\n\n return defineConfig([\n {\n files,\n plugins: {\n '@next/next': nextPlugin,\n },\n rules: {\n ...nextPlugin.configs.recommended.rules,\n ...nextPlugin.configs['core-web-vitals'].rules,\n '@next/next/no-img-element': 'off',\n },\n },\n ]);\n}\n","import eslintReact from '@eslint-react/eslint-plugin';\nimport { defineConfig } from 'eslint/config';\nimport reactPlugin from 'eslint-plugin-react';\nimport reactCompiler from 'eslint-plugin-react-compiler';\nimport reactHooksPlugin from 'eslint-plugin-react-hooks';\nimport reactRefresh from 'eslint-plugin-react-refresh';\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function react(options: Options) {\n const { react: reactOption, reactCompiler: reactCompilerOption } = options;\n\n if (!reactOption) return [];\n\n const files = [GLOB_JSX, GLOB_TSX];\n\n const configs = defineConfig([\n {\n files,\n ...eslintReact.configs['recommended-typescript'],\n },\n {\n files,\n plugins: {\n 'react': reactPlugin,\n 'react-hooks': reactHooksPlugin,\n 'react-refresh': reactRefresh,\n },\n rules: {\n ...reactHooksPlugin.configs.recommended.rules,\n\n '@eslint-react/dom/no-dangerously-set-innerhtml': 'off',\n '@eslint-react/no-array-index-key': 'warn',\n '@eslint-react/no-leaked-conditional-rendering': 'off',\n\n 'react/self-closing-comp': 'warn',\n\n 'react-refresh/only-export-components': [\n 'warn',\n {\n allowConstantExport: true,\n allowExportNames:\n reactOption === 'next'\n ? [\n 'dynamic',\n 'dynamicParams',\n 'revalidate',\n 'fetchCache',\n 'runtime',\n 'preferredRegion',\n 'maxDuration',\n 'config',\n 'generateStaticParams',\n 'metadata',\n 'generateMetadata',\n 'viewport',\n 'generateViewport',\n ]\n : reactOption === 'remix'\n ? ['meta', 'links', 'headers', 'loader', 'action']\n : undefined,\n },\n ],\n },\n settings: {\n 'react-x': {\n version: 'detect',\n },\n },\n },\n ]);\n\n if (reactCompilerOption) {\n configs.push({\n files,\n plugins: {\n 'react-compiler': reactCompiler,\n },\n rules: {\n 'react-compiler/react-compiler': 'error',\n },\n });\n }\n\n return configs;\n}\n","import { defineConfig } from 'eslint/config';\nimport reactNativePlugin from 'eslint-plugin-react-native';\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function reactNative(options: Options) {\n const { reactNative: reactNativeOption } = options;\n\n if (!reactNativeOption) return [];\n\n const files = [GLOB_JSX, GLOB_TSX];\n\n return defineConfig([\n {\n files,\n plugins: {\n 'react-native': reactNativePlugin,\n },\n languageOptions: {\n globals: {\n __DEV__: 'readonly',\n },\n },\n rules: {\n 'react-native/no-color-literals': 'warn',\n 'react-native/no-inline-styles': 'warn',\n 'react-native/no-raw-text': 'off',\n 'react-native/no-single-element-style-arrays': 'warn',\n 'react-native/no-unused-styles': 'error',\n 'react-native/split-platform-components': 'warn',\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport regexpPlugin from 'eslint-plugin-regexp';\n\nimport { GLOB_SRC } from '../globs';\nimport { type Options } from '../types';\n\nexport function regexp(options: Options) {\n const { regexp: regexpOption = true } = options;\n\n if (!regexpOption) return [];\n\n return defineConfig([\n {\n files: GLOB_SRC,\n plugins: {\n regexp: regexpPlugin,\n },\n rules: {\n ...regexpPlugin.configs['flat/recommended'].rules,\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport perfectionistPlugin from 'eslint-plugin-perfectionist';\nimport reactPlugin from 'eslint-plugin-react';\n\nimport { GLOB_JSX, GLOB_TS_ALL, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function sorting(options: Options) {\n const { sortKeys = true } = options;\n\n if (!sortKeys) return [];\n\n return defineConfig([\n // TypeScript interface and enum sorting\n {\n files: GLOB_TS_ALL,\n plugins: {\n perfectionist: perfectionistPlugin,\n },\n rules: {\n 'perfectionist/sort-enums': [\n 'error',\n {\n order: 'asc',\n type: 'natural',\n },\n ],\n 'perfectionist/sort-interfaces': [\n 'error',\n {\n order: 'asc',\n type: 'natural',\n },\n ],\n },\n },\n // JSX props sorting\n {\n files: [GLOB_JSX, GLOB_TSX],\n plugins: {\n react: reactPlugin,\n },\n rules: {\n 'react/jsx-sort-props': [\n 'warn',\n {\n callbacksLast: true,\n multiline: 'last',\n shorthandFirst: true,\n },\n ],\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport tseslint from 'typescript-eslint';\n\nimport { GLOB_TS_ALL } from '../globs';\nimport { type Options } from '../types';\n\nexport function typescript(options: Options) {\n const {\n typescript: tsOption,\n typeChecked,\n tsconfigPath,\n parserOptions: userParserOptions,\n } = options;\n\n if (!tsOption) return [];\n\n const isStrict = tsOption === 'strict';\n\n const baseConfigs = isStrict\n ? typeChecked\n ? tseslint.configs.strictTypeChecked\n : tseslint.configs.strict\n : typeChecked\n ? tseslint.configs.recommendedTypeChecked\n : tseslint.configs.recommended;\n\n const configs = defineConfig([\n ...baseConfigs,\n {\n files: GLOB_TS_ALL,\n languageOptions: {\n parser: tseslint.parser,\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n ...(typeChecked && {\n projectService: !tsconfigPath,\n project: tsconfigPath,\n }),\n ...userParserOptions,\n },\n },\n rules: {\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports',\n prefer: 'type-imports',\n },\n ],\n '@typescript-eslint/method-signature-style': ['error', 'property'],\n '@typescript-eslint/no-import-type-side-effects': 'off',\n '@typescript-eslint/no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n\n ...(isStrict\n ? {}\n : {\n '@typescript-eslint/ban-ts-comment': 'off',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-empty-object-type': 'off',\n '@typescript-eslint/no-require-imports': 'off',\n }),\n\n '@typescript-eslint/no-unused-vars': 'off',\n '@typescript-eslint/no-use-before-define': 'off',\n '@typescript-eslint/no-useless-constructor': 'off',\n },\n },\n ]);\n\n if (typeChecked) {\n configs.push({\n files: GLOB_TS_ALL,\n rules: {\n '@typescript-eslint/await-thenable': 'error',\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],\n '@typescript-eslint/require-await': 'error',\n },\n });\n }\n\n return configs;\n}\n","import { defineConfig } from 'eslint/config';\nimport unicornPlugin from 'eslint-plugin-unicorn';\n\nimport { GLOB_SRC } from '../globs';\n\nconst GLOB_NEXT_APP_FILES = [\n '**/app/**/page.{js,jsx,ts,tsx}',\n '**/app/**/layout.{js,jsx,ts,tsx}',\n '**/app/**/loading.{js,jsx,ts,tsx}',\n '**/app/**/error.{js,jsx,ts,tsx}',\n '**/app/**/not-found.{js,jsx,ts,tsx}',\n '**/app/**/template.{js,jsx,ts,tsx}',\n '**/app/**/default.{js,jsx,ts,tsx}',\n '**/app/**/route.{js,ts}',\n '**/app/**/opengraph-image.{js,jsx,ts,tsx}',\n '**/app/**/twitter-image.{js,jsx,ts,tsx}',\n '**/app/**/apple-icon.{js,jsx,ts,tsx}',\n '**/app/**/icon.{js,jsx,ts,tsx}',\n '**/app/**/sitemap.{js,ts}',\n '**/app/**/robots.{js,ts}',\n '**/app/**/manifest.{js,ts}',\n];\n\nconst GLOB_CONFIG_FILES = ['**/*.config.{js,mjs,ts,mts,cjs,cts}'];\n\nexport function unicorn() {\n return defineConfig([\n {\n files: GLOB_SRC,\n plugins: {\n unicorn: unicornPlugin,\n },\n rules: {\n // ===== Error Prevention / Bug Detection =====\n 'unicorn/better-regex': 'warn',\n 'unicorn/error-message': 'error',\n 'unicorn/new-for-builtins': 'error',\n 'unicorn/no-abusive-eslint-disable': 'error',\n 'unicorn/no-accessor-recursion': 'error',\n 'unicorn/no-await-in-promise-methods': 'error',\n 'unicorn/no-immediate-mutation': 'error',\n 'unicorn/no-instanceof-builtins': 'error',\n 'unicorn/no-invalid-fetch-options': 'error',\n 'unicorn/no-invalid-remove-event-listener': 'error',\n 'unicorn/no-negation-in-equality-check': 'error',\n 'unicorn/no-single-promise-in-promise-methods': 'error',\n 'unicorn/no-thenable': 'error',\n 'unicorn/throw-new-error': 'error',\n\n // ===== Code Cleanliness =====\n 'unicorn/escape-case': 'warn',\n 'unicorn/no-anonymous-default-export': 'error',\n 'unicorn/no-console-spaces': 'warn',\n 'unicorn/no-empty-file': 'warn',\n 'unicorn/no-lonely-if': 'warn',\n 'unicorn/no-new-array': 'error',\n 'unicorn/no-new-buffer': 'error',\n 'unicorn/no-unnecessary-await': 'error',\n 'unicorn/no-unreadable-iife': 'warn',\n 'unicorn/no-useless-fallback-in-spread': 'warn',\n 'unicorn/no-useless-length-check': 'warn',\n 'unicorn/no-useless-promise-resolve-reject': 'warn',\n 'unicorn/no-useless-spread': 'warn',\n 'unicorn/no-useless-switch-case': 'warn',\n 'unicorn/no-zero-fractions': 'warn',\n 'unicorn/number-literal-case': 'warn',\n 'unicorn/switch-case-braces': 'warn',\n 'unicorn/text-encoding-identifier-case': 'warn',\n 'unicorn/import-style': 'warn',\n\n // ===== Modern APIs =====\n 'unicorn/prefer-array-find': 'warn',\n 'unicorn/prefer-array-flat': 'warn',\n 'unicorn/prefer-array-flat-map': 'warn',\n 'unicorn/prefer-array-index-of': 'warn',\n 'unicorn/prefer-array-some': 'warn',\n 'unicorn/prefer-at': 'warn',\n 'unicorn/prefer-date-now': 'warn',\n 'unicorn/prefer-includes': 'warn',\n 'unicorn/prefer-logical-operator-over-ternary': 'warn',\n 'unicorn/prefer-node-protocol': 'warn',\n 'unicorn/prefer-object-from-entries': 'warn',\n 'unicorn/prefer-regexp-test': 'warn',\n 'unicorn/prefer-string-replace-all': 'warn',\n 'unicorn/prefer-string-slice': 'warn',\n 'unicorn/prefer-string-starts-ends-with': 'warn',\n 'unicorn/prefer-structured-clone': 'warn',\n\n // Styles\n 'unicorn/catch-error-name': 0,\n 'unicorn/explicit-length-check': 0,\n 'unicorn/no-array-callback-reference': 0,\n 'unicorn/require-module-specifiers': 0,\n 'unicorn/no-array-for-each': 0,\n 'unicorn/no-negated-condition': 0,\n 'unicorn/no-null': 0,\n 'unicorn/no-typeof-undefined': 0,\n 'unicorn/no-useless-undefined': 0,\n 'unicorn/prefer-code-point': 0,\n 'unicorn/prefer-number-properties': 0,\n 'unicorn/prefer-query-selector': 0,\n 'unicorn/prefer-spread': 0,\n 'unicorn/prefer-ternary': 0,\n 'unicorn/prefer-type-error': 0,\n },\n },\n {\n files: GLOB_NEXT_APP_FILES,\n rules: {\n 'unicorn/no-anonymous-default-export': 'off',\n },\n },\n {\n files: GLOB_CONFIG_FILES,\n rules: {\n 'unicorn/no-anonymous-default-export': 'off',\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport unusedImportsPlugin from 'eslint-plugin-unused-imports';\n\nimport { GLOB_SRC } from '../globs';\n\nexport function unused() {\n return defineConfig([\n {\n files: GLOB_SRC,\n plugins: {\n 'unused-imports': unusedImportsPlugin,\n },\n rules: {\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'warn',\n {\n args: 'after-used',\n argsIgnorePattern: '^_',\n vars: 'all',\n varsIgnorePattern: '^_',\n },\n ],\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport eslintPluginYml from 'eslint-plugin-yml';\n\nimport { type Options } from '../types';\n\nexport function yml(options: Options) {\n const { yml: ymlOption = true } = options;\n\n if (!ymlOption) return [];\n\n return defineConfig([\n ...eslintPluginYml.configs.recommended,\n {\n rules: {\n 'yml/quotes': [\n 'error',\n {\n avoidEscape: true,\n prefer: 'single',\n },\n ],\n },\n },\n ]);\n}\n","// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"./eslint-typegen.d.ts\" />\n\nimport { a11y } from './configs/a11y';\nimport { eslintCommentsConfig } from './configs/eslint-comments';\nimport { ignores } from './configs/ignores';\nimport { imports } from './configs/imports';\nimport { javascript } from './configs/javascript';\nimport { next } from './configs/next';\nimport { react } from './configs/react';\nimport { reactNative } from './configs/react-native';\nimport { regexp } from './configs/regexp';\nimport { sorting } from './configs/sorting';\nimport { typescript } from './configs/typescript';\nimport { unicorn } from './configs/unicorn';\nimport { unused } from './configs/unused';\nimport { yml } from './configs/yml';\nimport { type FlatConfig, type FlatConfigArray, type Options } from './types';\n\nexport type { FlatConfig, FlatConfigArray, Linter, Options, ParserOptions } from './types';\n\nexport function defineConfig(options: Options = {}, ...userConfigs: FlatConfig[]): FlatConfigArray {\n const {\n a11y: a11yOption = false,\n ignores: userIgnores = [],\n next: nextOption = false,\n react: reactOption = false,\n reactNative: reactNativeOption = false,\n regexp: regexpOption = true,\n sortImports = true,\n sortKeys = true,\n typeChecked = false,\n typescript: tsOption = true,\n yml: ymlOption = true,\n } = options;\n\n const configs: FlatConfigArray = [\n ignores(userIgnores),\n ...javascript(),\n ...typescript({ ...options, typeChecked, typescript: tsOption }),\n ...react({ ...options, react: reactOption }),\n ...reactNative({ ...options, reactNative: reactNativeOption }),\n ...next({ ...options, next: nextOption }),\n ...a11y({ ...options, a11y: a11yOption, react: reactOption }),\n ...imports({ ...options, sortImports }),\n ...unicorn(),\n ...sorting({ ...options, sortKeys }),\n ...regexp({ ...options, regexp: regexpOption }),\n ...unused(),\n ...yml({ ...options, yml: ymlOption }),\n ...eslintCommentsConfig(),\n // 用户自定义配置(最高优先级)\n ...userConfigs,\n ];\n\n return configs;\n}\n\nexport * from './globs';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;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A2B;EAC/B,QAAQ,YAAY;EACpB,GAAG,YAAY;EACf,GAAG,WAAW;GAAE,GAAG;GAAS;GAAa,YAAY;EAAU,EAAC;EAChE,GAAG,MAAM;GAAE,GAAG;GAAS,OAAO;EAAa,EAAC;EAC5C,GAAG,YAAY;GAAE,GAAG;GAAS,aAAa;EAAmB,EAAC;EAC9D,GAAG,KAAK;GAAE,GAAG;GAAS,MAAM;EAAY,EAAC;EACzC,GAAG,KAAK;GAAE,GAAG;GAAS,MAAM;GAAY,OAAO;EAAa,EAAC;EAC7D,GAAG,QAAQ;GAAE,GAAG;GAAS;EAAa,EAAC;EACvC,GAAG,SAAS;EACZ,GAAG,QAAQ;GAAE,GAAG;GAAS;EAAU,EAAC;EACpC,GAAG,OAAO;GAAE,GAAG;GAAS,QAAQ;EAAc,EAAC;EAC/C,GAAG,QAAQ;EACX,GAAG,IAAI;GAAE,GAAG;GAAS,KAAK;EAAW,EAAC;EACtC,GAAG,sBAAsB;EAEzB,GAAG;CACJ;AAED,QAAO;AACR"}
1
+ {"version":3,"file":"index.js","names":["options: Options","userIgnores: string[]","options: Options","options: Options","options: Options","options: Options","options: Options","options: Options","options: Options","options: Options","options: Options","configs: FlatConfigArray"],"sources":["../src/globs.ts","../src/configs/a11y.ts","../src/configs/eslint-comments.ts","../src/configs/ignores.ts","../src/configs/imports.ts","../src/configs/javascript.ts","../src/configs/next.ts","../src/configs/react.ts","../src/configs/react-native.ts","../src/configs/regexp.ts","../src/configs/sorting.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/configs/unused.ts","../src/configs/yml.ts","../src/index.ts"],"sourcesContent":["export const GLOB_JS = '**/*.?([cm])js';\nexport const GLOB_JSX = '**/*.?([cm])jsx';\nexport const GLOB_TS = '**/*.?([cm])ts';\nexport const GLOB_TSX = '**/*.?([cm])tsx';\n\nexport const GLOB_JS_ALL = [GLOB_JS, GLOB_JSX];\nexport const GLOB_TS_ALL = [GLOB_TS, GLOB_TSX];\nexport const GLOB_SRC = [...GLOB_JS_ALL, ...GLOB_TS_ALL];\n\nexport const GLOB_TEST = [\n '**/*.test.{js,jsx,ts,tsx}',\n '**/*.spec.{js,jsx,ts,tsx}',\n '**/__tests__/**/*.{js,jsx,ts,tsx}',\n];\n\nexport const GLOB_YAML = ['**/*.yaml', '**/*.yml'];\n\nexport const GLOB_IGNORES = [\n '**/node_modules/**',\n '**/dist/**',\n '**/build/**',\n '**/.next/**',\n '**/coverage/**',\n '**/.turbo/**',\n '**/out/**',\n '**/*.min.*',\n '**/public/**',\n];\n","import { defineConfig } from 'eslint/config';\nimport jsxA11y from 'eslint-plugin-jsx-a11y';\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function a11y(options: Options) {\n const { a11y: a11yOption, react: reactOption } = options;\n\n if (!a11yOption || !reactOption) return [];\n\n const files = [GLOB_JSX, GLOB_TSX];\n\n return defineConfig([\n {\n files,\n plugins: {\n 'jsx-a11y': jsxA11y,\n },\n rules: {\n ...jsxA11y.flatConfigs.recommended.rules,\n 'jsx-a11y/alt-text': 'warn',\n 'jsx-a11y/anchor-has-content': 'warn',\n 'jsx-a11y/anchor-is-valid': 'warn',\n 'jsx-a11y/click-events-have-key-events': 'warn',\n 'jsx-a11y/no-static-element-interactions': 'warn',\n },\n },\n ]);\n}\n","import eslintComments from '@eslint-community/eslint-plugin-eslint-comments/configs';\nimport { defineConfig } from 'eslint/config';\n\nimport { GLOB_SRC } from '../globs';\n\nexport function eslintCommentsConfig() {\n return defineConfig([\n {\n ...eslintComments.recommended,\n files: GLOB_SRC,\n rules: {\n ...eslintComments.recommended.rules,\n // 允许文件级别的 eslint-disable 没有对应的 eslint-enable\n '@eslint-community/eslint-comments/disable-enable-pair': 'off',\n // 禁止未使用的 eslint-disable 注释(可自动修复)\n '@eslint-community/eslint-comments/no-unused-disable': 'error',\n // 禁止没有规则名的 eslint-disable(必须指定具体规则)\n '@eslint-community/eslint-comments/no-unlimited-disable': 'error',\n // 禁止重复的 eslint-disable\n '@eslint-community/eslint-comments/no-duplicate-disable': 'error',\n // 禁止一个 eslint-enable 同时启用多个 eslint-disable(鼓励合并多行 disable 注释)\n '@eslint-community/eslint-comments/no-aggregating-enable': 'error',\n },\n },\n ]);\n}\n","import { GLOB_IGNORES } from '../globs';\nimport { type FlatConfig } from '../types';\n\nexport function ignores(userIgnores: string[] = []): FlatConfig {\n return {\n ignores: [...GLOB_IGNORES, ...userIgnores],\n };\n}\n","import { defineConfig } from 'eslint/config';\nimport { importX } from 'eslint-plugin-import-x';\nimport simpleImportSort from 'eslint-plugin-simple-import-sort';\n\nimport { GLOB_SRC } from '../globs';\nimport { type Options } from '../types';\n\nexport function imports(options: Options) {\n const { sortImports = true } = options;\n\n const configs = defineConfig([\n {\n files: GLOB_SRC,\n plugins: {\n 'import-x': importX as any,\n },\n settings: {\n 'import-x/resolver': {\n node: true,\n typescript: true,\n },\n },\n rules: {\n 'import-x/first': 'error',\n 'import-x/newline-after-import': 'error',\n 'import-x/no-duplicates': 'error',\n 'import-x/no-mutable-exports': 'error',\n 'import-x/no-self-import': 'error',\n 'import-x/consistent-type-specifier-style': 0,\n },\n },\n ]);\n\n if (sortImports) {\n configs.push({\n files: GLOB_SRC,\n plugins: {\n 'simple-import-sort': simpleImportSort,\n },\n rules: {\n 'simple-import-sort/imports': 'error',\n 'simple-import-sort/exports': 'error',\n 'sort-imports': 'off',\n },\n });\n }\n\n return configs;\n}\n","import js from '@eslint/js';\nimport { defineConfig } from 'eslint/config';\nimport globals from 'globals';\n\nimport { GLOB_SRC, GLOB_TEST } from '../globs';\n\nconst GLOB_SCRIPTS = ['**/scripts/**'];\n\nexport function javascript() {\n return defineConfig([\n {\n ...js.configs.recommended,\n files: GLOB_SRC,\n languageOptions: {\n ecmaVersion: 'latest',\n globals: {\n ...globals.browser,\n ...globals.node,\n ...globals.es2021,\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 'latest',\n sourceType: 'module',\n },\n sourceType: 'module',\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n },\n rules: {\n ...js.configs.recommended.rules,\n 'no-useless-rename': 'error',\n 'object-shorthand': ['error', 'properties', { avoidQuotes: true }],\n // Only disallow console.log, allow console.warn/error/info/etc.\n 'no-console': [\n 'error',\n {\n allow: [\n 'warn',\n 'error',\n 'info',\n\n 'table',\n\n 'group',\n 'groupCollapsed',\n 'groupEnd',\n\n 'assert',\n 'clear',\n ],\n },\n ],\n 'no-empty': 'warn',\n 'no-extra-boolean-cast': 'off',\n 'no-unused-vars': 'off',\n },\n },\n // Allow all console in test and script files\n {\n files: [...GLOB_TEST, ...GLOB_SCRIPTS],\n rules: {\n 'no-console': 'off',\n },\n },\n ]);\n}\n","import nextPlugin from '@next/eslint-plugin-next';\nimport { defineConfig } from 'eslint/config';\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function next(options: Options) {\n const { next: nextOption } = options;\n\n if (!nextOption) return [];\n\n const files = [GLOB_JSX, GLOB_TSX];\n\n return defineConfig([\n {\n files,\n plugins: {\n '@next/next': nextPlugin as any,\n },\n rules: {\n ...nextPlugin.configs.recommended.rules,\n ...nextPlugin.configs['core-web-vitals'].rules,\n '@next/next/no-img-element': 'off',\n },\n },\n ]);\n}\n","import eslintReact from '@eslint-react/eslint-plugin';\nimport { defineConfig } from 'eslint/config';\nimport reactPlugin from 'eslint-plugin-react';\nimport reactCompiler from 'eslint-plugin-react-compiler';\nimport reactHooksPlugin from 'eslint-plugin-react-hooks';\nimport reactRefresh from 'eslint-plugin-react-refresh';\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function react(options: Options) {\n const { react: reactOption, reactCompiler: reactCompilerOption } = options;\n\n if (!reactOption) return [];\n\n const files = [GLOB_JSX, GLOB_TSX];\n\n const configs = defineConfig([\n {\n files,\n ...eslintReact.configs['recommended-typescript'],\n },\n {\n files,\n plugins: {\n 'react': reactPlugin,\n 'react-hooks': reactHooksPlugin,\n 'react-refresh': reactRefresh,\n },\n rules: {\n ...reactHooksPlugin.configs.recommended.rules,\n\n '@eslint-react/dom/no-dangerously-set-innerhtml': 'off',\n '@eslint-react/no-array-index-key': 'warn',\n '@eslint-react/no-leaked-conditional-rendering': 'off',\n\n 'react/self-closing-comp': 'warn',\n\n 'react-refresh/only-export-components': [\n 'warn',\n {\n allowConstantExport: true,\n allowExportNames:\n reactOption === 'next'\n ? [\n 'dynamic',\n 'dynamicParams',\n 'revalidate',\n 'fetchCache',\n 'runtime',\n 'preferredRegion',\n 'maxDuration',\n 'config',\n 'generateStaticParams',\n 'metadata',\n 'generateMetadata',\n 'viewport',\n 'generateViewport',\n ]\n : reactOption === 'remix'\n ? ['meta', 'links', 'headers', 'loader', 'action']\n : undefined,\n },\n ],\n },\n settings: {\n 'react-x': {\n version: 'detect',\n },\n },\n },\n ]);\n\n if (reactCompilerOption) {\n configs.push({\n files,\n plugins: {\n 'react-compiler': reactCompiler,\n },\n rules: {\n 'react-compiler/react-compiler': 'error',\n },\n });\n }\n\n return configs;\n}\n","import { defineConfig } from 'eslint/config';\nimport reactNativePlugin from 'eslint-plugin-react-native';\n\nimport { GLOB_JSX, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function reactNative(options: Options) {\n const { reactNative: reactNativeOption } = options;\n\n if (!reactNativeOption) return [];\n\n const files = [GLOB_JSX, GLOB_TSX];\n\n return defineConfig([\n {\n files,\n plugins: {\n 'react-native': reactNativePlugin,\n },\n languageOptions: {\n globals: {\n __DEV__: 'readonly',\n },\n },\n rules: {\n 'react-native/no-color-literals': 'warn',\n 'react-native/no-inline-styles': 'warn',\n 'react-native/no-raw-text': 'off',\n 'react-native/no-single-element-style-arrays': 'warn',\n 'react-native/no-unused-styles': 'error',\n 'react-native/split-platform-components': 'warn',\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport regexpPlugin from 'eslint-plugin-regexp';\n\nimport { GLOB_SRC } from '../globs';\nimport { type Options } from '../types';\n\nexport function regexp(options: Options) {\n const { regexp: regexpOption = true } = options;\n\n if (!regexpOption) return [];\n\n return defineConfig([\n {\n files: GLOB_SRC,\n plugins: {\n regexp: regexpPlugin,\n },\n rules: {\n ...regexpPlugin.configs['flat/recommended'].rules,\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport perfectionistPlugin from 'eslint-plugin-perfectionist';\nimport reactPlugin from 'eslint-plugin-react';\n\nimport { GLOB_JSX, GLOB_TS_ALL, GLOB_TSX } from '../globs';\nimport { type Options } from '../types';\n\nexport function sorting(options: Options) {\n const { sortKeys = true } = options;\n\n if (!sortKeys) return [];\n\n return defineConfig([\n // TypeScript interface and enum sorting\n {\n files: GLOB_TS_ALL,\n plugins: {\n perfectionist: perfectionistPlugin,\n },\n rules: {\n 'perfectionist/sort-enums': [\n 'error',\n {\n order: 'asc',\n type: 'natural',\n },\n ],\n 'perfectionist/sort-interfaces': [\n 'error',\n {\n order: 'asc',\n type: 'natural',\n },\n ],\n },\n },\n // JSX props sorting\n {\n files: [GLOB_JSX, GLOB_TSX],\n plugins: {\n react: reactPlugin,\n },\n rules: {\n 'react/jsx-sort-props': [\n 'warn',\n {\n callbacksLast: true,\n multiline: 'last',\n shorthandFirst: true,\n },\n ],\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport tseslint from 'typescript-eslint';\n\nimport { GLOB_TS_ALL } from '../globs';\nimport { type Options } from '../types';\n\nexport function typescript(options: Options) {\n const {\n typescript: tsOption,\n typeChecked,\n tsconfigPath,\n parserOptions: userParserOptions,\n } = options;\n\n if (!tsOption) return [];\n\n const isStrict = tsOption === 'strict';\n\n const baseConfigs = isStrict\n ? typeChecked\n ? tseslint.configs.strictTypeChecked\n : tseslint.configs.strict\n : typeChecked\n ? tseslint.configs.recommendedTypeChecked\n : tseslint.configs.recommended;\n\n const configs = defineConfig([\n ...baseConfigs,\n {\n files: GLOB_TS_ALL,\n languageOptions: {\n parser: tseslint.parser,\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n ...(typeChecked && {\n projectService: !tsconfigPath,\n project: tsconfigPath,\n }),\n ...userParserOptions,\n },\n },\n rules: {\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {\n disallowTypeAnnotations: false,\n fixStyle: 'separate-type-imports',\n prefer: 'type-imports',\n },\n ],\n '@typescript-eslint/method-signature-style': ['error', 'property'],\n '@typescript-eslint/no-import-type-side-effects': 'off',\n '@typescript-eslint/no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n\n ...(isStrict\n ? {}\n : {\n '@typescript-eslint/ban-ts-comment': 'off',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-empty-object-type': 'off',\n '@typescript-eslint/no-require-imports': 'off',\n }),\n\n '@typescript-eslint/no-unused-vars': 'off',\n '@typescript-eslint/no-use-before-define': 'off',\n '@typescript-eslint/no-useless-constructor': 'off',\n },\n },\n ]);\n\n if (typeChecked) {\n configs.push({\n files: GLOB_TS_ALL,\n rules: {\n '@typescript-eslint/await-thenable': 'error',\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],\n '@typescript-eslint/require-await': 'error',\n },\n });\n }\n\n return configs;\n}\n","import { defineConfig } from 'eslint/config';\nimport unicornPlugin from 'eslint-plugin-unicorn';\n\nimport { GLOB_SRC } from '../globs';\n\nconst GLOB_NEXT_APP_FILES = [\n '**/app/**/page.{js,jsx,ts,tsx}',\n '**/app/**/layout.{js,jsx,ts,tsx}',\n '**/app/**/loading.{js,jsx,ts,tsx}',\n '**/app/**/error.{js,jsx,ts,tsx}',\n '**/app/**/not-found.{js,jsx,ts,tsx}',\n '**/app/**/template.{js,jsx,ts,tsx}',\n '**/app/**/default.{js,jsx,ts,tsx}',\n '**/app/**/route.{js,ts}',\n '**/app/**/opengraph-image.{js,jsx,ts,tsx}',\n '**/app/**/twitter-image.{js,jsx,ts,tsx}',\n '**/app/**/apple-icon.{js,jsx,ts,tsx}',\n '**/app/**/icon.{js,jsx,ts,tsx}',\n '**/app/**/sitemap.{js,ts}',\n '**/app/**/robots.{js,ts}',\n '**/app/**/manifest.{js,ts}',\n];\n\nconst GLOB_CONFIG_FILES = ['**/*.config.{js,mjs,ts,mts,cjs,cts}'];\n\nexport function unicorn() {\n return defineConfig([\n {\n files: GLOB_SRC,\n plugins: {\n unicorn: unicornPlugin,\n },\n rules: {\n // ===== Error Prevention / Bug Detection =====\n 'unicorn/better-regex': 'warn',\n 'unicorn/error-message': 'error',\n 'unicorn/new-for-builtins': 'error',\n 'unicorn/no-abusive-eslint-disable': 'error',\n 'unicorn/no-accessor-recursion': 'error',\n 'unicorn/no-await-in-promise-methods': 'error',\n 'unicorn/no-immediate-mutation': 'error',\n 'unicorn/no-instanceof-builtins': 'error',\n 'unicorn/no-invalid-fetch-options': 'error',\n 'unicorn/no-invalid-remove-event-listener': 'error',\n 'unicorn/no-negation-in-equality-check': 'error',\n 'unicorn/no-single-promise-in-promise-methods': 'error',\n 'unicorn/no-thenable': 'error',\n 'unicorn/throw-new-error': 'error',\n\n // ===== Code Cleanliness =====\n 'unicorn/escape-case': 'warn',\n 'unicorn/no-anonymous-default-export': 'error',\n 'unicorn/no-console-spaces': 'warn',\n 'unicorn/no-empty-file': 'warn',\n 'unicorn/no-lonely-if': 'warn',\n 'unicorn/no-new-array': 'error',\n 'unicorn/no-new-buffer': 'error',\n 'unicorn/no-unnecessary-await': 'error',\n 'unicorn/no-unreadable-iife': 'warn',\n 'unicorn/no-useless-fallback-in-spread': 'warn',\n 'unicorn/no-useless-length-check': 'warn',\n 'unicorn/no-useless-promise-resolve-reject': 'warn',\n 'unicorn/no-useless-spread': 'warn',\n 'unicorn/no-useless-switch-case': 'warn',\n 'unicorn/no-zero-fractions': 'warn',\n 'unicorn/number-literal-case': 'warn',\n 'unicorn/switch-case-braces': 'warn',\n 'unicorn/text-encoding-identifier-case': 'warn',\n 'unicorn/import-style': 'warn',\n\n // ===== Modern APIs =====\n 'unicorn/prefer-array-find': 'warn',\n 'unicorn/prefer-array-flat': 'warn',\n 'unicorn/prefer-array-flat-map': 'warn',\n 'unicorn/prefer-array-index-of': 'warn',\n 'unicorn/prefer-array-some': 'warn',\n 'unicorn/prefer-at': 'warn',\n 'unicorn/prefer-date-now': 'warn',\n 'unicorn/prefer-includes': 'warn',\n 'unicorn/prefer-logical-operator-over-ternary': 'warn',\n 'unicorn/prefer-node-protocol': 'warn',\n 'unicorn/prefer-object-from-entries': 'warn',\n 'unicorn/prefer-regexp-test': 'warn',\n 'unicorn/prefer-string-replace-all': 'warn',\n 'unicorn/prefer-string-slice': 'warn',\n 'unicorn/prefer-string-starts-ends-with': 'warn',\n 'unicorn/prefer-structured-clone': 'warn',\n\n // Styles\n 'unicorn/catch-error-name': 0,\n 'unicorn/explicit-length-check': 0,\n 'unicorn/no-array-callback-reference': 0,\n 'unicorn/require-module-specifiers': 0,\n 'unicorn/no-array-for-each': 0,\n 'unicorn/no-negated-condition': 0,\n 'unicorn/no-null': 0,\n 'unicorn/no-typeof-undefined': 0,\n 'unicorn/no-useless-undefined': 0,\n 'unicorn/prefer-code-point': 0,\n 'unicorn/prefer-number-properties': 0,\n 'unicorn/prefer-query-selector': 0,\n 'unicorn/prefer-spread': 0,\n 'unicorn/prefer-ternary': 0,\n 'unicorn/prefer-type-error': 0,\n },\n },\n {\n files: GLOB_NEXT_APP_FILES,\n rules: {\n 'unicorn/no-anonymous-default-export': 'off',\n },\n },\n {\n files: GLOB_CONFIG_FILES,\n rules: {\n 'unicorn/no-anonymous-default-export': 'off',\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport unusedImportsPlugin from 'eslint-plugin-unused-imports';\n\nimport { GLOB_SRC } from '../globs';\n\nexport function unused() {\n return defineConfig([\n {\n files: GLOB_SRC,\n plugins: {\n 'unused-imports': unusedImportsPlugin,\n },\n rules: {\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'warn',\n {\n args: 'after-used',\n argsIgnorePattern: '^_',\n vars: 'all',\n varsIgnorePattern: '^_',\n },\n ],\n },\n },\n ]);\n}\n","import { defineConfig } from 'eslint/config';\nimport eslintPluginYml from 'eslint-plugin-yml';\n\nimport { type Options } from '../types';\n\nexport function yml(options: Options) {\n const { yml: ymlOption = true } = options;\n\n if (!ymlOption) return [];\n\n return defineConfig([\n ...eslintPluginYml.configs.recommended,\n {\n rules: {\n 'yml/quotes': [\n 'error',\n {\n avoidEscape: true,\n prefer: 'single',\n },\n ],\n },\n },\n ]);\n}\n","// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"./eslint-typegen.d.ts\" />\n\nimport { a11y } from './configs/a11y';\nimport { eslintCommentsConfig } from './configs/eslint-comments';\nimport { ignores } from './configs/ignores';\nimport { imports } from './configs/imports';\nimport { javascript } from './configs/javascript';\nimport { next } from './configs/next';\nimport { react } from './configs/react';\nimport { reactNative } from './configs/react-native';\nimport { regexp } from './configs/regexp';\nimport { sorting } from './configs/sorting';\nimport { typescript } from './configs/typescript';\nimport { unicorn } from './configs/unicorn';\nimport { unused } from './configs/unused';\nimport { yml } from './configs/yml';\nimport { type FlatConfig, type FlatConfigArray, type Options } from './types';\n\nexport type { FlatConfig, FlatConfigArray, Linter, Options, ParserOptions } from './types';\n\nexport function defineConfig(options: Options = {}, ...userConfigs: FlatConfig[]): FlatConfigArray {\n const {\n a11y: a11yOption = false,\n ignores: userIgnores = [],\n next: nextOption = false,\n react: reactOption = false,\n reactNative: reactNativeOption = false,\n regexp: regexpOption = true,\n sortImports = true,\n sortKeys = true,\n typeChecked = false,\n typescript: tsOption = true,\n yml: ymlOption = true,\n } = options;\n\n const configs: FlatConfigArray = [\n ignores(userIgnores),\n ...javascript(),\n ...typescript({ ...options, typeChecked, typescript: tsOption }),\n ...react({ ...options, react: reactOption }),\n ...reactNative({ ...options, reactNative: reactNativeOption }),\n ...next({ ...options, next: nextOption }),\n ...a11y({ ...options, a11y: a11yOption, react: reactOption }),\n ...imports({ ...options, sortImports }),\n ...unicorn(),\n ...sorting({ ...options, sortKeys }),\n ...regexp({ ...options, regexp: regexpOption }),\n ...unused(),\n ...yml({ ...options, yml: ymlOption }),\n ...eslintCommentsConfig(),\n // 用户自定义配置(最高优先级)\n ...userConfigs,\n ];\n\n return configs;\n}\n\nexport * from './globs';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,MAAa,UAAU;AACvB,MAAa,WAAW;AACxB,MAAa,UAAU;AACvB,MAAa,WAAW;AAExB,MAAa,cAAc,CAAC,SAAS,QAAS;AAC9C,MAAa,cAAc,CAAC,SAAS,QAAS;AAC9C,MAAa,WAAW,CAAC,GAAG,aAAa,GAAG,WAAY;AAExD,MAAa,YAAY;CACvB;CACA;CACA;AACD;AAED,MAAa,YAAY,CAAC,aAAa,UAAW;AAElD,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;ACrBD,SAAgB,KAAKA,SAAkB;CACrC,MAAM,EAAE,MAAM,YAAY,OAAO,aAAa,GAAG;AAEjD,MAAK,eAAe,YAAa,QAAO,CAAE;CAE1C,MAAM,QAAQ,CAAC,UAAU,QAAS;AAElC,QAAO,eAAa,CAClB;EACE;EACA,SAAS,EACP,YAAY,QACb;EACD,OAAO;GACL,GAAG,QAAQ,YAAY,YAAY;GACnC,qBAAqB;GACrB,+BAA+B;GAC/B,4BAA4B;GAC5B,yCAAyC;GACzC,2CAA2C;EAC5C;CAEJ,CAAA,EAAC;AACH;;;;ACxBD,SAAgB,uBAAuB;AACrC,QAAO,eAAa,CAClB;EACE,GAAG,eAAe;EAClB,OAAO;EACP,OAAO;GACL,GAAG,eAAe,YAAY;GAE9B,yDAAyD;GAEzD,uDAAuD;GAEvD,0DAA0D;GAE1D,0DAA0D;GAE1D,2DAA2D;EAC5D;CAEJ,CAAA,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,QAAQ,aAC3B,EACE,OAAO,EACL,cAAc,CACZ,SACA;EACE,aAAa;EACb,QAAQ;CAEX,CAAA,EACF,EAEJ,CAAA,EAAC;AACH;;;;ACHD,SAAgB,aAAaC,UAAmB,CAAE,GAAE,GAAG,aAA4C;CACjG,MAAM,EACJ,MAAM,aAAa,OACnB,SAAS,cAAc,CAAE,GACzB,MAAM,aAAa,OACnB,OAAO,cAAc,OACrB,aAAa,oBAAoB,OACjC,QAAQ,eAAe,MACvB,cAAc,MACd,WAAW,MACX,cAAc,OACd,YAAY,WAAW,MACvB,KAAK,YAAY,MAClB,GAAG;CAEJ,MAAMC,UAA2B;EAC/B,QAAQ,YAAY;EACpB,GAAG,YAAY;EACf,GAAG,WAAW;GAAE,GAAG;GAAS;GAAa,YAAY;EAAU,EAAC;EAChE,GAAG,MAAM;GAAE,GAAG;GAAS,OAAO;EAAa,EAAC;EAC5C,GAAG,YAAY;GAAE,GAAG;GAAS,aAAa;EAAmB,EAAC;EAC9D,GAAG,KAAK;GAAE,GAAG;GAAS,MAAM;EAAY,EAAC;EACzC,GAAG,KAAK;GAAE,GAAG;GAAS,MAAM;GAAY,OAAO;EAAa,EAAC;EAC7D,GAAG,QAAQ;GAAE,GAAG;GAAS;EAAa,EAAC;EACvC,GAAG,SAAS;EACZ,GAAG,QAAQ;GAAE,GAAG;GAAS;EAAU,EAAC;EACpC,GAAG,OAAO;GAAE,GAAG;GAAS,QAAQ;EAAc,EAAC;EAC/C,GAAG,QAAQ;EACX,GAAG,IAAI;GAAE,GAAG;GAAS,KAAK;EAAW,EAAC;EACtC,GAAG,sBAAsB;EAEzB,GAAG;CACJ;AAED,QAAO;AACR"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/eslint-config",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "ESLint Flat Config configuration for LobeHub projects",
5
5
  "homepage": "https://github.com/lobehub/lobe-lint/tree/master/packages/eslint-config",
6
6
  "bugs": {
@@ -28,9 +28,9 @@
28
28
  "dist"
29
29
  ],
30
30
  "dependencies": {
31
- "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
32
- "@eslint-react/eslint-plugin": "^2.9.4",
33
- "@eslint/js": "^9.39.2",
31
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
32
+ "@eslint-react/eslint-plugin": "^2.12.4",
33
+ "@eslint/js": "^10.0.1",
34
34
  "@next/eslint-plugin-next": "^16.1.6",
35
35
  "eslint-config-prettier": "^9.1.2",
36
36
  "eslint-import-resolver-typescript": "^4.4.4",
@@ -44,18 +44,18 @@
44
44
  "eslint-plugin-react-refresh": "^0.5.0",
45
45
  "eslint-plugin-regexp": "^3.0.0",
46
46
  "eslint-plugin-simple-import-sort": "^12.1.1",
47
- "eslint-plugin-unicorn": "^62.0.0",
48
- "eslint-plugin-unused-imports": "^4.3.0",
47
+ "eslint-plugin-unicorn": "^63.0.0",
48
+ "eslint-plugin-unused-imports": "^4.4.1",
49
49
  "eslint-plugin-yml": "^3.1.2",
50
50
  "globals": "^17.3.0",
51
- "typescript-eslint": "^8.54.0"
51
+ "typescript-eslint": "^8.55.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "eslint-typegen": "^2.3.0",
55
- "glob": "^13.0.1"
55
+ "glob": "^13.0.2"
56
56
  },
57
57
  "peerDependencies": {
58
- "eslint": ">=9.0.0",
58
+ "eslint": "^10.0.0",
59
59
  "typescript": ">=5.0.0"
60
60
  },
61
61
  "peerDependenciesMeta": {