./configs
Programmatic exports include createAngularConfigs, createCommonConfigs, createCommonJsConfigs, createEnvironmentConfigs, createNodeToolingConfigs, createImportConfigs, createJavaScriptConfig(s), createJsonExtends, createJsonConfigs, createLodashConfigs, createMarkdownConfigs, createPrettierConfigs, createPromiseConfigs, createReactConfigs, createRegexpConfigs, createPackageJsonSortConfigs, createTsconfigSortConfigs, createTypeScriptParserOptions, createTypeScriptExtends, createTypeScriptConfig(s), createTypeScriptDeclarationConfigs, createTypeAwareConfigs, createVueConfigs, createYamlConfigs, and their option types.
const { createPromiseConfigs, createRegexpConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
overrides: [
...createPromiseConfigs(["src/**/*.{js,ts}"]),
...createRegexpConfigs(["src/**/*.{js,ts}"]),
{
files: ["src/**/*.{js,ts}"],
rules: {
"no-console": "warn",
},
},
],
};Factories return ESLint 8 legacy configs or overrides. Place fragments at the correct root, extends, or overrides level.
createAngularConfigs Create
Creates Angular TypeScript, external-template, and inline-template legacy overrides.
The TypeScript override inherits typescript-eslint before Angular recommended rules. When inline templates are enabled, the same override registers the Angular template processor. External templates always use their dedicated parser. An empty file scope produces no corresponding override.
Signature
export const createAngularConfigs = ({
inlineTemplates = true,
templateAccessibility = true,
templateFiles = [GLOB_ANGULAR_TEMPLATE],
typescriptFiles = [GLOB_ANGULAR_TYPESCRIPT],
}: AngularConfigOptions = {}, typeScriptOptions: TypeScriptConfigOptions = {}): Linter.ConfigOverride[];Example
const { createAngularConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createAngularConfigs({ inlineTemplates: true, templateAccessibility: true }),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | AngularConfigOptions | Optional; defaults to {} | Angular file scopes, processor, and template accessibility options. |
typeScriptOptions | TypeScriptConfigOptions | Optional; defaults to {} | Parser and type-aware options passed to the TypeScript layer. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | ESLint 8 overrides ordered by TypeScript source, then external templates. |
createCommonConfigs Create
Creates base configuration across JavaScript, TypeScript, Vue, React, and Angular sources.
eslint:recommended provides language-level correctness; documented common rules are appended afterward.
Signature
export const createCommonConfigs = (files: readonly string[] = GLOBS_CODE): Linter.ConfigOverride[];Example
const { createCommonConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createCommonConfigs(["src/**/*.{js,ts}"]),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
files | readonly string[] | Optional; defaults to GLOBS_CODE | Globs receiving base correctness rules. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One file-scoped override; an empty file set returns an empty array. |
createCommonJsConfigs Create
Creates a CommonJS-extension compatibility override.
.cjs and .cts already identify module format, so the TypeScript prohibition on require() is disabled; the override changes neither parser, env, nor other module rules.
Signature
export const createCommonJsConfigs = (): Linter.ConfigOverride[];Example
const { createCommonJsConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createCommonJsConfigs(),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
This method has no input parameters.
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One rule override shared by .cjs and .cts files. |
createEnvironmentConfigs Create
Creates application runtime environment configuration.
Signature
export const createEnvironmentConfigs = ({ environment = "browser", files = [] }: EnvironmentConfigOptions = {}): Linter.ConfigOverride[];Example
const { createEnvironmentConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createEnvironmentConfigs({ environment: "browser", files: ["src/**/*.ts"] }),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | EnvironmentConfigOptions | Optional; defaults to {} | Runtime environment and target files. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One file-scoped env override; an empty scope returns an empty array. |
createNodeToolingConfigs Create
Creates Node tooling environment configuration.
Matches only config, setup, scripts, bin, CLI, and test tooling files, keeping Node globals out of browser application source. Apply after language rules to reliably disable no-console in tooling.
Signature
export const createNodeToolingConfigs = (): Linter.ConfigOverride[];Example
const { createNodeToolingConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createNodeToolingConfigs(),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
This method has no input parameters.
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One Node-tooling-specific override. |
createImportConfigs Create
Creates module-import configuration.
The shared library does not guess aliases or resolvers; it enables import-x recommendations and deterministic ordering, while importRules explicitly disables resolver-dependent rules.
Signature
export const createImportConfigs = (files: readonly string[]): Linter.ConfigOverride[];Example
const { createImportConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createImportConfigs(["src/**/*.{ts,tsx}"]),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
files | readonly string[] | Required | Script/framework file globs receiving import-x rules. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One file-scoped override; an empty file set returns an empty array. |
createJavaScriptConfig Create
Creates JavaScript and JSX configuration.
Explicitly enables JSX parsing; earlier createCommonConfigs() supplies base correctness and common rules.
Signature
export const createJavaScriptConfig = (files: readonly string[] = GLOBS_JAVASCRIPT): JavaScriptConfigOverride;Example
const { createJavaScriptConfig } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
createJavaScriptConfig(["src/**/*.js"]),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
files | readonly string[] | Optional; defaults to GLOBS_JAVASCRIPT | JavaScript file globs owned by this override. |
Returns
| Value | Type | Description |
|---|---|---|
configs | JavaScriptConfigOverride | One override with parserOptions and local JavaScript rules. |
createJavaScriptConfigs Create
Wraps the configuration in an override array for composition.
Signature
export const createJavaScriptConfigs = (files: readonly string[] = GLOBS_JAVASCRIPT): Linter.ConfigOverride[];Example
const { createJavaScriptConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createJavaScriptConfigs(["src/**/*.js"]),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
files | readonly string[] | Optional; defaults to GLOBS_JAVASCRIPT | File globs owned by JavaScript configuration. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | Array always containing one JavaScript override. |
createJsonExtends Create
Returns the legacy recommended extends chain for a JSON dialect.
Signature
export const createJsonExtends = (dialect: "json" | "json5" | "jsonc", prettier = true): string[];Example
const { createJsonExtends } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
{
files: ["**/*.jsonc"],
extends: createJsonExtends("jsonc", true),
rules: { "jsonc/sort-keys": "off" },
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
dialect | "json" | "json5" | "jsonc" | Required | Strict JSON, JSON5, or comment-permitting JSONC. |
prettier | unknown | Optional; defaults to true | Whether to disable Prettier-conflicting rules after recommendations. |
Returns
| Value | Type | Description |
|---|---|---|
configs | string[] | Ordered names usable directly as legacy override extends. |
createJsonConfigs Create
Creates JSON, JSONC, and JSON5 configuration.
Strict JSON excludes .json-named tsconfig and VS Code settings files whose formats permit comments. Each dialect uses its own override so strict JSON rules do not misread JSONC/JSON5.
Signature
export const createJsonConfigs = ({ prettier = true }: JsonConfigOptions = {}): Linter.ConfigOverride[];Example
const { createJsonConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createJsonConfigs({ prettier: true }),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | JsonConfigOptions | Optional; defaults to {} | Prettier compatibility switch. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | Overrides ordered by strict JSON, JSONC, JSON5, VS Code settings, then tsconfig. |
createLodashConfigs Create
Creates Lodash static-import source restrictions.
Signature
export const createLodashConfigs = (preference: LodashPreference, files: readonly string[]): Linter.ConfigOverride[];Example
const { createLodashConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createLodashConfigs("lodash", ["src/**/*.ts"]),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
preference | LodashPreference | Required | Only permitted Lodash package entry. |
files | readonly string[] | Required | Code globs receiving this organizational policy. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One rule override; empty file sets return an empty array. |
createMarkdownConfigs Create
Creates Markdown processor and virtual-code-block configuration.
Examples lack full project context, so noisy resolver, unused-symbol, and console checks are disabled. Root processor extends and virtual-file overrides are returned separately; preserve both and their order.
Signature
export const createMarkdownConfigs = (): MarkdownConfigs;Example
const { createMarkdownConfigs } = require("@fast-china/eslint-config-legacy/configs");
const markdown = createMarkdownConfigs();
module.exports = {
root: true,
extends: markdown.extends,
overrides: [
...markdown.overrides,
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
This method has no input parameters.
Returns
| Value | Type | Description |
|---|---|---|
configs | MarkdownConfigs | Combined root Markdown extends and code-block override result. |
createPrettierConfigs Create
Creates the Prettier compatibility layer.
Only disables conflicting rules; it does not execute Prettier in ESLint. Project rules still apply afterward.
Signature
export const createPrettierConfigs = (files: readonly string[]): Linter.ConfigOverride[];Example
const { createPrettierConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createPrettierConfigs(["src/**/*.{js,ts}"]),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
files | readonly string[] | Required | Code globs requiring formatting-conflict rules disabled. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One Prettier compatibility override; empty file sets return an empty array. |
createPromiseConfigs Create
Creates recommended Promise control-flow/error-handling configuration.
Applies plugin:promise/recommended without starting type services; type-aware Promise checks come from typescript-eslint presets in /type-aware.
Signature
export const createPromiseConfigs = (files: readonly string[]): Linter.ConfigOverride[];Example
const { createPromiseConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createPromiseConfigs(["src/**/*.{js,ts}"]),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
files | readonly string[] | Required | Code globs receiving Promise rules. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One recommended-rule override; empty file sets return an empty array. |
createReactConfigs Create
Creates React, Hooks, and JSX-accessibility legacy overrides.
JavaScript and TypeScript use separate overrides while sharing React, Hooks, JSX accessibility extends and React version settings. TSX additionally disables PropTypes; automatic runtime disables React-in-scope rules. Disabled languages or empty scopes produce no corresponding override.
Signature
export const createReactConfigs = ({
javascriptFiles = [...GLOBS_JAVASCRIPT],
jsxRuntime = "automatic",
typescriptFiles = [...GLOBS_TYPESCRIPT],
version = "detect",
}: ReactConfigOptions = {}, { javascript = true, typescript = true, typescriptOptions = {} }: ReactLanguageOptions = {}): Linter.ConfigOverride[];Example
const { createReactConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createReactConfigs({ importSource: "react", version: "detect" }),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | ReactConfigOptions | Optional; defaults to {} | React version, JSX runtime, and both language file scopes. |
options | ReactLanguageOptions | Optional; defaults to {} | React version, JSX runtime, and both language file scopes. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | React overrides ordered by JavaScript, then TypeScript. |
createRegexpConfigs Create
Creates regular-expression correctness/security configuration.
Explicitly enables invalid-structure, potential-error, and catastrophic-backtracking rules matching the modern config, without inheriting the style-oriented full recommended preset. Some rules autofix; verify actual matching behavior afterward.
Signature
export const createRegexpConfigs = (files: readonly string[]): Linter.ConfigOverride[];Example
const { createRegexpConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createRegexpConfigs(["src/**/*.{js,ts}"]),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
files | readonly string[] | Required | Code globs receiving RegExp rules. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One recommended-rule override; empty file sets return an empty array. |
createPackageJsonSortConfigs Create
Creates an explicitly enabled package.json sorting override.
Without a loaded JSON base configuration, supplies the strict JSON parser and recommended rules for package.json. packageJsonSortRules defines ordering and intentionally avoids conditional-export objects.
Signature
export const createPackageJsonSortConfigs = ({ json = true, prettier = true }: PackageJsonSortConfigOptions = {}): Linter.ConfigOverride[];Example
const { createPackageJsonSortConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createPackageJsonSortConfigs({ json: true, prettier: true }),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | PackageJsonSortConfigOptions | Optional; defaults to {} | Whether JSON base configuration exists and whether Prettier compatibility is enabled. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One override matching only package.json. |
createTsconfigSortConfigs Create
Creates an explicitly enabled tsconfig*.json sorting override.
Without JSON base configuration, supplies a JSONC parser and recommended rules, preserving valid comments. Sorting changes field order only, not compiler options, file lists, or project-reference values.
Signature
export const createTsconfigSortConfigs = ({ json = true, prettier = true }: TsconfigSortConfigOptions = {}): Linter.ConfigOverride[];Example
const { createTsconfigSortConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createTsconfigSortConfigs({ json: true, prettier: true }),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | TsconfigSortConfigOptions | Optional; defaults to {} | Whether JSON base configuration exists and whether Prettier compatibility is enabled. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One override matching base and derived tsconfig files. |
createTypeScriptParserOptions Create
Creates shared parserOptions for TypeScript and Vue TypeScript.
Non-type-aware mode declares modern ECMAScript module semantics. Type-aware mode additionally starts Project Service with consistent Vue/NVue extensions and sets tsconfigRootDir only when explicitly supplied. All type-aware files must share extraFileExtensions to avoid repeated TypeScript Server reloads while checking mixed TypeScript and Vue files.
Signature
export const createTypeScriptParserOptions = (options: TypeAwareOptions = {}): Linter.ParserOptions;Example
const { createTypeScriptParserOptions } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: createTypeScriptParserOptions({ typeChecked: true }),
extends: ["@fast-china/eslint-config-legacy/typescript"],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | TypeAwareOptions | Optional; defaults to {} | Type-aware switch and optional tsconfig root. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ParserOptions | New parserOptions usable by @typescript-eslint/parser or a Vue child parser. |
createTypeScriptExtends Create
Returns typescript-eslint legacy recommendations for the selected type-aware mode.
Signature
export const createTypeScriptExtends = (options: TypeAwareOptions = {}): string[];Example
const { createTypeScriptExtends } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
{
files: ["src/**/*.ts"],
extends: createTypeScriptExtends({}),
rules: { "no-console": "warn" },
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | TypeAwareOptions | Optional; defaults to {} | Type-aware switch. |
Returns
| Value | Type | Description |
|---|---|---|
configs | string[] | Legacy extends names corresponding to the modern recommendedTypeChecked baseline. |
createTypeScriptConfig Create
Creates TypeScript configuration.
Local JavaScript rules also apply to TypeScript, followed by typescript-eslint replacements disabling core rules that do not understand type syntax.
Signature
export const createTypeScriptConfig = (options: TypeScriptConfigOptions = {}, files: readonly string[] = options.files ?? GLOBS_TYPESCRIPT): TypeScriptConfigOverride;Example
const { createTypeScriptConfig } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
createTypeScriptConfig({}),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | TypeScriptConfigOptions | Optional; defaults to {} | TypeScript file scopes and type-aware parser options. |
files | readonly string[] | Optional; defaults to options.files ?? GLOBS_TYPESCRIPT | Explicit file scope overriding options.files for framework reuse. |
Returns
| Value | Type | Description |
|---|---|---|
configs | TypeScriptConfigOverride | One override containing parser, extends, parserOptions, and complete local rules. |
createTypeScriptConfigs Create
Wraps the configuration in an override array for composition.
Signature
export const createTypeScriptConfigs = (options: TypeScriptConfigOptions = {}): Linter.ConfigOverride[];Example
const { createTypeScriptConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createTypeScriptConfigs({ typeChecked: true }),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | TypeScriptConfigOptions | Optional; defaults to {} | TypeScript file scope and parser options. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | Array always containing one TypeScript override. |
createTypeScriptDeclarationConfigs Create
Creates TypeScript declaration-file compatibility overrides.
Declaration files may contain unused public symbols and imports used only for global augmentation, so implementation-cleanup unused/type-import rules are disabled. Place after ordinary TypeScript configuration.
Signature
export const createTypeScriptDeclarationConfigs = (): Linter.ConfigOverride[];Example
const { createTypeScriptDeclarationConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createTypeScriptDeclarationConfigs(),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
This method has no input parameters.
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One override for .d.ts, .d.cts, and .d.mts. |
createTypeAwareConfigs Create
Creates type-aware fragments composable after TypeScript, React, Angular, or Vue configuration.
Project Service finds the nearest tsconfig above each checked file; complex monorepos can add parserOptions.tsconfigRootDir in their own eslintrc overrides. TypeScript/TSX and Vue SFC use separate parser chains to avoid treating templates as TypeScript.
Signature
export const createTypeAwareConfigs = (): Linter.ConfigOverride[];Example
const { createTypeAwareConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createTypeAwareConfigs(),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
This method has no input parameters.
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | Two type-aware overrides for TypeScript dialects, then Vue SFCs. |
createVueConfigs Create
Creates Vue 2/3 SFC configuration.
vue-eslint-parser always parses templates; when TypeScript is enabled, parserOptions.parser handles scripts and TypeScript core replacements. Common Vue rules follow upstream presets, with Vue-major-specific rules applied last.
Signature
export const createVueConfigs = ({
files = [GLOB_VUE],
typeChecked = false,
tsconfigRootDir,
typescript = true,
version = 3,
}: VueConfigOptions = {}): Linter.ConfigOverride[];Example
const { createVueConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createVueConfigs({ version: 3, typescript: true }),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | VueConfigOptions | Optional; defaults to {} | Vue major version, file scopes, TypeScript, and type-aware options. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One legacy override matching Vue SFCs. |
createYamlConfigs Create
Creates YAML parsing, recommended rules, and optional Prettier compatibility.
Signature
export const createYamlConfigs = ({ prettier = true }: YamlConfigOptions = {}): Linter.ConfigOverride[];Example
const { createYamlConfigs } = require("@fast-china/eslint-config-legacy/configs");
module.exports = {
root: true,
overrides: [
...createYamlConfigs({ prettier: true }),
{
files: ["src/**/*.{js,ts,vue}"],
rules: {
"no-console": "warn",
},
},
],
};Input
| Input | Type | Required / default | Description |
|---|---|---|---|
options | YamlConfigOptions | Optional; defaults to {} | Prettier compatibility switch. |
Returns
| Value | Type | Description |
|---|---|---|
configs | Linter.ConfigOverride[] | One override matching .yaml and .yml. |
