@ntnyq/eslint-config 7.0.0-beta.6 → 7.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +627 -361
- package/dist/index.mjs +9 -1
- package/package.json +21 -21
package/dist/index.d.mts
CHANGED
|
@@ -2823,238 +2823,238 @@ interface RuleOptions {
|
|
|
2823
2823
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>;
|
|
2824
2824
|
/**
|
|
2825
2825
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
2826
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2826
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/consistent-type-specifier-style.md
|
|
2827
2827
|
*/
|
|
2828
2828
|
'import-x/consistent-type-specifier-style'?: Linter.RuleEntry<ImportXConsistentTypeSpecifierStyle>;
|
|
2829
2829
|
/**
|
|
2830
2830
|
* Ensure a default export is present, given a default import.
|
|
2831
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2831
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/default.md
|
|
2832
2832
|
*/
|
|
2833
2833
|
'import-x/default'?: Linter.RuleEntry<[]>;
|
|
2834
2834
|
/**
|
|
2835
2835
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
2836
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2836
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/dynamic-import-chunkname.md
|
|
2837
2837
|
*/
|
|
2838
2838
|
'import-x/dynamic-import-chunkname'?: Linter.RuleEntry<ImportXDynamicImportChunkname>;
|
|
2839
2839
|
/**
|
|
2840
2840
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
2841
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2841
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/export.md
|
|
2842
2842
|
*/
|
|
2843
2843
|
'import-x/export'?: Linter.RuleEntry<[]>;
|
|
2844
2844
|
/**
|
|
2845
2845
|
* Ensure all exports appear after other statements.
|
|
2846
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2846
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/exports-last.md
|
|
2847
2847
|
*/
|
|
2848
2848
|
'import-x/exports-last'?: Linter.RuleEntry<[]>;
|
|
2849
2849
|
/**
|
|
2850
2850
|
* Ensure consistent use of file extension within the import path.
|
|
2851
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2851
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/extensions.md
|
|
2852
2852
|
*/
|
|
2853
2853
|
'import-x/extensions'?: Linter.RuleEntry<ImportXExtensions>;
|
|
2854
2854
|
/**
|
|
2855
2855
|
* Ensure all imports appear before other statements.
|
|
2856
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2856
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/first.md
|
|
2857
2857
|
*/
|
|
2858
2858
|
'import-x/first'?: Linter.RuleEntry<ImportXFirst>;
|
|
2859
2859
|
/**
|
|
2860
2860
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
2861
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2861
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/group-exports.md
|
|
2862
2862
|
*/
|
|
2863
2863
|
'import-x/group-exports'?: Linter.RuleEntry<[]>;
|
|
2864
2864
|
/**
|
|
2865
2865
|
* Replaced by `import-x/first`.
|
|
2866
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2866
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/imports-first.md
|
|
2867
2867
|
* @deprecated
|
|
2868
2868
|
*/
|
|
2869
2869
|
'import-x/imports-first'?: Linter.RuleEntry<ImportXImportsFirst>;
|
|
2870
2870
|
/**
|
|
2871
2871
|
* Enforce the maximum number of dependencies a module can have.
|
|
2872
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2872
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/max-dependencies.md
|
|
2873
2873
|
*/
|
|
2874
2874
|
'import-x/max-dependencies'?: Linter.RuleEntry<ImportXMaxDependencies>;
|
|
2875
2875
|
/**
|
|
2876
2876
|
* Ensure named imports correspond to a named export in the remote file.
|
|
2877
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2877
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/named.md
|
|
2878
2878
|
*/
|
|
2879
2879
|
'import-x/named'?: Linter.RuleEntry<ImportXNamed>;
|
|
2880
2880
|
/**
|
|
2881
2881
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
2882
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2882
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/namespace.md
|
|
2883
2883
|
*/
|
|
2884
2884
|
'import-x/namespace'?: Linter.RuleEntry<ImportXNamespace>;
|
|
2885
2885
|
/**
|
|
2886
2886
|
* Enforce a newline after import statements.
|
|
2887
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2887
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/newline-after-import.md
|
|
2888
2888
|
*/
|
|
2889
2889
|
'import-x/newline-after-import'?: Linter.RuleEntry<ImportXNewlineAfterImport>;
|
|
2890
2890
|
/**
|
|
2891
2891
|
* Forbid import of modules using absolute paths.
|
|
2892
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2892
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-absolute-path.md
|
|
2893
2893
|
*/
|
|
2894
2894
|
'import-x/no-absolute-path'?: Linter.RuleEntry<ImportXNoAbsolutePath>;
|
|
2895
2895
|
/**
|
|
2896
2896
|
* Forbid AMD `require` and `define` calls.
|
|
2897
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2897
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-amd.md
|
|
2898
2898
|
*/
|
|
2899
2899
|
'import-x/no-amd'?: Linter.RuleEntry<[]>;
|
|
2900
2900
|
/**
|
|
2901
2901
|
* Forbid anonymous values as default exports.
|
|
2902
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2902
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-anonymous-default-export.md
|
|
2903
2903
|
*/
|
|
2904
2904
|
'import-x/no-anonymous-default-export'?: Linter.RuleEntry<ImportXNoAnonymousDefaultExport>;
|
|
2905
2905
|
/**
|
|
2906
2906
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
2907
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2907
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-commonjs.md
|
|
2908
2908
|
*/
|
|
2909
2909
|
'import-x/no-commonjs'?: Linter.RuleEntry<ImportXNoCommonjs>;
|
|
2910
2910
|
/**
|
|
2911
2911
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
2912
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2912
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-cycle.md
|
|
2913
2913
|
*/
|
|
2914
2914
|
'import-x/no-cycle'?: Linter.RuleEntry<ImportXNoCycle>;
|
|
2915
2915
|
/**
|
|
2916
2916
|
* Forbid default exports.
|
|
2917
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2917
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-default-export.md
|
|
2918
2918
|
*/
|
|
2919
2919
|
'import-x/no-default-export'?: Linter.RuleEntry<[]>;
|
|
2920
2920
|
/**
|
|
2921
2921
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
2922
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2922
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-deprecated.md
|
|
2923
2923
|
*/
|
|
2924
2924
|
'import-x/no-deprecated'?: Linter.RuleEntry<[]>;
|
|
2925
2925
|
/**
|
|
2926
2926
|
* Forbid repeated import of the same module in multiple places.
|
|
2927
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2927
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-duplicates.md
|
|
2928
2928
|
*/
|
|
2929
2929
|
'import-x/no-duplicates'?: Linter.RuleEntry<ImportXNoDuplicates>;
|
|
2930
2930
|
/**
|
|
2931
2931
|
* Forbid `require()` calls with expressions.
|
|
2932
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2932
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-dynamic-require.md
|
|
2933
2933
|
*/
|
|
2934
2934
|
'import-x/no-dynamic-require'?: Linter.RuleEntry<ImportXNoDynamicRequire>;
|
|
2935
2935
|
/**
|
|
2936
2936
|
* Forbid empty named import blocks.
|
|
2937
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2937
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-empty-named-blocks.md
|
|
2938
2938
|
*/
|
|
2939
2939
|
'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]>;
|
|
2940
2940
|
/**
|
|
2941
2941
|
* Forbid the use of extraneous packages.
|
|
2942
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2942
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-extraneous-dependencies.md
|
|
2943
2943
|
*/
|
|
2944
2944
|
'import-x/no-extraneous-dependencies'?: Linter.RuleEntry<ImportXNoExtraneousDependencies>;
|
|
2945
2945
|
/**
|
|
2946
2946
|
* Forbid import statements with CommonJS module.exports.
|
|
2947
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2947
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-import-module-exports.md
|
|
2948
2948
|
*/
|
|
2949
2949
|
'import-x/no-import-module-exports'?: Linter.RuleEntry<ImportXNoImportModuleExports>;
|
|
2950
2950
|
/**
|
|
2951
2951
|
* Forbid importing the submodules of other modules.
|
|
2952
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2952
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-internal-modules.md
|
|
2953
2953
|
*/
|
|
2954
2954
|
'import-x/no-internal-modules'?: Linter.RuleEntry<ImportXNoInternalModules>;
|
|
2955
2955
|
/**
|
|
2956
2956
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
2957
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2957
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-mutable-exports.md
|
|
2958
2958
|
*/
|
|
2959
2959
|
'import-x/no-mutable-exports'?: Linter.RuleEntry<[]>;
|
|
2960
2960
|
/**
|
|
2961
2961
|
* Forbid use of exported name as identifier of default export.
|
|
2962
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2962
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-named-as-default.md
|
|
2963
2963
|
*/
|
|
2964
2964
|
'import-x/no-named-as-default'?: Linter.RuleEntry<[]>;
|
|
2965
2965
|
/**
|
|
2966
2966
|
* Forbid use of exported name as property of default export.
|
|
2967
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2967
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-named-as-default-member.md
|
|
2968
2968
|
*/
|
|
2969
2969
|
'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]>;
|
|
2970
2970
|
/**
|
|
2971
2971
|
* Forbid named default exports.
|
|
2972
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2972
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-named-default.md
|
|
2973
2973
|
*/
|
|
2974
2974
|
'import-x/no-named-default'?: Linter.RuleEntry<[]>;
|
|
2975
2975
|
/**
|
|
2976
2976
|
* Forbid named exports.
|
|
2977
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2977
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-named-export.md
|
|
2978
2978
|
*/
|
|
2979
2979
|
'import-x/no-named-export'?: Linter.RuleEntry<[]>;
|
|
2980
2980
|
/**
|
|
2981
2981
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
2982
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2982
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-namespace.md
|
|
2983
2983
|
*/
|
|
2984
2984
|
'import-x/no-namespace'?: Linter.RuleEntry<ImportXNoNamespace>;
|
|
2985
2985
|
/**
|
|
2986
2986
|
* Forbid Node.js builtin modules.
|
|
2987
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2987
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-nodejs-modules.md
|
|
2988
2988
|
*/
|
|
2989
2989
|
'import-x/no-nodejs-modules'?: Linter.RuleEntry<ImportXNoNodejsModules>;
|
|
2990
2990
|
/**
|
|
2991
2991
|
* Forbid importing packages through relative paths.
|
|
2992
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2992
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-relative-packages.md
|
|
2993
2993
|
*/
|
|
2994
2994
|
'import-x/no-relative-packages'?: Linter.RuleEntry<ImportXNoRelativePackages>;
|
|
2995
2995
|
/**
|
|
2996
2996
|
* Forbid importing modules from parent directories.
|
|
2997
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
2997
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-relative-parent-imports.md
|
|
2998
2998
|
*/
|
|
2999
2999
|
'import-x/no-relative-parent-imports'?: Linter.RuleEntry<ImportXNoRelativeParentImports>;
|
|
3000
3000
|
/**
|
|
3001
3001
|
* Forbid importing a default export by a different name.
|
|
3002
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3002
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-rename-default.md
|
|
3003
3003
|
*/
|
|
3004
3004
|
'import-x/no-rename-default'?: Linter.RuleEntry<ImportXNoRenameDefault>;
|
|
3005
3005
|
/**
|
|
3006
3006
|
* Enforce which files can be imported in a given folder.
|
|
3007
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3007
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-restricted-paths.md
|
|
3008
3008
|
*/
|
|
3009
3009
|
'import-x/no-restricted-paths'?: Linter.RuleEntry<ImportXNoRestrictedPaths>;
|
|
3010
3010
|
/**
|
|
3011
3011
|
* Forbid a module from importing itself.
|
|
3012
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3012
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-self-import.md
|
|
3013
3013
|
*/
|
|
3014
3014
|
'import-x/no-self-import'?: Linter.RuleEntry<[]>;
|
|
3015
3015
|
/**
|
|
3016
3016
|
* Forbid unassigned imports.
|
|
3017
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3017
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-unassigned-import.md
|
|
3018
3018
|
*/
|
|
3019
3019
|
'import-x/no-unassigned-import'?: Linter.RuleEntry<ImportXNoUnassignedImport>;
|
|
3020
3020
|
/**
|
|
3021
3021
|
* Ensure imports point to a file/module that can be resolved.
|
|
3022
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3022
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-unresolved.md
|
|
3023
3023
|
*/
|
|
3024
3024
|
'import-x/no-unresolved'?: Linter.RuleEntry<ImportXNoUnresolved>;
|
|
3025
3025
|
/**
|
|
3026
3026
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
3027
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3027
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-unused-modules.md
|
|
3028
3028
|
*/
|
|
3029
3029
|
'import-x/no-unused-modules'?: Linter.RuleEntry<ImportXNoUnusedModules>;
|
|
3030
3030
|
/**
|
|
3031
3031
|
* Forbid unnecessary path segments in import and require statements.
|
|
3032
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3032
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-useless-path-segments.md
|
|
3033
3033
|
*/
|
|
3034
3034
|
'import-x/no-useless-path-segments'?: Linter.RuleEntry<ImportXNoUselessPathSegments>;
|
|
3035
3035
|
/**
|
|
3036
3036
|
* Forbid webpack loader syntax in imports.
|
|
3037
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3037
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-webpack-loader-syntax.md
|
|
3038
3038
|
*/
|
|
3039
3039
|
'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>;
|
|
3040
3040
|
/**
|
|
3041
3041
|
* Enforce a convention in module import order.
|
|
3042
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3042
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/order.md
|
|
3043
3043
|
*/
|
|
3044
3044
|
'import-x/order'?: Linter.RuleEntry<ImportXOrder>;
|
|
3045
3045
|
/**
|
|
3046
3046
|
* Prefer a default export if module exports a single name or multiple names.
|
|
3047
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3047
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/prefer-default-export.md
|
|
3048
3048
|
*/
|
|
3049
3049
|
'import-x/prefer-default-export'?: Linter.RuleEntry<ImportXPreferDefaultExport>;
|
|
3050
3050
|
/**
|
|
3051
3051
|
* Enforce using namespace imports for specific modules, like `react`/`react-dom`, etc.
|
|
3052
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3052
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/prefer-namespace-import.md
|
|
3053
3053
|
*/
|
|
3054
3054
|
'import-x/prefer-namespace-import'?: Linter.RuleEntry<ImportXPreferNamespaceImport>;
|
|
3055
3055
|
/**
|
|
3056
3056
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
3057
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3057
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/unambiguous.md
|
|
3058
3058
|
*/
|
|
3059
3059
|
'import-x/unambiguous'?: Linter.RuleEntry<[]>;
|
|
3060
3060
|
/**
|
|
@@ -6388,1369 +6388,1620 @@ interface RuleOptions {
|
|
|
6388
6388
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6389
6389
|
/**
|
|
6390
6390
|
* Prefer better DOM traversal APIs.
|
|
6391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/better-dom-traversing.md
|
|
6392
6392
|
*/
|
|
6393
6393
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6394
6394
|
/**
|
|
6395
6395
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
6396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6397
6397
|
* @deprecated
|
|
6398
6398
|
*/
|
|
6399
6399
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6400
6400
|
/**
|
|
6401
6401
|
* Enforce a specific parameter name in catch clauses.
|
|
6402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/catch-error-name.md
|
|
6403
6403
|
*/
|
|
6404
6404
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6405
6405
|
/**
|
|
6406
6406
|
* Enforce consistent class references in static methods.
|
|
6407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6408
6408
|
*/
|
|
6409
6409
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6410
6410
|
/**
|
|
6411
6411
|
* Enforce better comment content.
|
|
6412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/comment-content.md
|
|
6413
6413
|
*/
|
|
6414
6414
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
6415
6415
|
/**
|
|
6416
6416
|
* Enforce consistent assertion style with `node:assert`.
|
|
6417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-assert.md
|
|
6418
6418
|
*/
|
|
6419
6419
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6420
6420
|
/**
|
|
6421
6421
|
* Enforce consistent naming for boolean names.
|
|
6422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-boolean-name.md
|
|
6423
6423
|
*/
|
|
6424
6424
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6425
6425
|
/**
|
|
6426
6426
|
* Enforce consistent class member order.
|
|
6427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-class-member-order.md
|
|
6428
6428
|
*/
|
|
6429
6429
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
6430
6430
|
/**
|
|
6431
6431
|
* Enforce consistent spelling of compound words in identifiers.
|
|
6432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-compound-words.md
|
|
6433
6433
|
*/
|
|
6434
6434
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6435
|
+
/**
|
|
6436
|
+
* Enforce consistent conditional object spread style.
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6438
|
+
*/
|
|
6439
|
+
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
6435
6440
|
/**
|
|
6436
6441
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-date-clone.md
|
|
6438
6443
|
*/
|
|
6439
6444
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6440
6445
|
/**
|
|
6441
6446
|
* Use destructured variables over properties.
|
|
6442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-destructuring.md
|
|
6443
6448
|
*/
|
|
6444
6449
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6445
6450
|
/**
|
|
6446
6451
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6448
6453
|
*/
|
|
6449
6454
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6450
6455
|
/**
|
|
6451
6456
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-existence-index-check.md
|
|
6453
6458
|
*/
|
|
6454
6459
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6455
6460
|
/**
|
|
6456
6461
|
* Enforce consistent decorator position on exported classes.
|
|
6457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6458
6463
|
*/
|
|
6459
6464
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6460
6465
|
/**
|
|
6461
6466
|
* Move function definitions to the highest possible scope.
|
|
6462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-function-scoping.md
|
|
6463
6468
|
*/
|
|
6464
6469
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6465
6470
|
/**
|
|
6466
6471
|
* Enforce function syntax by role.
|
|
6467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-function-style.md
|
|
6468
6473
|
*/
|
|
6469
6474
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6470
6475
|
/**
|
|
6471
6476
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-json-file-read.md
|
|
6473
6478
|
*/
|
|
6474
6479
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6475
6480
|
/**
|
|
6476
6481
|
* Enforce consistent optional chaining for same-base member access.
|
|
6477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-optional-chaining.md
|
|
6478
6483
|
*/
|
|
6479
6484
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6480
6485
|
/**
|
|
6481
6486
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6483
6488
|
*/
|
|
6484
6489
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6490
|
+
/**
|
|
6491
|
+
* Enforce consistent labels on tuple type elements.
|
|
6492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-tuple-labels.md
|
|
6493
|
+
*/
|
|
6494
|
+
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
6485
6495
|
/**
|
|
6486
6496
|
* Enforce correct `Error` subclassing.
|
|
6487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/custom-error-definition.md
|
|
6488
6498
|
*/
|
|
6489
6499
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6500
|
+
/**
|
|
6501
|
+
* Enforce consistent default export declarations.
|
|
6502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/default-export-style.md
|
|
6503
|
+
*/
|
|
6504
|
+
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
6490
6505
|
/**
|
|
6491
6506
|
* Enforce consistent style for DOM element dataset access.
|
|
6492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/dom-node-dataset.md
|
|
6493
6508
|
*/
|
|
6494
6509
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6495
6510
|
/**
|
|
6496
6511
|
* Enforce no spaces between braces.
|
|
6497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/empty-brace-spaces.md
|
|
6498
6513
|
*/
|
|
6499
6514
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6500
6515
|
/**
|
|
6501
6516
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/error-message.md
|
|
6503
6518
|
*/
|
|
6504
6519
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6505
6520
|
/**
|
|
6506
6521
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/escape-case.md
|
|
6508
6523
|
*/
|
|
6509
6524
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6510
6525
|
/**
|
|
6511
6526
|
* Add expiration conditions to TODO comments.
|
|
6512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/expiring-todo-comments.md
|
|
6513
6528
|
*/
|
|
6514
6529
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6515
6530
|
/**
|
|
6516
6531
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/explicit-length-check.md
|
|
6518
6533
|
*/
|
|
6519
6534
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6520
6535
|
/**
|
|
6521
6536
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/explicit-timer-delay.md
|
|
6523
6538
|
*/
|
|
6524
6539
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6525
6540
|
/**
|
|
6526
6541
|
* Enforce a case style for filenames and directory names.
|
|
6527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/filename-case.md
|
|
6528
6543
|
*/
|
|
6529
6544
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6530
6545
|
/**
|
|
6531
6546
|
* Require identifiers to match a specified regular expression.
|
|
6532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/id-match.md
|
|
6533
6548
|
*/
|
|
6534
6549
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
6535
6550
|
/**
|
|
6536
6551
|
* Enforce specific import styles per module.
|
|
6537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/import-style.md
|
|
6538
6553
|
*/
|
|
6539
6554
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6540
6555
|
/**
|
|
6541
6556
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/isolated-functions.md
|
|
6543
6558
|
*/
|
|
6544
6559
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6545
6560
|
/**
|
|
6546
6561
|
* Require or disallow logical assignment operator shorthand
|
|
6547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/logical-assignment-operators.md
|
|
6548
6563
|
*/
|
|
6549
6564
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6550
6565
|
/**
|
|
6551
6566
|
* Limit the depth of nested calls.
|
|
6552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/max-nested-calls.md
|
|
6553
6568
|
*/
|
|
6554
6569
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6555
6570
|
/**
|
|
6556
|
-
* Enforce
|
|
6557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6571
|
+
* Enforce replacements for variable, property, and filenames.
|
|
6572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/name-replacements.md
|
|
6573
|
+
*/
|
|
6574
|
+
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6575
|
+
/**
|
|
6576
|
+
* Enforce correct use of `new` for builtin constructors.
|
|
6577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/new-for-builtins.md
|
|
6558
6578
|
*/
|
|
6559
6579
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6560
6580
|
/**
|
|
6561
6581
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6563
6583
|
*/
|
|
6564
6584
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6565
6585
|
/**
|
|
6566
6586
|
* Disallow recursive access to `this` within getters and setters.
|
|
6567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-accessor-recursion.md
|
|
6568
6588
|
*/
|
|
6569
6589
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6590
|
+
/**
|
|
6591
|
+
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6593
|
+
*/
|
|
6594
|
+
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
6570
6595
|
/**
|
|
6571
6596
|
* Disallow anonymous functions and classes as the default export.
|
|
6572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-anonymous-default-export.md
|
|
6573
6598
|
*/
|
|
6574
6599
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6575
6600
|
/**
|
|
6576
6601
|
* Prevent passing a function reference directly to iterator methods.
|
|
6577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-callback-reference.md
|
|
6578
6603
|
*/
|
|
6579
6604
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6605
|
+
/**
|
|
6606
|
+
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-concat-in-loop.md
|
|
6608
|
+
*/
|
|
6609
|
+
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
6580
6610
|
/**
|
|
6581
6611
|
* Disallow using reference values as `Array#fill()` values.
|
|
6582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6583
6613
|
*/
|
|
6584
6614
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6585
6615
|
/**
|
|
6586
6616
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-from-fill.md
|
|
6588
6618
|
*/
|
|
6589
6619
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6620
|
+
/**
|
|
6621
|
+
* Disallow front-of-array mutation.
|
|
6622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-front-mutation.md
|
|
6623
|
+
*/
|
|
6624
|
+
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
6590
6625
|
/**
|
|
6591
6626
|
* Disallow using the `this` argument in array methods.
|
|
6592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-method-this-argument.md
|
|
6593
6628
|
*/
|
|
6594
6629
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6595
6630
|
/**
|
|
6596
6631
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6598
6633
|
* @deprecated
|
|
6599
6634
|
*/
|
|
6600
6635
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6601
6636
|
/**
|
|
6602
6637
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-reduce.md
|
|
6604
6639
|
*/
|
|
6605
6640
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6606
6641
|
/**
|
|
6607
6642
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-reverse.md
|
|
6609
6644
|
*/
|
|
6610
6645
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6611
6646
|
/**
|
|
6612
6647
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-sort.md
|
|
6614
6649
|
*/
|
|
6615
6650
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6651
|
+
/**
|
|
6652
|
+
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6654
|
+
*/
|
|
6655
|
+
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6616
6656
|
/**
|
|
6617
6657
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-splice.md
|
|
6619
6659
|
*/
|
|
6620
6660
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6621
6661
|
/**
|
|
6622
6662
|
* Disallow asterisk prefixes in documentation comments.
|
|
6623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6624
6664
|
*/
|
|
6625
6665
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6626
6666
|
/**
|
|
6627
6667
|
* Disallow member access from await expression.
|
|
6628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-await-expression-member.md
|
|
6629
6669
|
*/
|
|
6630
6670
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6631
6671
|
/**
|
|
6632
6672
|
* Disallow using `await` in `Promise` method parameters.
|
|
6633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6634
6674
|
*/
|
|
6635
6675
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6636
6676
|
/**
|
|
6637
6677
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-blob-to-file.md
|
|
6639
6679
|
*/
|
|
6640
6680
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6681
|
+
/**
|
|
6682
|
+
* Disallow boolean-returning sort comparators.
|
|
6683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6684
|
+
*/
|
|
6685
|
+
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6641
6686
|
/**
|
|
6642
6687
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
6643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6644
6689
|
*/
|
|
6645
6690
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
6646
6691
|
/**
|
|
6647
6692
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-canvas-to-image.md
|
|
6649
6694
|
*/
|
|
6650
6695
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6696
|
+
/**
|
|
6697
|
+
* Disallow chained comparisons such as `a < b < c`.
|
|
6698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-chained-comparison.md
|
|
6699
|
+
*/
|
|
6700
|
+
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6701
|
+
/**
|
|
6702
|
+
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-collection-bracket-access.md
|
|
6704
|
+
*/
|
|
6705
|
+
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6651
6706
|
/**
|
|
6652
6707
|
* Disallow dynamic object property existence checks.
|
|
6653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6654
6709
|
*/
|
|
6655
6710
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6656
6711
|
/**
|
|
6657
6712
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-confusing-array-splice.md
|
|
6659
6714
|
*/
|
|
6660
6715
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6661
6716
|
/**
|
|
6662
6717
|
* Disallow confusing uses of `Array#with()`.
|
|
6663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-confusing-array-with.md
|
|
6664
6719
|
*/
|
|
6665
6720
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6666
6721
|
/**
|
|
6667
6722
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-console-spaces.md
|
|
6669
6724
|
*/
|
|
6670
6725
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6726
|
+
/**
|
|
6727
|
+
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-constant-zero-expression.md
|
|
6729
|
+
*/
|
|
6730
|
+
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6671
6731
|
/**
|
|
6672
6732
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6674
6734
|
*/
|
|
6675
6735
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6676
6736
|
/**
|
|
6677
6737
|
* Do not use `document.cookie` directly.
|
|
6678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-document-cookie.md
|
|
6679
6739
|
*/
|
|
6680
6740
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6741
|
+
/**
|
|
6742
|
+
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-double-comparison.md
|
|
6744
|
+
*/
|
|
6745
|
+
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6746
|
+
/**
|
|
6747
|
+
* Disallow duplicate adjacent branches in if chains.
|
|
6748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6749
|
+
*/
|
|
6750
|
+
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6751
|
+
/**
|
|
6752
|
+
* Disallow adjacent duplicate operands in logical expressions.
|
|
6753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6754
|
+
*/
|
|
6755
|
+
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6681
6756
|
/**
|
|
6682
6757
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-loops.md
|
|
6684
6759
|
*/
|
|
6685
6760
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6686
6761
|
/**
|
|
6687
6762
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-set-values.md
|
|
6689
6764
|
*/
|
|
6690
6765
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6691
6766
|
/**
|
|
6692
6767
|
* Disallow empty files.
|
|
6693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-empty-file.md
|
|
6694
6769
|
*/
|
|
6695
6770
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6696
6771
|
/**
|
|
6697
6772
|
* Disallow assigning to built-in error properties.
|
|
6698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-error-property-assignment.md
|
|
6699
6774
|
*/
|
|
6700
6775
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6701
6776
|
/**
|
|
6702
6777
|
* Disallow exports in scripts.
|
|
6703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-exports-in-scripts.md
|
|
6704
6779
|
*/
|
|
6705
6780
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6706
6781
|
/**
|
|
6707
6782
|
* Prefer `for…of` over the `forEach` method.
|
|
6708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-for-each.md
|
|
6709
6784
|
*/
|
|
6710
6785
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6711
6786
|
/**
|
|
6712
6787
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-for-loop.md
|
|
6714
6789
|
*/
|
|
6715
6790
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6716
6791
|
/**
|
|
6717
6792
|
* Disallow assigning properties on the global object.
|
|
6718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6719
6794
|
*/
|
|
6720
6795
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6721
6796
|
/**
|
|
6722
6797
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
6723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6724
6799
|
* @deprecated
|
|
6725
6800
|
*/
|
|
6726
6801
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6727
6802
|
/**
|
|
6728
6803
|
* Disallow immediate mutation after variable assignment.
|
|
6729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-immediate-mutation.md
|
|
6730
6805
|
*/
|
|
6731
6806
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6807
|
+
/**
|
|
6808
|
+
* Disallow impossible comparisons against `.length` or `.size`.
|
|
6809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-impossible-length-comparison.md
|
|
6810
|
+
*/
|
|
6811
|
+
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
6732
6812
|
/**
|
|
6733
6813
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-incorrect-query-selector.md
|
|
6735
6815
|
*/
|
|
6736
6816
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6737
6817
|
/**
|
|
6738
6818
|
* Disallow incorrect template literal interpolation syntax.
|
|
6739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6740
6820
|
*/
|
|
6741
6821
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
6742
6822
|
/**
|
|
6743
6823
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6745
6825
|
* @deprecated
|
|
6746
6826
|
*/
|
|
6747
6827
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6748
6828
|
/**
|
|
6749
6829
|
* Disallow `instanceof` with built-in objects
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-instanceof-builtins.md
|
|
6751
6831
|
*/
|
|
6752
6832
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6753
6833
|
/**
|
|
6754
6834
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-argument-count.md
|
|
6756
6836
|
*/
|
|
6757
6837
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
6838
|
+
/**
|
|
6839
|
+
* Disallow comparing a single character from a string to a multi-character string.
|
|
6840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-character-comparison.md
|
|
6841
|
+
*/
|
|
6842
|
+
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
6758
6843
|
/**
|
|
6759
6844
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6761
6846
|
*/
|
|
6762
6847
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6763
6848
|
/**
|
|
6764
6849
|
* Disallow invalid `accept` values on file inputs.
|
|
6765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
6766
6851
|
*/
|
|
6767
6852
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
6768
6853
|
/**
|
|
6769
6854
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6771
6856
|
*/
|
|
6772
6857
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6858
|
+
/**
|
|
6859
|
+
* Disallow invalid implementations of well-known symbol methods.
|
|
6860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
6861
|
+
*/
|
|
6862
|
+
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
6773
6863
|
/**
|
|
6774
6864
|
* Disallow identifiers starting with `new` or `class`.
|
|
6775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-keyword-prefix.md
|
|
6776
6866
|
*/
|
|
6777
6867
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6778
6868
|
/**
|
|
6779
6869
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
6780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-late-current-target-access.md
|
|
6781
6871
|
*/
|
|
6782
6872
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
6873
|
+
/**
|
|
6874
|
+
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
6875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-late-event-control.md
|
|
6876
|
+
*/
|
|
6877
|
+
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
6783
6878
|
/**
|
|
6784
6879
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6786
6881
|
* @deprecated
|
|
6787
6882
|
*/
|
|
6788
6883
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6789
6884
|
/**
|
|
6790
6885
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-lonely-if.md
|
|
6792
6887
|
*/
|
|
6793
6888
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6889
|
+
/**
|
|
6890
|
+
* Disallow mutating a loop iterable during iteration.
|
|
6891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
6892
|
+
*/
|
|
6893
|
+
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
6794
6894
|
/**
|
|
6795
6895
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6797
6897
|
*/
|
|
6798
6898
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6799
6899
|
/**
|
|
6800
6900
|
* Disallow manually wrapped comments.
|
|
6801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
6802
6902
|
*/
|
|
6803
6903
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
6804
6904
|
/**
|
|
6805
6905
|
* Disallow checking a Map key before accessing a different key.
|
|
6806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-mismatched-map-key.md
|
|
6807
6907
|
*/
|
|
6808
6908
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
6909
|
+
/**
|
|
6910
|
+
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
6911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-misrefactored-assignment.md
|
|
6912
|
+
*/
|
|
6913
|
+
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
6809
6914
|
/**
|
|
6810
6915
|
* Disallow named usage of default import and export.
|
|
6811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-named-default.md
|
|
6812
6917
|
*/
|
|
6813
6918
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6814
6919
|
/**
|
|
6815
6920
|
* Disallow negated array predicate calls.
|
|
6816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-array-predicate.md
|
|
6817
6922
|
*/
|
|
6818
6923
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6819
6924
|
/**
|
|
6820
6925
|
* Disallow negated comparisons.
|
|
6821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-comparison.md
|
|
6822
6927
|
*/
|
|
6823
6928
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
6824
6929
|
/**
|
|
6825
6930
|
* Disallow negated conditions.
|
|
6826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-condition.md
|
|
6827
6932
|
*/
|
|
6828
6933
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6829
6934
|
/**
|
|
6830
6935
|
* Disallow negated expression in equality check.
|
|
6831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6832
6937
|
*/
|
|
6833
6938
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6834
6939
|
/**
|
|
6835
6940
|
* Disallow nested ternary expressions.
|
|
6836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-nested-ternary.md
|
|
6837
6942
|
*/
|
|
6838
6943
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6839
6944
|
/**
|
|
6840
6945
|
* Disallow `new Array()`.
|
|
6841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-new-array.md
|
|
6842
6947
|
*/
|
|
6843
6948
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6844
6949
|
/**
|
|
6845
6950
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-new-buffer.md
|
|
6847
6952
|
*/
|
|
6848
6953
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6849
6954
|
/**
|
|
6850
6955
|
* Disallow non-function values with function-style verb prefixes.
|
|
6851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
6852
6957
|
*/
|
|
6853
6958
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
6959
|
+
/**
|
|
6960
|
+
* Disallow non-standard properties on built-in objects.
|
|
6961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
6962
|
+
*/
|
|
6963
|
+
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
6854
6964
|
/**
|
|
6855
6965
|
* Disallow the use of the `null` literal.
|
|
6856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-null.md
|
|
6857
6967
|
*/
|
|
6858
6968
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6859
6969
|
/**
|
|
6860
6970
|
* Disallow the use of objects as default parameters.
|
|
6861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6862
6972
|
*/
|
|
6863
6973
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6864
6974
|
/**
|
|
6865
6975
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
6866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-object-methods-with-collections.md
|
|
6867
6977
|
*/
|
|
6868
6978
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
6869
6979
|
/**
|
|
6870
6980
|
* Disallow optional chaining on undeclared variables.
|
|
6871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
6872
6982
|
*/
|
|
6873
6983
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
6874
6984
|
/**
|
|
6875
6985
|
* Disallow `process.exit()`.
|
|
6876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-process-exit.md
|
|
6877
6987
|
*/
|
|
6878
6988
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6879
6989
|
/**
|
|
6880
6990
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
6881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-redundant-comparison.md
|
|
6882
6992
|
*/
|
|
6883
6993
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
6884
6994
|
/**
|
|
6885
6995
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
6886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-return-array-push.md
|
|
6887
6997
|
*/
|
|
6888
6998
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
6999
|
+
/**
|
|
7000
|
+
* Disallow selector syntax in DOM names.
|
|
7001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7002
|
+
*/
|
|
7003
|
+
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
6889
7004
|
/**
|
|
6890
7005
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6892
7007
|
*/
|
|
6893
7008
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6894
7009
|
/**
|
|
6895
7010
|
* Disallow classes that only have static members.
|
|
6896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-static-only-class.md
|
|
6897
7012
|
*/
|
|
6898
7013
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6899
7014
|
/**
|
|
6900
7015
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
6901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-subtraction-comparison.md
|
|
6902
7017
|
*/
|
|
6903
7018
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
6904
7019
|
/**
|
|
6905
7020
|
* Disallow `then` property.
|
|
6906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-thenable.md
|
|
6907
7022
|
*/
|
|
6908
7023
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6909
7024
|
/**
|
|
6910
7025
|
* Disallow assigning `this` to a variable.
|
|
6911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-this-assignment.md
|
|
6912
7027
|
*/
|
|
6913
7028
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6914
7029
|
/**
|
|
6915
7030
|
* Disallow `this` outside of classes.
|
|
6916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-this-outside-of-class.md
|
|
6917
7032
|
*/
|
|
6918
7033
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
6919
7034
|
/**
|
|
6920
7035
|
* Disallow assigning to top-level variables from inside functions.
|
|
6921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
6922
7037
|
*/
|
|
6923
7038
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
6924
7039
|
/**
|
|
6925
7040
|
* Disallow top-level side effects in exported modules.
|
|
6926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-top-level-side-effects.md
|
|
6927
7042
|
*/
|
|
6928
7043
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
6929
7044
|
/**
|
|
6930
7045
|
* Disallow comparing `undefined` using `typeof`.
|
|
6931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-typeof-undefined.md
|
|
6932
7047
|
*/
|
|
6933
7048
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6934
7049
|
/**
|
|
6935
7050
|
* Disallow referencing methods without calling them.
|
|
6936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-uncalled-method.md
|
|
6937
7052
|
*/
|
|
6938
7053
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
6939
7054
|
/**
|
|
6940
7055
|
* Require class members to be declared.
|
|
6941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-undeclared-class-members.md
|
|
6942
7057
|
*/
|
|
6943
7058
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
6944
7059
|
/**
|
|
6945
7060
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6947
7062
|
*/
|
|
6948
7063
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6949
7064
|
/**
|
|
6950
7065
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6952
7067
|
*/
|
|
6953
7068
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6954
7069
|
/**
|
|
6955
7070
|
* Disallow awaiting non-promise values.
|
|
6956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-await.md
|
|
6957
7072
|
*/
|
|
6958
7073
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7074
|
+
/**
|
|
7075
|
+
* Disallow unnecessary comparisons against boolean literals.
|
|
7076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7077
|
+
*/
|
|
7078
|
+
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
6959
7079
|
/**
|
|
6960
7080
|
* Disallow unnecessary `globalThis` references.
|
|
6961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-global-this.md
|
|
6962
7082
|
*/
|
|
6963
7083
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
6964
7084
|
/**
|
|
6965
7085
|
* Disallow unnecessary nested ternary expressions.
|
|
6966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
6967
7087
|
*/
|
|
6968
7088
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6969
7089
|
/**
|
|
6970
7090
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6972
7092
|
*/
|
|
6973
7093
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6974
7094
|
/**
|
|
6975
7095
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6977
7097
|
*/
|
|
6978
7098
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6979
7099
|
/**
|
|
6980
7100
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
6981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-splice.md
|
|
6982
7102
|
*/
|
|
6983
7103
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
6984
7104
|
/**
|
|
6985
7105
|
* Disallow unreadable array destructuring.
|
|
6986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6987
7107
|
*/
|
|
6988
7108
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
6989
7109
|
/**
|
|
6990
7110
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
6991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
6992
7112
|
*/
|
|
6993
7113
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
6994
7114
|
/**
|
|
6995
7115
|
* Disallow unreadable IIFEs.
|
|
6996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-iife.md
|
|
6997
7117
|
*/
|
|
6998
7118
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6999
7119
|
/**
|
|
7000
7120
|
* Disallow unreadable `new` expressions.
|
|
7001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-new-expression.md
|
|
7002
7122
|
*/
|
|
7003
7123
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
7004
7124
|
/**
|
|
7005
7125
|
* Disallow unreadable object destructuring.
|
|
7006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
7007
7127
|
*/
|
|
7008
7128
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7009
7129
|
/**
|
|
7010
7130
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
7011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
7012
7132
|
*/
|
|
7013
7133
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
7014
7134
|
/**
|
|
7015
7135
|
* Disallow unsafe DOM HTML APIs.
|
|
7016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-dom-html.md
|
|
7017
7137
|
*/
|
|
7018
7138
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
7019
7139
|
/**
|
|
7020
7140
|
* Disallow unsafe values as property keys.
|
|
7021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-property-key.md
|
|
7022
7142
|
*/
|
|
7023
7143
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
7024
7144
|
/**
|
|
7025
7145
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
7026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
7027
7147
|
*/
|
|
7028
7148
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
7029
7149
|
/**
|
|
7030
7150
|
* Disallow ignoring the return value of selected array methods.
|
|
7031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unused-array-method-return.md
|
|
7032
7152
|
*/
|
|
7033
7153
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
7034
7154
|
/**
|
|
7035
7155
|
* Disallow unused object properties.
|
|
7036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unused-properties.md
|
|
7037
7157
|
*/
|
|
7038
7158
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7039
7159
|
/**
|
|
7040
7160
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
7041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-boolean-cast.md
|
|
7042
7162
|
*/
|
|
7043
7163
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
7044
7164
|
/**
|
|
7045
7165
|
* Disallow useless type coercions of values that are already of the target type.
|
|
7046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-coercion.md
|
|
7047
7167
|
*/
|
|
7048
7168
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
7049
7169
|
/**
|
|
7050
7170
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-collection-argument.md
|
|
7052
7172
|
*/
|
|
7053
7173
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7174
|
+
/**
|
|
7175
|
+
* Disallow useless compound assignments such as `x += 0`.
|
|
7176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-compound-assignment.md
|
|
7177
|
+
*/
|
|
7178
|
+
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
7054
7179
|
/**
|
|
7055
7180
|
* Disallow useless concatenation of literals.
|
|
7056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-concat.md
|
|
7057
7182
|
*/
|
|
7058
7183
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
7059
7184
|
/**
|
|
7060
7185
|
* Disallow useless `continue` statements.
|
|
7061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-continue.md
|
|
7062
7187
|
*/
|
|
7063
7188
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
7189
|
+
/**
|
|
7190
|
+
* Disallow unnecessary existence checks before deletion.
|
|
7191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-delete-check.md
|
|
7192
|
+
*/
|
|
7193
|
+
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
7064
7194
|
/**
|
|
7065
7195
|
* Disallow `else` after a statement that exits.
|
|
7066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-else.md
|
|
7067
7197
|
*/
|
|
7068
7198
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7069
7199
|
/**
|
|
7070
7200
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7072
7202
|
*/
|
|
7073
7203
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7074
7204
|
/**
|
|
7075
7205
|
* Disallow useless fallback when spreading in object literals.
|
|
7076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7077
7207
|
*/
|
|
7078
|
-
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<
|
|
7208
|
+
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7079
7209
|
/**
|
|
7080
7210
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7082
7212
|
*/
|
|
7083
7213
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7084
7214
|
/**
|
|
7085
7215
|
* Disallow useless array length check.
|
|
7086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-length-check.md
|
|
7087
7217
|
*/
|
|
7088
7218
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7219
|
+
/**
|
|
7220
|
+
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
7221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-logical-operand.md
|
|
7222
|
+
*/
|
|
7223
|
+
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
7089
7224
|
/**
|
|
7090
7225
|
* Disallow useless overrides of class methods.
|
|
7091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-override.md
|
|
7092
7227
|
*/
|
|
7093
7228
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7094
7229
|
/**
|
|
7095
7230
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7097
7232
|
*/
|
|
7098
7233
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7099
7234
|
/**
|
|
7100
7235
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-recursion.md
|
|
7102
7237
|
*/
|
|
7103
7238
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7104
7239
|
/**
|
|
7105
7240
|
* Disallow unnecessary spread.
|
|
7106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-spread.md
|
|
7107
7242
|
*/
|
|
7108
7243
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7109
7244
|
/**
|
|
7110
7245
|
* Disallow useless case in switch statements.
|
|
7111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-switch-case.md
|
|
7112
7247
|
*/
|
|
7113
7248
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7114
7249
|
/**
|
|
7115
7250
|
* Disallow useless template literal expressions.
|
|
7116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-template-literals.md
|
|
7117
7252
|
*/
|
|
7118
7253
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7119
7254
|
/**
|
|
7120
7255
|
* Disallow useless `undefined`.
|
|
7121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-undefined.md
|
|
7122
7257
|
*/
|
|
7123
7258
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7259
|
+
/**
|
|
7260
|
+
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7262
|
+
*/
|
|
7263
|
+
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7124
7264
|
/**
|
|
7125
7265
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-zero-fractions.md
|
|
7127
7267
|
*/
|
|
7128
7268
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7129
7269
|
/**
|
|
7130
7270
|
* Enforce proper case for numeric literals.
|
|
7131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/number-literal-case.md
|
|
7132
7272
|
*/
|
|
7133
7273
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7134
7274
|
/**
|
|
7135
7275
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/numeric-separators-style.md
|
|
7137
7277
|
*/
|
|
7138
7278
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7139
7279
|
/**
|
|
7140
7280
|
* Require assignment operator shorthand where possible.
|
|
7141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/operator-assignment.md
|
|
7142
7282
|
*/
|
|
7143
7283
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7284
|
+
/**
|
|
7285
|
+
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
7286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
7287
|
+
*/
|
|
7288
|
+
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
7144
7289
|
/**
|
|
7145
7290
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-add-event-listener.md
|
|
7147
7292
|
*/
|
|
7148
7293
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7149
7294
|
/**
|
|
7150
7295
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7152
7297
|
*/
|
|
7153
7298
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7299
|
+
/**
|
|
7300
|
+
* Prefer `AggregateError` when throwing collected errors.
|
|
7301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-aggregate-error.md
|
|
7302
|
+
*/
|
|
7303
|
+
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
7154
7304
|
/**
|
|
7155
7305
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-find.md
|
|
7157
7307
|
*/
|
|
7158
7308
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7159
7309
|
/**
|
|
7160
7310
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7161
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-flat.md
|
|
7162
7312
|
*/
|
|
7163
7313
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7164
7314
|
/**
|
|
7165
7315
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-flat-map.md
|
|
7167
7317
|
*/
|
|
7168
7318
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7319
|
+
/**
|
|
7320
|
+
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
7321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-from-async.md
|
|
7322
|
+
*/
|
|
7323
|
+
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7169
7324
|
/**
|
|
7170
7325
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-from-map.md
|
|
7172
7327
|
*/
|
|
7173
7328
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7174
7329
|
/**
|
|
7175
7330
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-index-of.md
|
|
7177
7332
|
*/
|
|
7178
7333
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7334
|
+
/**
|
|
7335
|
+
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7337
|
+
*/
|
|
7338
|
+
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7179
7339
|
/**
|
|
7180
7340
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-last-methods.md
|
|
7182
7342
|
*/
|
|
7183
7343
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7184
7344
|
/**
|
|
7185
7345
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-slice.md
|
|
7187
7347
|
*/
|
|
7188
7348
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7189
7349
|
/**
|
|
7190
7350
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-some.md
|
|
7192
7352
|
*/
|
|
7193
7353
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7194
7354
|
/**
|
|
7195
7355
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-at.md
|
|
7197
7357
|
*/
|
|
7198
7358
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7199
7359
|
/**
|
|
7200
7360
|
* Prefer `await` over promise chaining.
|
|
7201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-await.md
|
|
7202
7362
|
*/
|
|
7203
7363
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7204
7364
|
/**
|
|
7205
7365
|
* Prefer `BigInt` literals over the constructor.
|
|
7206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-bigint-literals.md
|
|
7207
7367
|
*/
|
|
7208
7368
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7209
7369
|
/**
|
|
7210
7370
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7212
7372
|
*/
|
|
7213
7373
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7374
|
+
/**
|
|
7375
|
+
* Prefer directly returning boolean expressions over `if` statements.
|
|
7376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-boolean-return.md
|
|
7377
|
+
*/
|
|
7378
|
+
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7214
7379
|
/**
|
|
7215
7380
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-class-fields.md
|
|
7217
7382
|
*/
|
|
7218
7383
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7219
7384
|
/**
|
|
7220
7385
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7222
7387
|
*/
|
|
7223
7388
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7224
7389
|
/**
|
|
7225
7390
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-code-point.md
|
|
7227
7392
|
*/
|
|
7228
7393
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7394
|
+
/**
|
|
7395
|
+
* Prefer early continues over whole-loop conditional wrapping.
|
|
7396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-continue.md
|
|
7397
|
+
*/
|
|
7398
|
+
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7229
7399
|
/**
|
|
7230
7400
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-date-now.md
|
|
7232
7402
|
*/
|
|
7233
7403
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7234
7404
|
/**
|
|
7235
7405
|
* Prefer default parameters over reassignment.
|
|
7236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-default-parameters.md
|
|
7237
7407
|
*/
|
|
7238
7408
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7239
7409
|
/**
|
|
7240
7410
|
* Prefer direct iteration over default iterator method calls.
|
|
7241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-direct-iteration.md
|
|
7242
7412
|
*/
|
|
7243
7413
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7244
7414
|
/**
|
|
7245
7415
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dispose.md
|
|
7247
7417
|
*/
|
|
7248
7418
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7249
7419
|
/**
|
|
7250
7420
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-append.md
|
|
7252
7422
|
*/
|
|
7253
7423
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7254
7424
|
/**
|
|
7255
7425
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7257
7427
|
* @deprecated
|
|
7258
7428
|
*/
|
|
7259
7429
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7260
7430
|
/**
|
|
7261
7431
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7263
7433
|
*/
|
|
7264
7434
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
7265
7435
|
/**
|
|
7266
7436
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7268
7438
|
*/
|
|
7269
7439
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7440
|
+
/**
|
|
7441
|
+
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
7442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
7443
|
+
*/
|
|
7444
|
+
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
7270
7445
|
/**
|
|
7271
7446
|
* Prefer `.textContent` over `.innerText`.
|
|
7272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7273
7448
|
*/
|
|
7274
7449
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7275
7450
|
/**
|
|
7276
7451
|
* Prefer early returns over full-function conditional wrapping.
|
|
7277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-early-return.md
|
|
7278
7453
|
*/
|
|
7279
7454
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7280
7455
|
/**
|
|
7281
7456
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-else-if.md
|
|
7283
7458
|
*/
|
|
7284
7459
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7460
|
+
/**
|
|
7461
|
+
* Prefer `Error.isError()` when checking for errors.
|
|
7462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-error-is-error.md
|
|
7463
|
+
*/
|
|
7464
|
+
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
7285
7465
|
/**
|
|
7286
7466
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-event-target.md
|
|
7288
7468
|
*/
|
|
7289
7469
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7290
7470
|
/**
|
|
7291
7471
|
* Prefer `export…from` when re-exporting.
|
|
7292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-export-from.md
|
|
7293
7473
|
*/
|
|
7294
7474
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7475
|
+
/**
|
|
7476
|
+
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7478
|
+
*/
|
|
7479
|
+
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7295
7480
|
/**
|
|
7296
7481
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7298
7483
|
*/
|
|
7299
7484
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7300
7485
|
/**
|
|
7301
7486
|
* Prefer global numeric constants over `Number` static properties.
|
|
7302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-global-number-constants.md
|
|
7303
7488
|
*/
|
|
7304
7489
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7305
7490
|
/**
|
|
7306
7491
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-global-this.md
|
|
7308
7493
|
*/
|
|
7309
7494
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7310
7495
|
/**
|
|
7311
7496
|
* Prefer `.has()` when checking existence.
|
|
7312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-has-check.md
|
|
7313
7498
|
*/
|
|
7314
7499
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7500
|
+
/**
|
|
7501
|
+
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7503
|
+
*/
|
|
7504
|
+
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
7315
7505
|
/**
|
|
7316
7506
|
* Prefer HTTPS over HTTP.
|
|
7317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-https.md
|
|
7318
7508
|
*/
|
|
7319
7509
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
7320
7510
|
/**
|
|
7321
7511
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7323
7513
|
*/
|
|
7324
7514
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7325
7515
|
/**
|
|
7326
7516
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7328
7518
|
*/
|
|
7329
7519
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7330
7520
|
/**
|
|
7331
7521
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-includes.md
|
|
7333
7523
|
*/
|
|
7334
7524
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7335
7525
|
/**
|
|
7336
7526
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7338
7528
|
*/
|
|
7339
7529
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7340
7530
|
/**
|
|
7341
7531
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7343
7533
|
*/
|
|
7344
7534
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7345
7535
|
/**
|
|
7346
7536
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-concat.md
|
|
7348
7538
|
*/
|
|
7349
7539
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7350
7540
|
/**
|
|
7351
7541
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7353
7543
|
*/
|
|
7354
7544
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7355
7545
|
/**
|
|
7356
7546
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7358
7548
|
*/
|
|
7359
7549
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7360
7550
|
/**
|
|
7361
7551
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7363
7553
|
* @deprecated
|
|
7364
7554
|
*/
|
|
7365
7555
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7366
7556
|
/**
|
|
7367
7557
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7369
7559
|
*/
|
|
7370
7560
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7371
7561
|
/**
|
|
7372
7562
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-location-assign.md
|
|
7374
7564
|
*/
|
|
7375
7565
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7376
7566
|
/**
|
|
7377
7567
|
* Prefer using a logical operator over a ternary.
|
|
7378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7379
7569
|
*/
|
|
7380
7570
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7381
7571
|
/**
|
|
7382
7572
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-map-from-entries.md
|
|
7384
7574
|
*/
|
|
7385
7575
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
7386
7576
|
/**
|
|
7387
7577
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-abs.md
|
|
7389
7579
|
*/
|
|
7390
7580
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7581
|
+
/**
|
|
7582
|
+
* Prefer `Math` constants over their approximate numeric values.
|
|
7583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-constants.md
|
|
7584
|
+
*/
|
|
7585
|
+
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
7391
7586
|
/**
|
|
7392
7587
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-min-max.md
|
|
7394
7589
|
*/
|
|
7395
7590
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7396
7591
|
/**
|
|
7397
7592
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
7398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-trunc.md
|
|
7399
7594
|
*/
|
|
7400
7595
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7401
7596
|
/**
|
|
7402
7597
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7404
7599
|
*/
|
|
7405
7600
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7406
7601
|
/**
|
|
7407
7602
|
* Prefer modern DOM APIs.
|
|
7408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7409
7604
|
*/
|
|
7410
7605
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7411
7606
|
/**
|
|
7412
7607
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7414
7609
|
*/
|
|
7415
7610
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7416
7611
|
/**
|
|
7417
7612
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-module.md
|
|
7419
7614
|
*/
|
|
7420
7615
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7421
7616
|
/**
|
|
7422
7617
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7424
7619
|
*/
|
|
7425
7620
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7426
7621
|
/**
|
|
7427
7622
|
* Prefer negative index over `.length - index` when possible.
|
|
7428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-negative-index.md
|
|
7429
7624
|
*/
|
|
7430
7625
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7431
7626
|
/**
|
|
7432
7627
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-node-protocol.md
|
|
7434
7629
|
*/
|
|
7435
7630
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7436
7631
|
/**
|
|
7437
7632
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-coercion.md
|
|
7439
7634
|
*/
|
|
7440
7635
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7441
7636
|
/**
|
|
7442
7637
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7444
7639
|
*/
|
|
7445
7640
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7446
7641
|
/**
|
|
7447
7642
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-properties.md
|
|
7449
7644
|
*/
|
|
7450
7645
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7451
7646
|
/**
|
|
7452
7647
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-define-properties.md
|
|
7454
7649
|
*/
|
|
7455
7650
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7456
7651
|
/**
|
|
7457
7652
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
7458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7459
7654
|
*/
|
|
7460
7655
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7461
7656
|
/**
|
|
7462
7657
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-from-entries.md
|
|
7464
7659
|
*/
|
|
7465
7660
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7466
7661
|
/**
|
|
7467
7662
|
* Prefer the most specific `Object` iterable method.
|
|
7468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7469
7664
|
*/
|
|
7470
7665
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7666
|
+
/**
|
|
7667
|
+
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-observer-apis.md
|
|
7669
|
+
*/
|
|
7670
|
+
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
7471
7671
|
/**
|
|
7472
7672
|
* Prefer omitting the `catch` binding parameter.
|
|
7473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7474
7674
|
*/
|
|
7475
7675
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7476
7676
|
/**
|
|
7477
7677
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-path2d.md
|
|
7479
7679
|
*/
|
|
7480
7680
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
7481
7681
|
/**
|
|
7482
7682
|
* Prefer private class fields over the underscore-prefix convention.
|
|
7483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-private-class-fields.md
|
|
7484
7684
|
*/
|
|
7485
7685
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
7686
|
+
/**
|
|
7687
|
+
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
7688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-promise-try.md
|
|
7689
|
+
*/
|
|
7690
|
+
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
7691
|
+
/**
|
|
7692
|
+
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
7693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
7694
|
+
*/
|
|
7695
|
+
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
7486
7696
|
/**
|
|
7487
7697
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-prototype-methods.md
|
|
7489
7699
|
*/
|
|
7490
7700
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7491
7701
|
/**
|
|
7492
7702
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-query-selector.md
|
|
7494
7704
|
*/
|
|
7495
7705
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7496
7706
|
/**
|
|
7497
7707
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-queue-microtask.md
|
|
7499
7709
|
*/
|
|
7500
7710
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7501
7711
|
/**
|
|
7502
7712
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-reflect-apply.md
|
|
7504
7714
|
*/
|
|
7505
7715
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7716
|
+
/**
|
|
7717
|
+
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
7718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-regexp-escape.md
|
|
7719
|
+
*/
|
|
7720
|
+
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
7506
7721
|
/**
|
|
7507
7722
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
7508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-regexp-test.md
|
|
7509
7724
|
*/
|
|
7510
7725
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7511
7726
|
/**
|
|
7512
7727
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-response-static-json.md
|
|
7514
7729
|
*/
|
|
7515
7730
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7516
7731
|
/**
|
|
7517
7732
|
* Prefer `:scope` when using element query selector methods.
|
|
7518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-scoped-selector.md
|
|
7519
7734
|
*/
|
|
7520
7735
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7521
7736
|
/**
|
|
7522
7737
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-has.md
|
|
7524
7739
|
*/
|
|
7525
7740
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7741
|
+
/**
|
|
7742
|
+
* Prefer `Set` methods for Set operations.
|
|
7743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-methods.md
|
|
7744
|
+
*/
|
|
7745
|
+
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
7526
7746
|
/**
|
|
7527
7747
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-size.md
|
|
7529
7749
|
*/
|
|
7530
7750
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7531
7751
|
/**
|
|
7532
7752
|
* Prefer arrow function properties over methods with a single return.
|
|
7533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7534
7754
|
*/
|
|
7535
7755
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
7536
7756
|
/**
|
|
7537
7757
|
* Prefer simple conditions first in logical expressions.
|
|
7538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7539
7759
|
*/
|
|
7540
7760
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7541
7761
|
/**
|
|
7542
7762
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
7543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7544
7764
|
*/
|
|
7545
7765
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7546
7766
|
/**
|
|
7547
7767
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7549
7769
|
*/
|
|
7550
7770
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7551
7771
|
/**
|
|
7552
7772
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-call.md
|
|
7554
7774
|
*/
|
|
7555
7775
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7556
7776
|
/**
|
|
7557
7777
|
* Prefer a single object destructuring declaration per local const source.
|
|
7558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7559
7779
|
*/
|
|
7560
7780
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7781
|
+
/**
|
|
7782
|
+
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
7783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-replace.md
|
|
7784
|
+
*/
|
|
7785
|
+
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
7561
7786
|
/**
|
|
7562
7787
|
* Prefer declaring variables in the smallest possible scope.
|
|
7563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-smaller-scope.md
|
|
7564
7789
|
*/
|
|
7565
7790
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
7566
7791
|
/**
|
|
7567
7792
|
* Prefer `String#split()` with a limit.
|
|
7568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-split-limit.md
|
|
7569
7794
|
*/
|
|
7570
7795
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
7571
7796
|
/**
|
|
7572
7797
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
7573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-spread.md
|
|
7574
7799
|
*/
|
|
7575
7800
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7576
7801
|
/**
|
|
7577
7802
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-match-all.md
|
|
7579
7804
|
*/
|
|
7580
7805
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7581
7806
|
/**
|
|
7582
7807
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
7583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
7584
7809
|
*/
|
|
7585
7810
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7586
7811
|
/**
|
|
7587
7812
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-raw.md
|
|
7589
7814
|
*/
|
|
7590
7815
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7591
7816
|
/**
|
|
7592
7817
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
7593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-repeat.md
|
|
7594
7819
|
*/
|
|
7595
7820
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
7596
7821
|
/**
|
|
7597
7822
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
7598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-replace-all.md
|
|
7599
7824
|
*/
|
|
7600
7825
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7601
7826
|
/**
|
|
7602
7827
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-slice.md
|
|
7604
7829
|
*/
|
|
7605
7830
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7606
7831
|
/**
|
|
7607
7832
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
7608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7609
7834
|
*/
|
|
7610
7835
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7611
7836
|
/**
|
|
7612
7837
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7614
7839
|
*/
|
|
7615
7840
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7616
7841
|
/**
|
|
7617
7842
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-structured-clone.md
|
|
7619
7844
|
*/
|
|
7620
7845
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7621
7846
|
/**
|
|
7622
7847
|
* Prefer `switch` over multiple `else-if`.
|
|
7623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-switch.md
|
|
7624
7849
|
*/
|
|
7625
7850
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7626
7851
|
/**
|
|
7627
7852
|
* Prefer `Temporal` over `Date`.
|
|
7628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-temporal.md
|
|
7629
7854
|
*/
|
|
7630
7855
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
7631
7856
|
/**
|
|
7632
|
-
* Prefer ternary expressions over simple `if
|
|
7633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7857
|
+
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
7858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-ternary.md
|
|
7634
7859
|
*/
|
|
7635
7860
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7861
|
+
/**
|
|
7862
|
+
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
7863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-toggle-attribute.md
|
|
7864
|
+
*/
|
|
7865
|
+
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
7636
7866
|
/**
|
|
7637
7867
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-top-level-await.md
|
|
7639
7869
|
*/
|
|
7640
7870
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7641
7871
|
/**
|
|
7642
7872
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-type-error.md
|
|
7644
7874
|
*/
|
|
7645
7875
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7646
7876
|
/**
|
|
7647
|
-
* Require type literals to be last in union
|
|
7648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7877
|
+
* Require type literals to be last in union types.
|
|
7878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-type-literal-last.md
|
|
7649
7879
|
*/
|
|
7650
7880
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
7651
7881
|
/**
|
|
7652
7882
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
7653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-uint8array-base64.md
|
|
7654
7884
|
*/
|
|
7655
7885
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
7886
|
+
/**
|
|
7887
|
+
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
7888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-unary-minus.md
|
|
7889
|
+
*/
|
|
7890
|
+
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
7656
7891
|
/**
|
|
7657
7892
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
7658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
7659
7894
|
*/
|
|
7660
7895
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
7896
|
+
/**
|
|
7897
|
+
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
7898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-can-parse.md
|
|
7899
|
+
*/
|
|
7900
|
+
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
7661
7901
|
/**
|
|
7662
7902
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
7663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-href.md
|
|
7664
7904
|
*/
|
|
7665
7905
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
7666
7906
|
/**
|
|
7667
|
-
*
|
|
7668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7907
|
+
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
7908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-search-parameters.md
|
|
7909
|
+
*/
|
|
7910
|
+
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
7911
|
+
/**
|
|
7912
|
+
* Prefer putting the condition in the while statement.
|
|
7913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-while-loop-condition.md
|
|
7669
7914
|
*/
|
|
7670
|
-
'unicorn/
|
|
7915
|
+
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
7916
|
+
/**
|
|
7917
|
+
* Renamed to `unicorn/name-replacements`.
|
|
7918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
7919
|
+
* @deprecated
|
|
7920
|
+
*/
|
|
7921
|
+
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
7671
7922
|
/**
|
|
7672
7923
|
* Enforce consistent relative URL style.
|
|
7673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/relative-url-style.md
|
|
7674
7925
|
*/
|
|
7675
7926
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7676
7927
|
/**
|
|
7677
7928
|
* Enforce using the separator argument with `Array#join()`.
|
|
7678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-array-join-separator.md
|
|
7679
7930
|
*/
|
|
7680
7931
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7681
7932
|
/**
|
|
7682
7933
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
7683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-array-sort-compare.md
|
|
7684
7935
|
*/
|
|
7685
7936
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
7686
7937
|
/**
|
|
7687
7938
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
7688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-css-escape.md
|
|
7689
7940
|
*/
|
|
7690
7941
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7691
7942
|
/**
|
|
7692
7943
|
* Require non-empty module attributes for imports and exports
|
|
7693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-module-attributes.md
|
|
7694
7945
|
*/
|
|
7695
7946
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7696
7947
|
/**
|
|
7697
7948
|
* Require non-empty specifier list in import and export statements.
|
|
7698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-module-specifiers.md
|
|
7699
7950
|
*/
|
|
7700
7951
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7701
7952
|
/**
|
|
7702
7953
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7704
7955
|
*/
|
|
7705
7956
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7706
7957
|
/**
|
|
7707
7958
|
* Require passive event listeners for high-frequency events.
|
|
7708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-passive-events.md
|
|
7709
7960
|
*/
|
|
7710
7961
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7711
7962
|
/**
|
|
7712
7963
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-post-message-target-origin.md
|
|
7714
7965
|
*/
|
|
7715
7966
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7716
7967
|
/**
|
|
7717
7968
|
* Require boolean-returning Proxy traps to return booleans.
|
|
7718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
7719
7970
|
*/
|
|
7720
7971
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7721
7972
|
/**
|
|
7722
7973
|
* Enforce better string content.
|
|
7723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/string-content.md
|
|
7724
7975
|
*/
|
|
7725
7976
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7726
7977
|
/**
|
|
7727
7978
|
* Enforce consistent brace style for `case` clauses.
|
|
7728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/switch-case-braces.md
|
|
7729
7980
|
*/
|
|
7730
7981
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7731
7982
|
/**
|
|
7732
7983
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/switch-case-break-position.md
|
|
7734
7985
|
*/
|
|
7735
7986
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7736
7987
|
/**
|
|
7737
7988
|
* Fix whitespace-insensitive template indentation.
|
|
7738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/template-indent.md
|
|
7739
7990
|
*/
|
|
7740
7991
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7741
7992
|
/**
|
|
7742
7993
|
* Enforce consistent case for text encoding identifiers.
|
|
7743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7744
7995
|
*/
|
|
7745
7996
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7746
7997
|
/**
|
|
7747
7998
|
* Require `new` when creating an error.
|
|
7748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/throw-new-error.md
|
|
7749
8000
|
*/
|
|
7750
8001
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7751
8002
|
/**
|
|
7752
8003
|
* Limit the complexity of `try` blocks.
|
|
7753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/try-complexity.md
|
|
7754
8005
|
*/
|
|
7755
8006
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7756
8007
|
/**
|
|
@@ -9581,6 +9832,11 @@ interface RuleOptions {
|
|
|
9581
9832
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
|
|
9582
9833
|
*/
|
|
9583
9834
|
'yml/no-tab-indent'?: Linter.RuleEntry<[]>;
|
|
9835
|
+
/**
|
|
9836
|
+
* disallow trailing whitespace at the end of lines
|
|
9837
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-spaces.html
|
|
9838
|
+
*/
|
|
9839
|
+
'yml/no-trailing-spaces'?: Linter.RuleEntry<YmlNoTrailingSpaces>;
|
|
9584
9840
|
/**
|
|
9585
9841
|
* disallow trailing zeros for floats
|
|
9586
9842
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
|
|
@@ -11007,7 +11263,7 @@ type ImportXNoAbsolutePath = [] | [{
|
|
|
11007
11263
|
commonjs?: boolean;
|
|
11008
11264
|
amd?: boolean;
|
|
11009
11265
|
esmodule?: boolean;
|
|
11010
|
-
ignore?: [
|
|
11266
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
11011
11267
|
}]; // ----- import-x/no-anonymous-default-export -----
|
|
11012
11268
|
type ImportXNoAnonymousDefaultExport = [] | [{
|
|
11013
11269
|
allowArray?: boolean;
|
|
@@ -11028,7 +11284,7 @@ type ImportXNoCycle = [] | [{
|
|
|
11028
11284
|
commonjs?: boolean;
|
|
11029
11285
|
amd?: boolean;
|
|
11030
11286
|
esmodule?: boolean;
|
|
11031
|
-
ignore?: [
|
|
11287
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
11032
11288
|
maxDepth?: (number | "∞");
|
|
11033
11289
|
ignoreExternal?: boolean;
|
|
11034
11290
|
allowUnsafeDynamicCyclicDependency?: boolean;
|
|
@@ -11069,13 +11325,13 @@ type ImportXNoRelativePackages = [] | [{
|
|
|
11069
11325
|
commonjs?: boolean;
|
|
11070
11326
|
amd?: boolean;
|
|
11071
11327
|
esmodule?: boolean;
|
|
11072
|
-
ignore?: [
|
|
11328
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
11073
11329
|
}]; // ----- import-x/no-relative-parent-imports -----
|
|
11074
11330
|
type ImportXNoRelativeParentImports = [] | [{
|
|
11075
11331
|
commonjs?: boolean;
|
|
11076
11332
|
amd?: boolean;
|
|
11077
11333
|
esmodule?: boolean;
|
|
11078
|
-
ignore?: [
|
|
11334
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
11079
11335
|
}]; // ----- import-x/no-rename-default -----
|
|
11080
11336
|
type ImportXNoRenameDefault = [] | [{
|
|
11081
11337
|
commonjs?: boolean;
|
|
@@ -11105,7 +11361,7 @@ type ImportXNoUnresolved = [] | [{
|
|
|
11105
11361
|
commonjs?: boolean;
|
|
11106
11362
|
amd?: boolean;
|
|
11107
11363
|
esmodule?: boolean;
|
|
11108
|
-
ignore?: [
|
|
11364
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
11109
11365
|
caseSensitive?: boolean;
|
|
11110
11366
|
caseSensitiveStrict?: boolean;
|
|
11111
11367
|
}]; // ----- import-x/no-unused-modules -----
|
|
@@ -13236,7 +13492,6 @@ type OxfmtOxfmt = [] | [{
|
|
|
13236
13492
|
embeddedLanguageFormatting?: ("auto" | "off");
|
|
13237
13493
|
endOfLine?: ("lf" | "crlf" | "cr");
|
|
13238
13494
|
htmlWhitespaceSensitivity?: ("css" | "ignore" | "strict");
|
|
13239
|
-
ignorePatterns?: string[];
|
|
13240
13495
|
insertFinalNewline?: boolean;
|
|
13241
13496
|
jsdoc?: (boolean | {
|
|
13242
13497
|
addDefaultToDescription?: boolean;
|
|
@@ -17006,6 +17261,7 @@ type UnicornConsistentBooleanName = [] | [{
|
|
|
17006
17261
|
prefixes?: {
|
|
17007
17262
|
[k: string]: boolean | undefined;
|
|
17008
17263
|
};
|
|
17264
|
+
ignore?: unknown[];
|
|
17009
17265
|
}]; // ----- unicorn/consistent-class-member-order -----
|
|
17010
17266
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
17011
17267
|
order?: [("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method")];
|
|
@@ -17025,7 +17281,8 @@ interface _UnicornConsistentCompoundWords_Replacements {
|
|
|
17025
17281
|
}
|
|
17026
17282
|
interface _UnicornConsistentCompoundWords_TrueObject {
|
|
17027
17283
|
[k: string]: true | undefined;
|
|
17028
|
-
} // ----- unicorn/consistent-
|
|
17284
|
+
} // ----- unicorn/consistent-conditional-object-spread -----
|
|
17285
|
+
type UnicornConsistentConditionalObjectSpread = [] | [("logical" | "ternary")]; // ----- unicorn/consistent-export-decorator-position -----
|
|
17029
17286
|
type UnicornConsistentExportDecoratorPosition = [] | [("above" | "before" | "after")]; // ----- unicorn/consistent-function-scoping -----
|
|
17030
17287
|
type UnicornConsistentFunctionScoping = [] | [{
|
|
17031
17288
|
checkArrowFunctions?: boolean;
|
|
@@ -17039,7 +17296,11 @@ type UnicornConsistentFunctionStyle = [] | [{
|
|
|
17039
17296
|
reassignedVariables?: ("function-expression" | "arrow-function" | "ignore");
|
|
17040
17297
|
typedVariables?: ("function-expression" | "arrow-function" | "ignore");
|
|
17041
17298
|
}]; // ----- unicorn/consistent-json-file-read -----
|
|
17042
|
-
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/
|
|
17299
|
+
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/default-export-style -----
|
|
17300
|
+
type UnicornDefaultExportStyle = [] | [{
|
|
17301
|
+
functions?: ("inline" | "separate" | "ignore");
|
|
17302
|
+
classes?: ("inline" | "separate" | "ignore");
|
|
17303
|
+
}]; // ----- unicorn/dom-node-dataset -----
|
|
17043
17304
|
type UnicornDomNodeDataset = [] | [{
|
|
17044
17305
|
preferAttributes?: boolean;
|
|
17045
17306
|
}]; // ----- unicorn/escape-case -----
|
|
@@ -17108,7 +17369,30 @@ type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
|
17108
17369
|
}] | ["never"]) & unknown[]); // ----- unicorn/max-nested-calls -----
|
|
17109
17370
|
type UnicornMaxNestedCalls = [] | [{
|
|
17110
17371
|
max?: number;
|
|
17111
|
-
}]; // ----- unicorn/
|
|
17372
|
+
}]; // ----- unicorn/name-replacements -----
|
|
17373
|
+
type UnicornNameReplacements = [] | [{
|
|
17374
|
+
checkProperties?: boolean;
|
|
17375
|
+
checkVariables?: boolean;
|
|
17376
|
+
checkDefaultAndNamespaceImports?: (boolean | string);
|
|
17377
|
+
checkShorthandImports?: (boolean | string);
|
|
17378
|
+
checkShorthandProperties?: boolean;
|
|
17379
|
+
checkFilenames?: boolean;
|
|
17380
|
+
extendDefaultReplacements?: boolean;
|
|
17381
|
+
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
17382
|
+
extendDefaultAllowList?: boolean;
|
|
17383
|
+
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
17384
|
+
ignore?: unknown[];
|
|
17385
|
+
}];
|
|
17386
|
+
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
17387
|
+
interface _UnicornNameReplacements_NameReplacements {
|
|
17388
|
+
[k: string]: _UnicornNameReplacementsReplacements | undefined;
|
|
17389
|
+
}
|
|
17390
|
+
interface _UnicornNameReplacements_BooleanObject {
|
|
17391
|
+
[k: string]: boolean | undefined;
|
|
17392
|
+
}
|
|
17393
|
+
interface _UnicornNameReplacements_BooleanObject {
|
|
17394
|
+
[k: string]: boolean | undefined;
|
|
17395
|
+
} // ----- unicorn/no-array-callback-reference -----
|
|
17112
17396
|
type UnicornNoArrayCallbackReference = [] | [{
|
|
17113
17397
|
ignore?: string[];
|
|
17114
17398
|
}]; // ----- unicorn/no-array-reduce -----
|
|
@@ -17161,9 +17445,6 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
17161
17445
|
}]; // ----- unicorn/no-unreadable-array-destructuring -----
|
|
17162
17446
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
17163
17447
|
maximumIgnoredElements?: number;
|
|
17164
|
-
}]; // ----- unicorn/no-useless-fallback-in-spread -----
|
|
17165
|
-
type UnicornNoUselessFallbackInSpread = [] | [{
|
|
17166
|
-
checkTernary?: boolean;
|
|
17167
17448
|
}]; // ----- unicorn/no-useless-undefined -----
|
|
17168
17449
|
type UnicornNoUselessUndefined = [] | [{
|
|
17169
17450
|
checkArguments?: boolean;
|
|
@@ -17209,6 +17490,9 @@ type UnicornPreferArrayFlat = [] | [{
|
|
|
17209
17490
|
type UnicornPreferAt = [] | [{
|
|
17210
17491
|
getLastElementFunctions?: unknown[];
|
|
17211
17492
|
checkAllIndexAccess?: boolean;
|
|
17493
|
+
}]; // ----- unicorn/prefer-continue -----
|
|
17494
|
+
type UnicornPreferContinue = [] | [{
|
|
17495
|
+
maximumStatements?: number;
|
|
17212
17496
|
}]; // ----- unicorn/prefer-early-return -----
|
|
17213
17497
|
type UnicornPreferEarlyReturn = [] | [{
|
|
17214
17498
|
maximumStatements?: number;
|
|
@@ -17220,6 +17504,7 @@ type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
|
17220
17504
|
minimumComparisons?: number;
|
|
17221
17505
|
}]; // ----- unicorn/prefer-minimal-ternary -----
|
|
17222
17506
|
type UnicornPreferMinimalTernary = [] | [{
|
|
17507
|
+
checkVaryingCallee?: boolean;
|
|
17223
17508
|
checkComputedMemberAccess?: boolean;
|
|
17224
17509
|
}]; // ----- unicorn/prefer-number-properties -----
|
|
17225
17510
|
type UnicornPreferNumberProperties = [] | [{
|
|
@@ -17257,30 +17542,7 @@ type UnicornPreferTemporal = [] | [{
|
|
|
17257
17542
|
checkReferences?: boolean;
|
|
17258
17543
|
checkMethods?: boolean;
|
|
17259
17544
|
}]; // ----- unicorn/prefer-ternary -----
|
|
17260
|
-
type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/
|
|
17261
|
-
type UnicornPreventAbbreviations = [] | [{
|
|
17262
|
-
checkProperties?: boolean;
|
|
17263
|
-
checkVariables?: boolean;
|
|
17264
|
-
checkDefaultAndNamespaceImports?: (boolean | string);
|
|
17265
|
-
checkShorthandImports?: (boolean | string);
|
|
17266
|
-
checkShorthandProperties?: boolean;
|
|
17267
|
-
checkFilenames?: boolean;
|
|
17268
|
-
extendDefaultReplacements?: boolean;
|
|
17269
|
-
replacements?: _UnicornPreventAbbreviations_Abbreviations;
|
|
17270
|
-
extendDefaultAllowList?: boolean;
|
|
17271
|
-
allowList?: _UnicornPreventAbbreviations_BooleanObject;
|
|
17272
|
-
ignore?: unknown[];
|
|
17273
|
-
}];
|
|
17274
|
-
type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined;
|
|
17275
|
-
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
17276
|
-
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined;
|
|
17277
|
-
}
|
|
17278
|
-
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
17279
|
-
[k: string]: boolean | undefined;
|
|
17280
|
-
}
|
|
17281
|
-
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
17282
|
-
[k: string]: boolean | undefined;
|
|
17283
|
-
} // ----- unicorn/relative-url-style -----
|
|
17545
|
+
type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/relative-url-style -----
|
|
17284
17546
|
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/require-css-escape -----
|
|
17285
17547
|
type UnicornRequireCssEscape = [] | [{
|
|
17286
17548
|
checkAllSelectors?: boolean;
|
|
@@ -18583,6 +18845,10 @@ type YmlNoMultipleEmptyLines = [] | [{
|
|
|
18583
18845
|
max: number;
|
|
18584
18846
|
maxEOF?: number;
|
|
18585
18847
|
maxBOF?: number;
|
|
18848
|
+
}]; // ----- yml/no-trailing-spaces -----
|
|
18849
|
+
type YmlNoTrailingSpaces = [] | [{
|
|
18850
|
+
skipBlankLines?: boolean;
|
|
18851
|
+
ignoreComments?: boolean;
|
|
18586
18852
|
}]; // ----- yml/plain-scalar -----
|
|
18587
18853
|
type YmlPlainScalar = [] | [("always" | "never")] | [("always" | "never"), {
|
|
18588
18854
|
ignorePatterns?: string[];
|