@geoql/oxlint-plugin-nuxt-doctor 0.1.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 +25 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
# `@geoql/oxlint-plugin-nuxt-doctor`
|
|
2
2
|
|
|
3
|
-
> oxlint JS plugin
|
|
3
|
+
> oxlint JS plugin holding the Nuxt 4 script-level rules that [`@geoql/doctor-core`](../doctor-core) runs.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This package is a rule pack, not a tool. It's the Nuxt half of the script pass: oxlint JS-plugin rules that fire against the `<script>` / `<script setup>` ESTree oxlint extracts from `.vue` files and server handlers. `doctor-core` generates the `.oxlintrc.json` that loads this plugin alongside `@geoql/oxlint-plugin-vue-doctor` and wires it in automatically, so **you don't install or configure it directly**. Run [`@geoql/nuxt-doctor`](../nuxt-doctor) and these rules come along for free.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## What's in here
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
Script-level Nuxt rules across four categories. Other Nuxt checks (`structure`, `nitro`, `seo`, `cloudflare`, `modules-deps`, plus cross-file `data-fetching`) run inside `doctor-core` because they need project-level or multi-file context rather than a single script AST.
|
|
10
|
+
|
|
11
|
+
| Category | Rules |
|
|
12
|
+
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| `ai-slop` | `useState` for server data, fetch in setup, `process.client`/`process.server`, explicit imports of auto-imported APIs |
|
|
14
|
+
| `hydration` | `clientOnly` for browser APIs, no `document` in setup |
|
|
15
|
+
| `server-routes` | typed `defineEventHandler`, `createError` on failure, validate body with h3 v2 |
|
|
16
|
+
| `data-fetching` | required `useAsyncData` key inside loops |
|
|
17
|
+
|
|
18
|
+
`nuxt-doctor` surfaces these Nuxt rules **on top of** the full Vue rule set, so a Nuxt audit checks both. To see every rule with its id, severity, and preset membership, run `nuxt-doctor list-rules` (or filter, e.g. `nuxt-doctor list-rules --category hydration`).
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm i @geoql/oxlint-plugin-nuxt-doctor
|
|
18
24
|
```
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
Published on [npm](https://www.npmjs.com/package/@geoql/oxlint-plugin-nuxt-doctor) and [JSR](https://jsr.io/@geoql/oxlint-plugin-nuxt-doctor) at `v0.1.0` with provenance. ESM-only, TypeScript. `oxlint` is a peer dependency. Most people never add this dependency themselves; `doctor-core` resolves it for you.
|
|
27
|
+
|
|
28
|
+
## Scope
|
|
29
|
+
|
|
30
|
+
Nuxt 4 only (the `app/` directory layout with `compatibilityVersion: 4`). Severity levels are `error | warn | info`.
|
|
21
31
|
|
|
22
|
-
|
|
23
|
-
| ---- | -------- | -------- |
|
|
32
|
+
## Architecture
|
|
24
33
|
|
|
25
|
-
|
|
34
|
+
See [`docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md) for how the JS plugin co-loads with oxlint's native `vue` plugin and why script, template, and cross-file rules live in different passes.
|
|
26
35
|
|
|
27
36
|
## License
|
|
28
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geoql/oxlint-plugin-nuxt-doctor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "oxlint JS plugin for Nuxt 4 anti-patterns and AI-slop detection. Pairs with oxlint's built-in vue plugin via jsPlugins. TypeScript, ESM.",
|
|
6
6
|
"keywords": [
|