@shayanthenerd/eslint-config 0.26.2 → 0.26.3
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/README.md +17 -17
- package/dist/rules/unicorn.mjs +8 -0
- package/dist/types/eslint-schema.d.mts +461 -372
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -25,40 +25,40 @@ ESLint configuration for enforcing best practices and maintaining a consistent c
|
|
|
25
25
|
|
|
26
26
|
## Plugin Support
|
|
27
27
|
Legend:
|
|
28
|
-
- ✅ Enabled by default
|
|
29
|
-
-
|
|
30
|
-
-
|
|
28
|
+
- ✅ — **Enabled** by default
|
|
29
|
+
- ⚙️ — **Opt-in** (requires manual configuration)
|
|
30
|
+
- 🔍 — [**Automatically detected**](#automatic-dependency-detection) (based on project dependencies)
|
|
31
31
|
|
|
32
32
|
| Category | Activation |
|
|
33
33
|
| :---------------------------------------------------------------------------------------------------- | :--------: |
|
|
34
34
|
| **Languages** | |
|
|
35
35
|
| [JavaScript][eslint] | ✅ |
|
|
36
|
-
| [TypeScript][plugin-ts] |
|
|
36
|
+
| [TypeScript][plugin-ts] | 🔍 |
|
|
37
37
|
| [Markdown][plugin-md] | ✅ |
|
|
38
|
-
| [HTML][plugin-html] |
|
|
39
|
-
| [CSS][plugin-css] |
|
|
38
|
+
| [HTML][plugin-html] | ⚙️ |
|
|
39
|
+
| [CSS][plugin-css] | ⚙️ |
|
|
40
40
|
| **Formatting** | |
|
|
41
41
|
| [Stylistic][plugin-stylistic] | ✅ |
|
|
42
42
|
| [Perfectionist][plugin-perfectionist] | ✅ |
|
|
43
43
|
| **Frameworks & Libraries** | |
|
|
44
|
-
| [Astro][plugin-astro] ([jsx-accessibility][plugin-jsx-a11y]) |
|
|
45
|
-
| [React][plugin-react] ([jsx-accessibility][plugin-jsx-a11y], [@html-eslint/react][plugin-html-react]) |
|
|
46
|
-
| [Next][plugin-next] |
|
|
47
|
-
| [Vue & Nuxt][plugin-vue] ([vue-accessibility][plugin-vue-a11y]) |
|
|
48
|
-
| [Tailwind][plugin-tailwind] |
|
|
49
|
-
| [Zod & Zod Mini][plugin-zod] |
|
|
44
|
+
| [Astro][plugin-astro] ([jsx-accessibility][plugin-jsx-a11y]) | 🔍 |
|
|
45
|
+
| [React][plugin-react] ([jsx-accessibility][plugin-jsx-a11y], [@html-eslint/react][plugin-html-react]) | 🔍 |
|
|
46
|
+
| [Next][plugin-next] | 🔍 |
|
|
47
|
+
| [Vue & Nuxt][plugin-vue] ([vue-accessibility][plugin-vue-a11y]) | 🔍 |
|
|
48
|
+
| [Tailwind][plugin-tailwind] | ⚙️ |
|
|
49
|
+
| [Zod & Zod Mini][plugin-zod] | 🔍 |
|
|
50
50
|
| **Testing Tools** | |
|
|
51
|
-
| [Storybook][plugin-storybook] |
|
|
52
|
-
| [Vitest][plugin-vitest] |
|
|
53
|
-
| [Cypress][plugin-cypress] |
|
|
54
|
-
| [Playwright][plugin-playwright] |
|
|
51
|
+
| [Storybook][plugin-storybook] | 🔍 |
|
|
52
|
+
| [Vitest][plugin-vitest] | 🔍 |
|
|
53
|
+
| [Cypress][plugin-cypress] | 🔍 |
|
|
54
|
+
| [Playwright][plugin-playwright] | 🔍 |
|
|
55
55
|
| **Miscellaneous** | |
|
|
56
56
|
| [_package.json_][plugin-package-json] | ✅ |
|
|
57
57
|
| [Node][plugin-n] | ✅ |
|
|
58
58
|
| [Promises][plugin-promise] | ✅ |
|
|
59
59
|
| [Imports][plugin-import-x] | ✅ |
|
|
60
60
|
| [Unicorn][plugin-unicorn] | ✅ |
|
|
61
|
-
| [Baseline][plugin-baseline] |
|
|
61
|
+
| [Baseline][plugin-baseline] | 🔍 |
|
|
62
62
|
|
|
63
63
|
## Installation and Configuration
|
|
64
64
|
1. Install the package and ESLint as dev dependencies:
|
package/dist/rules/unicorn.mjs
CHANGED
|
@@ -33,6 +33,7 @@ const unicornRules = {
|
|
|
33
33
|
"unicorn/no-array-from-fill": "warn",
|
|
34
34
|
"unicorn/no-array-method-this-argument": "warn",
|
|
35
35
|
"unicorn/no-array-sort-for-min-max": "warn",
|
|
36
|
+
"unicorn/no-async-promise-finally": "warn",
|
|
36
37
|
"unicorn/no-await-expression-member": "warn",
|
|
37
38
|
"unicorn/no-await-in-promise-methods": "error",
|
|
38
39
|
"unicorn/no-blob-to-file": "warn",
|
|
@@ -91,6 +92,7 @@ const unicornRules = {
|
|
|
91
92
|
"unicorn/no-unnecessary-array-flat-depth": "warn",
|
|
92
93
|
"unicorn/no-unnecessary-array-splice-count": "warn",
|
|
93
94
|
"unicorn/no-unnecessary-boolean-comparison": "warn",
|
|
95
|
+
"unicorn/no-unnecessary-fetch-options": "warn",
|
|
94
96
|
"unicorn/no-unnecessary-global-this": "warn",
|
|
95
97
|
"unicorn/no-unnecessary-nested-ternary": "warn",
|
|
96
98
|
"unicorn/no-unnecessary-polyfills": "warn",
|
|
@@ -101,6 +103,7 @@ const unicornRules = {
|
|
|
101
103
|
"unicorn/no-unreadable-iife": "warn",
|
|
102
104
|
"unicorn/no-unreadable-new-expression": "warn",
|
|
103
105
|
"unicorn/no-unsafe-buffer-conversion": "warn",
|
|
106
|
+
"unicorn/no-unsafe-promise-all-settled-values": "error",
|
|
104
107
|
"unicorn/no-unsafe-property-key": "error",
|
|
105
108
|
"unicorn/no-unused-array-method-return": "warn",
|
|
106
109
|
"unicorn/no-unused-properties": "warn",
|
|
@@ -126,6 +129,7 @@ const unicornRules = {
|
|
|
126
129
|
"unicorn/no-zero-fractions": "warn",
|
|
127
130
|
"unicorn/number-literal-case": "warn",
|
|
128
131
|
"unicorn/numeric-separators-style": "warn",
|
|
132
|
+
"unicorn/prefer-abort-signal-any": "warn",
|
|
129
133
|
"unicorn/prefer-abort-signal-timeout": "warn",
|
|
130
134
|
"unicorn/prefer-add-event-listener": "warn",
|
|
131
135
|
"unicorn/prefer-add-event-listener-options": "warn",
|
|
@@ -142,6 +146,7 @@ const unicornRules = {
|
|
|
142
146
|
"unicorn/prefer-at": "warn",
|
|
143
147
|
"unicorn/prefer-bigint-literals": "warn",
|
|
144
148
|
"unicorn/prefer-blob-reading-methods": "warn",
|
|
149
|
+
"unicorn/prefer-block-statement-over-iife": "warn",
|
|
145
150
|
"unicorn/prefer-boolean-return": "warn",
|
|
146
151
|
"unicorn/prefer-class-fields": "warn",
|
|
147
152
|
"unicorn/prefer-classlist-toggle": "warn",
|
|
@@ -161,6 +166,7 @@ const unicornRules = {
|
|
|
161
166
|
"unicorn/prefer-flat-math-min-max": "warn",
|
|
162
167
|
"unicorn/prefer-get-or-insert-computed": "warn",
|
|
163
168
|
"unicorn/prefer-global-number-constants": "warn",
|
|
169
|
+
"unicorn/prefer-group-by": "warn",
|
|
164
170
|
"unicorn/prefer-has-check": "warn",
|
|
165
171
|
"unicorn/prefer-hoisting-branch-code": "warn",
|
|
166
172
|
"unicorn/prefer-https": "warn",
|
|
@@ -169,6 +175,7 @@ const unicornRules = {
|
|
|
169
175
|
"unicorn/prefer-includes": "warn",
|
|
170
176
|
"unicorn/prefer-iterable-in-constructor": "warn",
|
|
171
177
|
"unicorn/prefer-iterator-concat": "warn",
|
|
178
|
+
"unicorn/prefer-iterator-helpers": "warn",
|
|
172
179
|
"unicorn/prefer-iterator-to-array": "warn",
|
|
173
180
|
"unicorn/prefer-iterator-to-array-at-end": "warn",
|
|
174
181
|
"unicorn/prefer-keyboard-event-key": "error",
|
|
@@ -208,6 +215,7 @@ const unicornRules = {
|
|
|
208
215
|
"unicorn/prefer-set-size": "warn",
|
|
209
216
|
"unicorn/prefer-simple-condition-first": "warn",
|
|
210
217
|
"unicorn/prefer-simple-sort-comparator": "warn",
|
|
218
|
+
"unicorn/prefer-simplified-conditions": "warn",
|
|
211
219
|
"unicorn/prefer-single-array-predicate": "warn",
|
|
212
220
|
"unicorn/prefer-single-call": "warn",
|
|
213
221
|
"unicorn/prefer-single-object-destructuring": "warn",
|