@jsse/eslint-config 0.9.0 → 0.9.2
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/CHANGELOG.md +14 -0
- package/README.md +68 -21
- package/dist/cli.js +29 -30
- package/dist/dist-DS02OtwI.js +143 -0
- package/dist/{fixable-rules-map-CvRdO-mG.d.ts → fixable-rules-map-CCZ-PRHv.d.ts} +1073 -658
- package/dist/{fixable-rules-map-B2-5HybI.js → fixable-rules-map-dNndx2ig.js} +16 -0
- package/dist/fixable.d.ts +2 -2
- package/dist/fixable.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +851 -335
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +54 -54
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @jsse/eslint-config
|
|
2
2
|
|
|
3
|
+
## 0.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- updated eslint react configuration styule
|
|
8
|
+
|
|
9
|
+
## 0.9.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 5f9905e: no await where not needed
|
|
14
|
+
- add eslint-node-test
|
|
15
|
+
- add node-test plugin from mr sindresorhus
|
|
16
|
+
|
|
3
17
|
## 0.9.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -64,6 +64,7 @@ import jsse from "@jsse/eslint-config";
|
|
|
64
64
|
|
|
65
65
|
export default jsse({
|
|
66
66
|
typescript: {
|
|
67
|
+
presets: "recommended-type-checked",
|
|
67
68
|
tsconfig: "tsconfig.json", // or ["tsconfig.json", "tsconfig.eslint.json", ...]
|
|
68
69
|
},
|
|
69
70
|
});
|
|
@@ -71,27 +72,29 @@ export default jsse({
|
|
|
71
72
|
|
|
72
73
|
### Common Options
|
|
73
74
|
|
|
74
|
-
| Option | Default | Notes
|
|
75
|
-
| ----------------- | ------------------------------ |
|
|
76
|
-
| `typescript` | auto-detect | Enabled when `typescript` is installed. Passing `{ tsconfig }` enables type-aware rules unless `typeAware: false` is set. |
|
|
77
|
-
| `typeAware` | `false` | Explicit override for type-aware TypeScript rules.
|
|
78
|
-
| `react` | `false` | Enables React rules; accepts `
|
|
79
|
-
| `reactRefresh` | `true` when `react` is enabled |
|
|
80
|
-
| `antfu` | `true` | Enables `eslint-plugin-antfu`; accepts `topLevelFunction` and `overrides`.
|
|
81
|
-
| `demorgan` | `true` | Enables `eslint-plugin-de-morgan`; accepts `overrides`.
|
|
82
|
-
| `e18e` | `true` | Enables `@e18e/eslint-plugin`.
|
|
83
|
-
| `jsdoc` | `true` | Enables `eslint-plugin-jsdoc`; accepts `overrides`.
|
|
84
|
-
| `n` | `true` | Enables Node.js rules from `eslint-plugin-n`; accepts `overrides`.
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
75
|
+
| Option | Default | Notes |
|
|
76
|
+
| ----------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
77
|
+
| `typescript` | auto-detect | Enabled when `typescript` is installed. Accepts `{ presets, tsconfig, overrides }`. Passing `{ tsconfig }` enables type-aware rules unless `typeAware: false` is set. |
|
|
78
|
+
| `typeAware` | `false` | Explicit override for type-aware TypeScript rules. |
|
|
79
|
+
| `react` | `false` | Enables React rules; accepts `refresh`, `preset`, and `overrides`. TS/TSX parsing comes entirely from `typescript`/`tsconfig`. |
|
|
80
|
+
| `reactRefresh` | `true` when `react` is enabled | Legacy top-level alias. Prefer `react.refresh: false` to disable React Refresh rules. |
|
|
81
|
+
| `antfu` | `true` | Enables `eslint-plugin-antfu`; accepts `topLevelFunction` and `overrides`. |
|
|
82
|
+
| `demorgan` | `true` | Enables `eslint-plugin-de-morgan`; accepts `overrides`. |
|
|
83
|
+
| `e18e` | `true` | Enables `@e18e/eslint-plugin`. |
|
|
84
|
+
| `jsdoc` | `true` | Enables `eslint-plugin-jsdoc`; accepts `overrides`. |
|
|
85
|
+
| `n` | `true` | Enables Node.js rules from `eslint-plugin-n`; accepts `overrides`. |
|
|
86
|
+
| `nodeTest` | `false` | Enables `eslint-node-test` (Node.js built-in test runner rules); accepts `{ preset, overrides }`. |
|
|
87
|
+
| `unicorn` | `true` | Enables `eslint-plugin-unicorn`; accepts `{ preset, overrides }`. |
|
|
88
|
+
| `vitest` | auto-detect | Enabled when `vitest` is installed. Enables `@vitest/eslint-plugin`; accepts `overrides`. |
|
|
89
|
+
| `prettier` | `true` | Disables known ESLint/Prettier conflicts. This does not run Prettier. |
|
|
90
|
+
| `stylistic` | `true` | Enables selected `@stylistic` rules. Supports `indent`, `quotes`, and `jsx`. |
|
|
91
|
+
| `jsonc` | `true` | Enables JSON/JSONC rules. |
|
|
92
|
+
| `markdown` | `false` | Enables Markdown processing and fenced-code linting. |
|
|
93
|
+
| `yaml` | `false` | Enables YAML rules. |
|
|
94
|
+
| `sortImports` | `false` | Enables import/export sorting via Perfectionist. |
|
|
95
|
+
| `sortPackageJson` | `true` | Requires `jsonc` to be enabled. |
|
|
96
|
+
| `sortTsconfig` | `true` | Requires `jsonc`; accepts `extendTsconfigGlobs`. |
|
|
97
|
+
| `tailwind` | `false` | Deprecated. Passing it only prints a warning. |
|
|
95
98
|
|
|
96
99
|
Rule overrides belong to the corresponding config option:
|
|
97
100
|
|
|
@@ -104,6 +107,50 @@ jsse({
|
|
|
104
107
|
});
|
|
105
108
|
```
|
|
106
109
|
|
|
110
|
+
### TypeScript Presets
|
|
111
|
+
|
|
112
|
+
The `typescript.presets` option selects the upstream `typescript-eslint` preset
|
|
113
|
+
rules before jsse's local TypeScript rules and user overrides are applied.
|
|
114
|
+
|
|
115
|
+
```js
|
|
116
|
+
jsse({
|
|
117
|
+
typescript: {
|
|
118
|
+
presets: ["strict-type-checked", "stylistic-type-checked"],
|
|
119
|
+
tsconfig: "tsconfig.json",
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Preset names match `typescript-eslint`'s kebab-case config names: `recommended`,
|
|
125
|
+
`recommended-type-checked`, `strict`, `strict-type-checked`, `stylistic`,
|
|
126
|
+
`stylistic-type-checked`, `all`, `base`, `disable-type-checked`,
|
|
127
|
+
`eslint-recommended`, and the `*-only` variants.
|
|
128
|
+
|
|
129
|
+
The older `typescript.strict` option is still supported for compatibility, but
|
|
130
|
+
new configs should use `presets`.
|
|
131
|
+
|
|
132
|
+
### React Preset
|
|
133
|
+
|
|
134
|
+
The `react.preset` option selects the upstream `@eslint-react/eslint-plugin`
|
|
135
|
+
preset rules before user overrides are applied. It defaults to `"recommended"`.
|
|
136
|
+
|
|
137
|
+
```js
|
|
138
|
+
jsse({ react: { preset: "strict-type-checked" } });
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
React Refresh can be disabled with `react.refresh`:
|
|
142
|
+
|
|
143
|
+
```js
|
|
144
|
+
jsse({ react: { refresh: false } });
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Preset names match `@eslint-react`'s kebab-case config names: `recommended`,
|
|
148
|
+
`recommended-typescript`, `recommended-type-checked`, `strict`,
|
|
149
|
+
`strict-typescript`, and `strict-type-checked`. Unlike `typescript.presets`,
|
|
150
|
+
this only accepts a single preset — the `@eslint-react` presets are mutually
|
|
151
|
+
exclusive points on one severity/TS-awareness scale rather than composable
|
|
152
|
+
layers (`strict` is already a superset of `recommended`'s rules).
|
|
153
|
+
|
|
107
154
|
## Thanks
|
|
108
155
|
|
|
109
156
|
- [antfu](https://github.com/antfu) and [sxzz](https://github.com/sxzz) for
|