@infernodesign/eslint-config 1.24.0 → 1.26.0
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 +3 -4
- package/dist/cli.js +21 -26
- package/dist/index.d.ts +219 -339
- package/dist/index.js +50 -72
- package/package.json +28 -33
package/README.md
CHANGED
|
@@ -176,14 +176,14 @@ export default config( {
|
|
|
176
176
|
|
|
177
177
|
// Customize the stylistic rules
|
|
178
178
|
stylistic: {
|
|
179
|
-
indent: 2, // 4, or 'tab'
|
|
180
|
-
quotes: 'single', // or 'double'
|
|
181
179
|
blockSpacing: false,
|
|
182
180
|
braceStyle: '1tbs',
|
|
183
181
|
commaDangle: 'always-multiline',
|
|
184
182
|
experimental: false,
|
|
183
|
+
indent: 2, // 4, or 'tab'
|
|
185
184
|
jsx: true,
|
|
186
185
|
quoteProps: 'consistent',
|
|
186
|
+
quotes: 'single', // or 'double'
|
|
187
187
|
semi: false,
|
|
188
188
|
|
|
189
189
|
// Disable the opinionated spacing rules (space in parenthesis, objects, arrays, etc.)
|
|
@@ -306,7 +306,6 @@ Since flat config requires us to explicitly provide the plugin names (instead of
|
|
|
306
306
|
| `node` | `n` | [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) |
|
|
307
307
|
| `react` | `@eslint-react` | [@eslint-react/eslint-plugin](https://github.com/eslint-react/eslint-plugin) |
|
|
308
308
|
| `react-dom` | `@eslint-react/dom` | [@eslint-react/eslint-plugin](https://github.com/eslint-react/eslint-plugin) |
|
|
309
|
-
| `react-hooks-extra` | `@eslint-react/hooks-extra` | [@eslint-react/eslint-plugin](https://github.com/eslint-react/eslint-plugin) |
|
|
310
309
|
| `react-naming-convention` | `@eslint-react/naming-convention` | [@eslint-react/eslint-plugin](https://github.com/eslint-react/eslint-plugin) |
|
|
311
310
|
| `style` | `@stylistic` | [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic) |
|
|
312
311
|
| `tailwindcss/*` | `better-tailwindcss/*` | [eslint-plugin-better-tailwindcss](https://github.com/unjs/eslint-plugin-better-tailwindcss) |
|
|
@@ -496,7 +495,7 @@ export default config( {
|
|
|
496
495
|
Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:
|
|
497
496
|
|
|
498
497
|
```bash
|
|
499
|
-
npm i -D @eslint-react/eslint-plugin eslint-plugin-react-
|
|
498
|
+
npm i -D @eslint-react/eslint-plugin eslint-plugin-react-refresh
|
|
500
499
|
```
|
|
501
500
|
|
|
502
501
|
#### Next.js
|
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import { cac } from "cac";
|
|
|
8
8
|
import parse from "parse-gitignore";
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.
|
|
11
|
+
var version = "1.26.0";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/cli/constants.ts
|
|
14
14
|
const vscodeSettingsString = `
|
|
@@ -122,11 +122,7 @@ const dependenciesMap = {
|
|
|
122
122
|
formatterAstro: ["prettier-plugin-astro"],
|
|
123
123
|
nextjs: ["@next/eslint-plugin-next"],
|
|
124
124
|
node: [],
|
|
125
|
-
react: [
|
|
126
|
-
"@eslint-react/eslint-plugin",
|
|
127
|
-
"eslint-plugin-react-hooks",
|
|
128
|
-
"eslint-plugin-react-refresh"
|
|
129
|
-
],
|
|
125
|
+
react: ["@eslint-react/eslint-plugin", "eslint-plugin-react-refresh"],
|
|
130
126
|
slidev: ["prettier-plugin-slidev"],
|
|
131
127
|
solid: ["eslint-plugin-solid"],
|
|
132
128
|
storybook: ["eslint-plugin-storybook"],
|
|
@@ -190,19 +186,18 @@ async function updateEslintFiles(result) {
|
|
|
190
186
|
//#endregion
|
|
191
187
|
//#region src/cli/constants-generated.ts
|
|
192
188
|
const versionsMap = {
|
|
193
|
-
"@eslint-react/eslint-plugin": "^
|
|
194
|
-
"@next/eslint-plugin-next": "^16.
|
|
195
|
-
"@unocss/eslint-plugin": "^66.6.
|
|
189
|
+
"@eslint-react/eslint-plugin": "^3.0.0",
|
|
190
|
+
"@next/eslint-plugin-next": "^16.2.0",
|
|
191
|
+
"@unocss/eslint-plugin": "^66.6.7",
|
|
196
192
|
"astro-eslint-parser": "^1.3.0",
|
|
197
|
-
"eslint": "^10.0
|
|
193
|
+
"eslint": "^10.1.0",
|
|
198
194
|
"eslint-plugin-astro": "^1.6.0",
|
|
199
195
|
"eslint-plugin-better-tailwindcss": "^4.3.2",
|
|
200
196
|
"eslint-plugin-format": "^2.0.1",
|
|
201
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
202
197
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
203
198
|
"eslint-plugin-solid": "^0.14.5",
|
|
204
|
-
"eslint-plugin-storybook": "^10.
|
|
205
|
-
"eslint-plugin-svelte": "^3.15.
|
|
199
|
+
"eslint-plugin-storybook": "^10.3.1",
|
|
200
|
+
"eslint-plugin-svelte": "^3.15.2",
|
|
206
201
|
"prettier-plugin-astro": "^0.14.1",
|
|
207
202
|
"prettier-plugin-slidev": "^1.0.5",
|
|
208
203
|
"svelte-eslint-parser": "^1.6.0"
|
|
@@ -286,11 +281,14 @@ async function run(options = {}) {
|
|
|
286
281
|
};
|
|
287
282
|
if (!argSkipPrompt) {
|
|
288
283
|
result = await p.group({
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
284
|
+
extra: async ({ results }) => {
|
|
285
|
+
const isArgExtraValid = !!argExtra?.length && !argExtra.some((element) => !extra.includes(element));
|
|
286
|
+
if (!results.uncommittedConfirmed || isArgExtraValid) return;
|
|
287
|
+
const message = !isArgExtraValid && argExtra?.length ? `"${argExtra.join(", ")}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
|
|
288
|
+
return p.multiselect({
|
|
289
|
+
message: c.reset(message),
|
|
290
|
+
options: extraOptions,
|
|
291
|
+
required: false
|
|
294
292
|
});
|
|
295
293
|
},
|
|
296
294
|
frameworks: async ({ results }) => {
|
|
@@ -303,14 +301,11 @@ async function run(options = {}) {
|
|
|
303
301
|
required: false
|
|
304
302
|
});
|
|
305
303
|
},
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
message: c.reset(message),
|
|
312
|
-
options: extraOptions,
|
|
313
|
-
required: false
|
|
304
|
+
uncommittedConfirmed: async () => {
|
|
305
|
+
if (argSkipPrompt || isGitClean()) return Promise.resolve(true);
|
|
306
|
+
return p.confirm({
|
|
307
|
+
initialValue: false,
|
|
308
|
+
message: "There are uncommitted changes in the current repository, are you sure to continue?"
|
|
314
309
|
});
|
|
315
310
|
},
|
|
316
311
|
updateVscodeSettings: async ({ results }) => {
|