oxlint-preset-hodor
v0.1.1
Published
Hodor oxlint plugin keeps the AI slop out of your codebase.
Maintainers
Readme
oxlint-preset-hodor
Oxlint plugin for keeping React code clean and consistent. Hodor holds the door against code slop.
Plugin
Load it in oxlint:
import hodor from "oxlint-preset-hodor";
export default {
jsPlugins: [hodor.jsPlugin],
extends: [hodor.config],
rules: {
...hodor.rules,
},
};extends applies Hodor's built-in plugin list and rules. Oxlint does not currently
merge jsPlugins through extends, so jsPlugins is exported separately to avoid
hardcoding the package specifier in consumer configs.
hodor.jsPlugin is the resolved specifier for the package's internal JS plugin.
hodor.rules contains the custom hodor/* rule key/value pairs for configs that
want to spread, inspect, or override those custom rules explicitly.
Implemented Rules
hodor/no-access-state-in-setstatehodor/no-class-componenthodor/no-context-providerhodor/no-create-refhodor/no-duplicate-keyhodor/no-implicit-childrenhodor/no-implicit-keyhodor/no-implicit-refhodor/no-leaked-conditional-renderinghodor/no-missing-context-display-namehodor/no-misused-capture-owner-stackhodor/no-nested-lazy-component-declarationshodor/no-unnecessary-use-prefixhodor/no-unused-class-component-membershodor/no-unused-propshodor/no-unused-statehodor/no-use-contexthodor/no-key-after-spreadhodor/no-leaked-dollarhodor/no-leaked-semicolonhodor/no-namespacehodor/context-namehodor/function-definitionhodor/id-namehodor/ref-namehodor/no-find-dom-nodehodor/no-flush-synchodor/no-hydratehodor/no-renderhodor/no-use-form-statehodor/no-leaked-event-listenerhodor/no-leaked-fetchhodor/no-leaked-intersection-observerhodor/no-leaked-intervalhodor/no-leaked-resize-observerhodor/no-leaked-timeouthodor/no-react-fchodor/no-forward-refhodor/no-default-react-memoizationhodor/no-function-deps-in-effecthodor/no-positional-func-args
Verification
npm run check
npm run typecheck
npm testRule tests live next to each rule under lint/rules/<rule-name>/. Each rule has its
own oxlint config, valid/invalid fixture files, and a Vitest file that runs the real
oxlint CLI through lint/test-utils/run-oxlint.ts.
