@geoql/oxlint-plugin-vue-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.
Files changed (2) hide show
  1. package/README.md +25 -17
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,29 +1,37 @@
1
1
  # `@geoql/oxlint-plugin-vue-doctor`
2
2
 
3
- > oxlint JS plugin for Vue 3 anti-patterns and AI-slop detection.
3
+ > oxlint JS plugin holding the Vue 3 script-level rules that [`@geoql/doctor-core`](../doctor-core) runs.
4
4
 
5
- Pairs with oxlint's built-in `vue` plugin via the `jsPlugins` config field. See [`docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md) for how it fits with `@geoql/doctor-core`.
5
+ This package is a rule pack, not a tool. It's the `jsPlugins` half of the script pass: a set of oxlint JS-plugin rules that fire against the `<script>` / `<script setup>` ESTree oxlint extracts from `.vue` files. `doctor-core` generates the `.oxlintrc.json` that loads this plugin and wires it in automatically, so **you don't install or configure it directly**. Run [`@geoql/vue-doctor`](../vue-doctor) and these rules come along for free.
6
6
 
7
- ## Usage (standalone oxlint config)
7
+ ## What's in here
8
8
 
9
- ```jsonc
10
- // .oxlintrc.json
11
- {
12
- "plugins": ["vue"],
13
- "jsPlugins": ["@geoql/oxlint-plugin-vue-doctor"],
14
- "rules": {
15
- "vue-doctor/no-em-dash-in-string": "error",
16
- },
17
- }
9
+ Script-level Vue rules across four categories. Template-shaped rules (`v-for`/`:key`, `v-if`+`v-for`) live in `doctor-core`'s in-process template pass instead, because oxlint never hands JS plugins the template AST.
10
+
11
+ | Category | Rules |
12
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | `ai-slop` | em-dash strings, destructuring props/reactive without `toRefs`, non-null assertions on `.value`, explicit imports of auto-imported Vue APIs |
14
+ | `composition` | typed `defineProps`, prefer `<script setup>` for new files |
15
+ | `reactivity` | `watch` without cleanup, `shallowRef` for large data, `readonly` for injected values |
16
+ | `performance` | `defineAsyncComponent` on route components |
17
+
18
+ To see every rule with its id, severity, and preset membership, run `vue-doctor list-rules` (or filter, e.g. `vue-doctor list-rules --source doctor --category ai-slop`).
19
+
20
+ ## Install
21
+
22
+ ```sh
23
+ npm i @geoql/oxlint-plugin-vue-doctor
18
24
  ```
19
25
 
20
- ## Rules (alpha)
26
+ Published on [npm](https://www.npmjs.com/package/@geoql/oxlint-plugin-vue-doctor) and [JSR](https://jsr.io/@geoql/oxlint-plugin-vue-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
+ Vue 3 only. Severity levels are `error | warn | info`.
21
31
 
22
- | Rule | Category | Severity |
23
- | --------------------------------- | -------- | -------- |
24
- | `vue-doctor/no-em-dash-in-string` | ai-slop | error |
32
+ ## Architecture
25
33
 
26
- More rules land per the [issue tracker](https://github.com/geoql/doctor/issues).
34
+ See [`docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md) for how the JS plugin co-loads with oxlint's native `vue` plugin and why the script and template rules live in different passes.
27
35
 
28
36
  ## License
29
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoql/oxlint-plugin-vue-doctor",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "description": "oxlint JS plugin for Vue 3 anti-patterns and AI-slop detection. Pairs with oxlint's built-in vue plugin via jsPlugins. TypeScript, ESM.",
6
6
  "keywords": [