@kirklin/eslint-config 2.0.0 → 2.2.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 +29 -2
- package/README.zh-cn.md +1 -1
- package/bin/index.js +0 -0
- package/dist/cli.cjs +457 -145
- package/dist/cli.js +457 -145
- package/dist/index.cjs +190 -37
- package/dist/index.d.cts +39 -3
- package/dist/index.d.ts +39 -3
- package/dist/index.js +188 -37
- package/package.json +76 -57
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
- [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new), compose easily!
|
|
37
37
|
- Using [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic)
|
|
38
38
|
- Respects `.gitignore` by default
|
|
39
|
-
- Optional [React](#react), [Svelte](#svelte), [UnoCSS](#unocss) support
|
|
39
|
+
- Optional [React](#react), [Svelte](#svelte), [UnoCSS](#unocss), [Astro](#astro) support
|
|
40
40
|
- Optional [formatters](#formatters) support for CSS, HTML, etc.
|
|
41
41
|
- **Style principle**: Minimal for reading, stable for diff, consistent
|
|
42
42
|
|
|
@@ -45,6 +45,14 @@
|
|
|
45
45
|
|
|
46
46
|
## Usage
|
|
47
47
|
|
|
48
|
+
### Wizard
|
|
49
|
+
|
|
50
|
+
We provided a CLI tool to help you set up your project, or migrate from the legacy config to the new flat config.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx @kirklin/eslint-config@latest
|
|
54
|
+
```
|
|
55
|
+
|
|
48
56
|
### Install
|
|
49
57
|
|
|
50
58
|
```bash
|
|
@@ -216,7 +224,7 @@ export default kirklin({
|
|
|
216
224
|
|
|
217
225
|
// `.eslintignore` is no longer supported in Flat config, use `ignores` instead
|
|
218
226
|
ignores: [
|
|
219
|
-
"
|
|
227
|
+
"**/fixtures",
|
|
220
228
|
// ...globs
|
|
221
229
|
]
|
|
222
230
|
});
|
|
@@ -455,6 +463,25 @@ Running `npx eslint` should prompt you to install the required dependencies, oth
|
|
|
455
463
|
npm i -D eslint-plugin-svelte
|
|
456
464
|
```
|
|
457
465
|
|
|
466
|
+
#### Astro
|
|
467
|
+
|
|
468
|
+
To enable astro support, you need to explicitly turn it on:
|
|
469
|
+
|
|
470
|
+
```js
|
|
471
|
+
// eslint.config.js
|
|
472
|
+
import kirklin from "@kirklin/eslint-config";
|
|
473
|
+
|
|
474
|
+
export default kirklin({
|
|
475
|
+
astro: true,
|
|
476
|
+
});
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:
|
|
480
|
+
|
|
481
|
+
```bash
|
|
482
|
+
npm i -D eslint-plugin-astro
|
|
483
|
+
```
|
|
484
|
+
|
|
458
485
|
#### UnoCSS
|
|
459
486
|
|
|
460
487
|
To enable UnoCSS support, you need to explicitly turn it on:
|
package/README.zh-cn.md
CHANGED
package/bin/index.js
CHANGED
|
File without changes
|