@three-doctor/eslint-plugin
v0.2.0
Published
ESLint bridge for Three Doctor static diagnostics
Readme
@three-doctor/eslint-plugin
ESLint bridge for Three Doctor static diagnostics.
This package runs Three Doctor's static source scanner inside one ESLint bridge rule so editor and lint workflows can surface Three.js, React Three Fiber, and Drei diagnostics earlier. It is intentionally not a native AST-per-rule ESLint plugin and does not provide independent ESLint autofixes for every Three Doctor rule.
Install
npm install --save-dev three-doctor @three-doctor/eslint-plugin eslintNode.js 20 or newer is required.
Flat Config Usage
import threeDoctor from "@three-doctor/eslint-plugin";
export default [
{
files: ["**/*.{js,jsx,ts,tsx}"],
plugins: {
"@three-doctor": threeDoctor
},
rules: {
"@three-doctor/no-three-doctor-issues": [
"warn",
{
minSeverity: "warning",
rootDirectory: "."
}
]
}
}
];Options
{
minSeverity: "warning",
rootDirectory: ".",
config: {
source: {
includeNonRuntime: false
},
ignore: {
rules: [],
files: []
}
}
}minSeveritycan beinfo,warning, orerror.rootDirectorycontrols project-root resolution for config and relative paths.configmerges into Three Doctor's default config.
The ESLint rule disables dead-code and manual-audit diagnostics because those are project-level checks better handled by the CLI.
CLI Pairing
Use the ESLint plugin for editor feedback and the CLI for full project, asset, runtime, package, bundle, SARIF, and CI reports:
three-doctor . --diff main --annotations --sarifLicense
MIT
