Factories and project overrides
The root entry provides explicit named configurations and factories. Use a factory when the project needs to select its runtime environment or append overrides:
js
import { createVueProjectConfigs, defineRules } from "@fast-china/eslint-config";
import { defineConfig } from "eslint/config";
export default defineConfig([
...createVueProjectConfigs({ environment: "universal" }),
{
name: "project/custom",
ignores: ["public/vendor/**"],
languageOptions: {
globals: {
__APP_VERSION__: "readonly",
},
},
rules: defineRules({
"no-console": "warn",
}),
},
]);Available factories:
createVueProjectConfigs(options, ...overrides)createUniAppProjectConfigs(options, ...overrides)createBaseConfigs(options)for framework-neutral Node.js, SDK, and explicit composition
environment accepts "browser", "node", or "universal" and defaults to "browser". Configuration, script, test, and CLI files always receive Node.js globals separately.
Trailing Flat Config objects have the highest precedence. defineRules() returns its input unchanged and only adds precise rule typing.
