@geoql/doctor-rule-core
| Install | |
|---|---|
npm install @geoql/doctor-rule-core |
|
| Latest Version: | 1.4.1 |
| License: | MIT |
| Last Updated: | Sep 18, 2026 |
| Links: | GitHub · npm |
@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 | nulltransform - shared helpers such as
defineRuleand 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
- Add the rule file under
src/rules/vue/orsrc/rules/nuxt/. - Export it from the matching
src/rules/vue/index.tsorsrc/rules/nuxt/index.ts. - Add the rule to
RULE_REGISTRYin@geoql/doctor-core. - Add the rule id to the matching allowlist in
@geoql/doctor-core/src/oxlint/generate-config.ts.
Related Packages
Audit engine for @geoql/vue-doctor and @geoql/nuxt-doctor. Hybrid two-pass: @vue...
CLI auditor for Nuxt 4 apps. Detects anti-patterns, AI-slop, and best-practice v...
LSP server that runs the @geoql/doctor audit engine over Vue 3 + Nuxt 4 files an...
oxlint JS plugin for Nuxt 4 anti-patterns and AI-slop detection. Pairs with oxli...
ESLint flat-config plugin for Nuxt 4 anti-patterns and AI-slop detection. Shares...
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 | |
| 1.2.0 | MIT | |
| 1.1.0 | MIT | |
| 1.0.0 | MIT |