Default configuration
// .eslintrc.cjs
module.exports = {
root: true,
extends: ["@fast-china/eslint-config-legacy"],
rules: {
"no-console": "warn",
},
};The root enables browser globals, JavaScript, TypeScript, Vue 3, import-x, Promise, RegExp, JSON dialects, YAML, Markdown, CommonJS/tooling compatibility, and the Prettier conflict-disable layer.
2.1.11 retains the existing ESLint 8, opt-in type-aware linting, Vue 2 and public Legacy policy, and allows Promise-returning object-property callbacks in type-aware Vue SFC and React configurations. Vue single-file components disable switch-exhaustiveness-check; regular TypeScript and TSX retain the error-level check. Vue 2 alone disables the Vue 3 emits contract. React continues to use CommonJS-loadable ESLint 8 plugins because the modern baseline plugin is ESM-only.
The opt-in /type-aware config uses recommended-type-checked. Promise waiting remains an application decision: no-floating-promises and strict-void-return are disabled, while Promise misuse, invalid await, unsafe types, redundant conversions, and correctness-only return-await remain checked; Type-aware Vue SFCs (createVueConfigs({ typeChecked: true }) or /type-aware) and createReactConfigs({}, { typescriptOptions: { typeChecked: true } }) set checksVoidReturn: { attributes: false, properties: false }, allowing Promise-returning functions in JSX attributes and object properties typed as () => void. The generic TypeScript/TSX type-aware layer retains its original checks; this exemption does not guarantee that callers handle Promise rejections, and arguments, variable assignments, conditionals, and other checks remain enabled. Exported TypeScript module boundaries require explicit types, while internal functions, TSX component returns, and Vue SFC callbacks keep contextual inference.
Type-only imports and exports use standalone import type and export type, constructor-only private members use readonly, and the shared JavaScript policy rejects direct or indirect dynamic string execution, Promise executor returns, and the void operator. Vue setup code cannot use props or refs in ways that lose reactivity.
