@chanyuxi/eslint-waltz 0.0.0 → 0.1.1
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 +15 -6
- package/dist/cli.js +1537 -0
- package/dist/index.d.ts +61 -9
- package/dist/index.js +72 -2
- package/package.json +136 -130
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@ The following configuration modules are available:
|
|
|
14
14
|
- ✅ Json
|
|
15
15
|
- ✅ Import
|
|
16
16
|
- ✅ React
|
|
17
|
-
- JSONC
|
|
18
|
-
- TypeScript,
|
|
17
|
+
- JSONC and imports are enabled by default and can be disabled with `json: false` and `imports: false`.
|
|
18
|
+
- TypeScript, React, and gitignore support are opt-in.
|
|
19
19
|
|
|
20
20
|
# Usage
|
|
21
21
|
|
|
@@ -24,10 +24,10 @@ The following configuration modules are available:
|
|
|
24
24
|
Install the core package and its core ESLint peers:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
pnpm add -D @chanyuxi/eslint-waltz eslint @eslint/js @stylistic/eslint-plugin eslint-plugin-jsonc jsonc-eslint-parser globals
|
|
27
|
+
pnpm add -D @chanyuxi/eslint-waltz eslint @eslint/js @stylistic/eslint-plugin eslint-plugin-jsonc eslint-plugin-import jsonc-eslint-parser globals
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Install the peer packages for any optional modules you enable, such as `typescript-eslint
|
|
30
|
+
Install the peer packages for any optional modules you enable, such as `typescript-eslint` or the React ESLint plugins.
|
|
31
31
|
|
|
32
32
|
#### Configuration
|
|
33
33
|
|
|
@@ -37,10 +37,9 @@ Create a `eslint.config.ts` file in the project root directory and configure it
|
|
|
37
37
|
import waltz from '@chanyuxi/eslint-waltz'
|
|
38
38
|
|
|
39
39
|
export default waltz({
|
|
40
|
-
// JSONC
|
|
40
|
+
// JSONC and imports are enabled by default
|
|
41
41
|
json: true,
|
|
42
42
|
ts: true,
|
|
43
|
-
imports: true,
|
|
44
43
|
react: true,
|
|
45
44
|
js: { globals: ['browser'] },
|
|
46
45
|
})
|
|
@@ -58,3 +57,13 @@ export default waltz({}, {
|
|
|
58
57
|
```
|
|
59
58
|
|
|
60
59
|
Run `pnpm run check` before committing. `pnpm pack` and `npm publish` build the package automatically through the `prepack` lifecycle.
|
|
60
|
+
|
|
61
|
+
#### VS Code synchronization
|
|
62
|
+
|
|
63
|
+
After installing the package, run this command from your project root:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx eslint-waltz sync-vscode
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
It creates or updates `.vscode/settings.json` with ESLint fix-on-save settings while preserving other settings and JSONC comments.
|