Skip to content

Default configuration

js
// .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.

The unreleased 2.1.10 source retains the 2.1.9 ESLint 8, opt-in type-aware linting, Vue 2 and public Legacy policy, and synchronizes the skill-file default-ignore fix from Fast.ESLint.Config 2.1.10. 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; Promise-returning event handlers are allowed in Vue templates and TSX attributes. 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.