@geoql/doctor-rule-core

Linter-neutral rule cores shared by @geoql/oxlint-plugin-vue-doctor, @geoql/oxlint-plugin-nuxt-doctor, and the future ESLint plugin. ESTree/JS-AST only.
12,836 7
Install
npm install @geoql/doctor-rule-core
Latest Version:1.4.1
License:MIT
Last Updated:Sep 18, 2026
Links: GitHub  ·  npm
Maintainer: vinayakkulkarni

@geoql/doctor-rule-core

Linter-neutral rule cores shared by:

  • @geoql/oxlint-plugin-vue-doctor
  • @geoql/oxlint-plugin-nuxt-doctor
  • the future ESLint plugin (parity item #4)

What lives here

Pure detection logic for rules that operate on the ESTree / JavaScript AST:

  • rule metadata (id, category, severity, recommended, meta)
  • the visitor spec returned by create(context)
  • the optional fix(node) => string | null transform
  • shared helpers such as defineRule and the auto-imported symbol sets

What does NOT live here

Template-AST rules (e.g. v-for-has-key) operate on the @vue/compiler-sfc template AST, which has a completely different node shape and traversal model. They remain in @geoql/doctor-core alongside the hybrid engine that runs them.

Adapter contract

A linter adapter should consume each CoreRule and wire it into its own linter API. The core shape is intentionally identical to the ESLint / oxlint JS-plugin contract:

export interface CoreRule {
  readonly id: string;
  readonly category: RuleCategory;
  readonly severity: 'error' | 'warn' | 'info';
  readonly recommended: boolean;
  readonly meta?: RuleMeta;
  readonly create: (context: RuleContext) => Record<string, RuleVisitor>;
  readonly fix?: (node: AstNode) => string | null;
}

For oxlint, the adapter is a thin identity wrapper because the shape already matches oxlint's Rule. For ESLint, the adapter will map the same create visitor object into ESLint's context.report() API.

Adding a new rule

  1. Add the rule file under src/rules/vue/ or src/rules/nuxt/.
  2. Export it from the matching src/rules/vue/index.ts or src/rules/nuxt/index.ts.
  3. Add the rule to RULE_REGISTRY in @geoql/doctor-core.
  4. Add the rule id to the matching allowlist in @geoql/doctor-core/src/oxlint/generate-config.ts.

Related Packages

@geoql/doctor-core

Audit engine for @geoql/vue-doctor and @geoql/nuxt-doctor. Hybrid two-pass: @vue...

15,374 7
@geoql/nuxt-doctor

CLI auditor for Nuxt 4 apps. Detects anti-patterns, AI-slop, and best-practice v...

14,295 7
@geoql/doctor-language-server

LSP server that runs the @geoql/doctor audit engine over Vue 3 + Nuxt 4 files an...

2,578 7
@geoql/oxlint-plugin-nuxt-doctor

oxlint JS plugin for Nuxt 4 anti-patterns and AI-slop detection. Pairs with oxli...

21,363 7
@geoql/eslint-plugin-nuxt-doctor

ESLint flat-config plugin for Nuxt 4 anti-patterns and AI-slop detection. Shares...

2,543 7

Version History

Version Released License
1.4.1 MIT
1.4.0 MIT
1.3.0 MIT
1.2.2 MIT
1.2.1 MIT