@lewishowles/lint-config 0.1.2 → 0.1.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 +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -135,3 +135,18 @@ Until this is fixed upstream, redeclare the `env`/`globals` you need directly in
|
|
|
135
135
|
"ignorePatterns": ["**/dist/*", ".codebase-memory/**"]
|
|
136
136
|
}
|
|
137
137
|
```
|
|
138
|
+
|
|
139
|
+
### Known limitation: `vite-plus`'s `lint` config field requires resolved objects, not string paths
|
|
140
|
+
|
|
141
|
+
Raw oxlint (CLI, editor integrations) accepts `"extends": ["./node_modules/@lewishowles/lint-config/vue.json"]` as string paths and resolves them at load time. `vite-plus`, when a project routes its oxlint config through `vite.config.js`'s `lint` field (importing `.oxlintrc.json` as JSON and handing it to `vp check`/`vp lint`), does not resolve string paths in `extends`: every entry, at every nesting level, must already be a plain object. This means `vue.json`'s own internal `extends: ["./base.json"]` also breaks one level deeper.
|
|
142
|
+
|
|
143
|
+
If your project uses `vite-plus`'s `lint` field rather than raw oxlint, resolve the chain yourself in `vite.config.js`:
|
|
144
|
+
|
|
145
|
+
```js
|
|
146
|
+
import base from "@lewishowles/lint-config/base.json" with { type: "json" };
|
|
147
|
+
import vue from "@lewishowles/lint-config/vue.json" with { type: "json" };
|
|
148
|
+
|
|
149
|
+
const lint = { ...vue, extends: [base, ...(vue.extends ?? [])] };
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
`.oxlintrc.json` itself should stay untouched (string `extends`) for raw oxlint/editor consumption; this only applies to the `vite-plus` config path.
|