@useinsider/eslint-config 4.0.0-beta.2 → 4.0.0-beta.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 +21 -7
- package/dist/cli.cjs +420 -79
- package/dist/cli.cjs.map +1 -1
- package/dist/main.cjs +5 -0
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +5 -0
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -127,8 +127,8 @@ type-checks those files, you are not asked at all. That edit is surgical —
|
|
|
127
127
|
comments, key order and indentation survive — and declining it prints the exact
|
|
128
128
|
snippet to paste.
|
|
129
129
|
|
|
130
|
-
To migrate an existing
|
|
131
|
-
`.eslintrc.{js,cjs}`:
|
|
130
|
+
To migrate an existing `eslint.config.{js,mjs,cjs}` — v3's scope-keyed call or
|
|
131
|
+
v1's `useInsider({ preset, config })` — or a legacy `.eslintrc.{js,cjs}`:
|
|
132
132
|
|
|
133
133
|
```bash
|
|
134
134
|
npx @useinsider/eslint-config migrate [path]
|
|
@@ -137,11 +137,25 @@ npx @useinsider/eslint-config migrate [path]
|
|
|
137
137
|
The migrate flow auto-detects the source format, prints a summary plus any
|
|
138
138
|
dropped custom rules, asks for confirmation, then splits the config into the
|
|
139
139
|
three-file layout: the `useInsider()` call moves into `insider.lint.*` and
|
|
140
|
-
both linter configs become thin re-exports.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
both linter configs become thin re-exports.
|
|
141
|
+
|
|
142
|
+
A **v3** config takes the shorter route. v4 accepts the same options v3 did,
|
|
143
|
+
so the call is re-housed rather than re-rendered: the file is copied into
|
|
144
|
+
`insider.lint.*` byte-for-byte and only the export statement changes to
|
|
145
|
+
`export const { useInsiderESLint, useInsiderOXC } = useInsider({ ... })`. Your
|
|
146
|
+
comments, `satisfies` clauses, computed values and formatting survive. An
|
|
147
|
+
`await` on the call and an array wrapping it are dropped, since `useInsider()`
|
|
148
|
+
is synchronous in v4 and returns the two renderers. Shapes with nowhere to go
|
|
149
|
+
in a lint module are refused by name rather than half-migrated: more than one
|
|
150
|
+
`useInsider()` call, a default export mixing the call with hand-written
|
|
151
|
+
flat-config blocks, a `defineConfig()` wrapper, and a call reached through a
|
|
152
|
+
variable. An `.eslintignore` beside a v3 config is left alone — flat config
|
|
153
|
+
never read it, and the re-housed call is not rewritten to fold it in.
|
|
154
|
+
|
|
155
|
+
Legacy `.eslintrc.{js,cjs}` is also handled (custom rules and
|
|
156
|
+
non-`@useinsider/eslint-config/*` extends are dropped with a loud warning so
|
|
157
|
+
you can review what changed). Legacy `.eslintrc.{json,yml,yaml}` are not
|
|
158
|
+
supported in this release — convert them to `.eslintrc.{js,cjs}` first.
|
|
145
159
|
|
|
146
160
|
Migrate also rewrites your source: an `// eslint-disable-next-line <rule>`
|
|
147
161
|
naming a rule oxlint has taken over becomes `// oxlint-disable-next-line
|