@fast-china/eslint-config 2.1.4 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +11 -2
  3. package/README.zh.md +11 -2
  4. package/dist/configs/angular.d.mts +2 -3
  5. package/dist/configs/common.d.mts +1 -2
  6. package/dist/configs/environment.d.mts +4 -5
  7. package/dist/configs/ignores.d.mts +3 -4
  8. package/dist/configs/import.d.mts +1 -2
  9. package/dist/configs/javascript.d.mts +1 -2
  10. package/dist/configs/json.d.mts +1 -2
  11. package/dist/configs/lodash.d.mts +2 -3
  12. package/dist/configs/markdown.d.mts +1 -2
  13. package/dist/configs/prettier.d.mts +1 -2
  14. package/dist/configs/prettier.mjs +1 -0
  15. package/dist/configs/prettier.mjs.map +1 -1
  16. package/dist/configs/react.d.mts +2 -3
  17. package/dist/configs/regexp.d.mts +1 -2
  18. package/dist/configs/sort-package.d.mts +1 -2
  19. package/dist/configs/sort-tsconfig.d.mts +1 -2
  20. package/dist/configs/typescript.d.mts +10 -7
  21. package/dist/configs/typescript.mjs +13 -5
  22. package/dist/configs/typescript.mjs.map +1 -1
  23. package/dist/configs/uniapp.d.mts +1 -2
  24. package/dist/configs/vue.d.mts +1 -2
  25. package/dist/configs/vue.mjs +7 -2
  26. package/dist/configs/vue.mjs.map +1 -1
  27. package/dist/constants/index.d.mts +17 -18
  28. package/dist/index.d.mts +6 -6
  29. package/dist/index.mjs +1 -1
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/plugins/import.mjs +0 -1
  32. package/dist/plugins/import.mjs.map +1 -1
  33. package/dist/rules/angular.d.mts +3 -4
  34. package/dist/rules/common.d.mts +5 -5
  35. package/dist/rules/common.mjs +8 -1
  36. package/dist/rules/common.mjs.map +1 -1
  37. package/dist/rules/import.d.mts +1 -2
  38. package/dist/rules/javascript.d.mts +1 -2
  39. package/dist/rules/lodash.d.mts +2 -3
  40. package/dist/rules/react.d.mts +1 -2
  41. package/dist/rules/regexp.d.mts +1 -2
  42. package/dist/rules/sort-package.d.mts +1 -2
  43. package/dist/rules/sort-tsconfig.d.mts +1 -2
  44. package/dist/rules/typescript.d.mts +36 -7
  45. package/dist/rules/typescript.mjs +29 -5
  46. package/dist/rules/typescript.mjs.map +1 -1
  47. package/dist/rules/vue.d.mts +1 -2
  48. package/dist/typegen.d.mts +78 -24
  49. package/docs/engineering-audit.zh.md +3 -3
  50. package/docs/rules-risk.md +25 -16
  51. package/docs/rules-risk.zh.md +15 -6
  52. package/package.json +18 -18
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * 根入口提供面向 Vue 3、TypeScript 与 UniApp 浏览器项目的固定 ESLint 配置。\n *\n * 配置片段、glob 常量与原始规则分别由 `./configs`、`./constants` 与 `./rules` 子路径提供。\n *\n * @packageDocumentation\n */\nimport { defineConfig } from \"eslint/config\";\nimport { createCommonConfigs } from \"./configs/common\";\nimport { createEnvironmentConfigs, createNodeToolingConfigs } from \"./configs/environment\";\nimport { createGitignoreConfigs, createGlobalIgnores } from \"./configs/ignores\";\nimport { createImportConfigs } from \"./configs/import\";\nimport { createJavaScriptConfigs } from \"./configs/javascript\";\nimport { createJsonConfigs } from \"./configs/json\";\nimport { createPrettierConfigs } from \"./configs/prettier\";\nimport { createRegexpConfigs } from \"./configs/regexp\";\nimport { createPackageJsonSortConfigs } from \"./configs/sort-package\";\nimport { createTsconfigSortConfigs } from \"./configs/sort-tsconfig\";\nimport { createTypeScriptConfigs } from \"./configs/typescript\";\nimport { createUniAppConfigs } from \"./configs/uniapp\";\nimport { createVueConfigs } from \"./configs/vue\";\nimport { GLOBS_CODE, GLOBS_JAVASCRIPT, GLOBS_TYPESCRIPT, GLOB_NVUE } from \"./constants\";\nimport type { Linter } from \"eslint\";\nimport type { Config } from \"eslint/config\";\nimport type { RuntimeEnvironment } from \"./configs/environment\";\nimport type { RuleOptions } from \"./typegen\";\n\ntype RejectUnknownRuleNames<Rules extends RuleOptions> = Rules & Record<Exclude<keyof Rules, keyof RuleOptions>, never>;\n\n/**\n * 为项目规则提供精确的规则名、严重级别和规则选项自动补全。\n *\n * @remarks\n * 该函数不会修改传入对象;它只在 TypeScript 编译阶段拒绝未知规则和无效选项。\n *\n * @typeParam Rules - 调用方传入的规则记录类型;保留字面量键和值以提供精确推断。\n * @param rules - 需要进行规则名、严重级别和选项校验的 ESLint 规则记录。\n * @returns 原始规则记录。返回值同时兼容 ESLint 的通用 `RulesRecord` 类型。\n */\nexport const defineRules = <const Rules extends RuleOptions>(rules: RejectUnknownRuleNames<Rules>): Rules & Linter.RulesRecord => rules;\n\nexport type { RuleOptions } from \"./typegen\";\n\n/**\n * 根配置工厂唯一保留的项目选项。\n *\n * @remarks\n * 根入口固定启用 `.gitignore`、JavaScript、类型感知 TypeScript、Vue 3、UniApp、Import、\n * RegExp、JSON、清单排序和 Prettier 兼容层。项目级规则、globals 与 ignores 应通过\n * `fastConfig()` 的后置 Flat Config 参数声明。React、Angular、Markdown 与其他可选能力\n * 应从 `@fast-china/eslint-config/configs` 显式组合。\n */\nexport interface FastConfigOptions {\n\t/**\n\t * 应用代码实际运行的环境。\n\t *\n\t * - `\"browser\"`:提供浏览器全局变量。\n\t * - `\"node\"`:提供 Node.js 全局变量。\n\t * - `\"universal\"`:同时提供浏览器与 Node.js 全局变量。\n\t *\n\t * 配置文件、脚本、测试和 CLI 文件无论选择何种环境都会单独获得 Node.js globals。\n\t * @defaultValue `\"browser\"`\n\t */\n\tenvironment?: RuntimeEnvironment;\n}\n\nconst SCRIPT_FILES = [...GLOBS_JAVASCRIPT, ...GLOBS_TYPESCRIPT];\nconst VUE_PROJECT_FILES = [...GLOBS_CODE, GLOB_NVUE];\n\nconst createProjectConfigs = (environment: RuntimeEnvironment, codeFiles: readonly string[], frameworkConfigs: readonly Config[] = []): Config[] =>\n\tdefineConfig([\n\t\t...createGlobalIgnores(),\n\t\t...createGitignoreConfigs(),\n\t\t...createEnvironmentConfigs({\n\t\t\tenvironment,\n\t\t\tfiles: codeFiles,\n\t\t\tnodeFiles: SCRIPT_FILES,\n\t\t}),\n\t\t...createCommonConfigs(codeFiles),\n\t\t...createJavaScriptConfigs(),\n\t\t...createImportConfigs(codeFiles),\n\t\t...createRegexpConfigs(codeFiles),\n\t\t...createTypeScriptConfigs(),\n\t\t...createJsonConfigs(),\n\t\t...createPackageJsonSortConfigs(),\n\t\t...createTsconfigSortConfigs(),\n\t\t...frameworkConfigs,\n\t\t...createPrettierConfigs(),\n\t\t...createNodeToolingConfigs(SCRIPT_FILES),\n\t]);\n\n/**\n * 创建不绑定前端框架的固定基础配置。\n *\n * @remarks\n * 默认包含 `.gitignore`、JavaScript、类型感知 TypeScript、Import、RegExp、JSON、\n * `package.json`/`tsconfig*.json` 排序、Prettier 兼容层和 Node.js 工程文件覆写。\n * React、Angular、Markdown 与 Lodash 等能力由调用方从 `./configs` 子路径继续组合。\n *\n * @param options - 应用代码的运行环境。\n * @returns 可作为 React、Angular、Node.js 或 SDK 项目基础的 Flat Config 数组。\n */\nexport const createBaseConfigs = ({ environment = \"browser\" }: FastConfigOptions = {}): Config[] => createProjectConfigs(environment, SCRIPT_FILES);\n\nconst createVueProjectConfigs = ({ environment = \"browser\" }: FastConfigOptions = {}): Config[] =>\n\tcreateProjectConfigs(environment, VUE_PROJECT_FILES, [...createVueConfigs(), ...createUniAppConfigs(VUE_PROJECT_FILES)]);\n\n/**\n * 创建固定的 Vue 3、TypeScript 与 UniApp ESLint Flat Config。\n *\n * @remarks\n * 除运行环境外,根入口不提供能力启停开关。TypeScript 和 Vue 始终使用\n * `recommendedTypeChecked` 与 Project Service;被检查文件必须属于可发现的 tsconfig。\n * 额外配置会放在全部内置片段之后,因此可以覆盖项目规则、globals、ignores 或解析器选项。\n *\n * @param options - 应用代码的运行环境。\n * @param overrides - 追加到全部内置片段之后的 ESLint Flat Config。\n * @returns 可直接导出给 ESLint 的 Flat Config 数组。\n *\n * @example\n * ```ts\n * import { defineRules, fastConfig } from \"@fast-china/eslint-config\";\n *\n * export default fastConfig(\n * { environment: \"browser\" },\n * {\n * files: [\"src/generated/*.ts\"],\n * rules: defineRules({ \"@typescript-eslint/no-unused-vars\": \"off\" }),\n * },\n * );\n * ```\n */\nexport const fastConfig = ({ environment = \"browser\" }: FastConfigOptions = {}, ...overrides: Config[]): Config[] =>\n\tdefineConfig([...createVueProjectConfigs({ environment }), ...overrides]);\n\n/**\n * 可直接导出或展开的默认 ESLint Flat Config。\n *\n * @remarks\n * 默认使用浏览器环境。需要切换运行环境或追加项目覆写时,请使用具名导出的\n * {@link fastConfig} 工厂。\n */\nconst fastChina: Config[] = fastConfig();\n\nexport default fastChina;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,eAAgD,UAAqE;AA2BlI,MAAM,eAAe,CAAC,GAAG,kBAAkB,GAAG,gBAAgB;AAC9D,MAAM,oBAAoB,CAAC,GAAG,YAAY,SAAS;AAEnD,MAAM,wBAAwB,aAAiC,WAA8B,mBAAsC,CAAC,MACnI,aAAa;CACZ,GAAG,oBAAoB;CACvB,GAAG,uBAAuB;CAC1B,GAAG,yBAAyB;EAC3B;EACA,OAAO;EACP,WAAW;CACZ,CAAC;CACD,GAAG,oBAAoB,SAAS;CAChC,GAAG,wBAAwB;CAC3B,GAAG,oBAAoB,SAAS;CAChC,GAAG,oBAAoB,SAAS;CAChC,GAAG,wBAAwB;CAC3B,GAAG,kBAAkB;CACrB,GAAG,6BAA6B;CAChC,GAAG,0BAA0B;CAC7B,GAAG;CACH,GAAG,sBAAsB;CACzB,GAAG,yBAAyB,YAAY;AACzC,CAAC;;;;;;;;;;;;AAaF,MAAa,qBAAqB,EAAE,cAAc,cAAiC,CAAC,MAAgB,qBAAqB,aAAa,YAAY;AAElJ,MAAM,2BAA2B,EAAE,cAAc,cAAiC,CAAC,MAClF,qBAAqB,aAAa,mBAAmB,CAAC,GAAG,iBAAiB,GAAG,GAAG,oBAAoB,iBAAiB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BxH,MAAa,cAAc,EAAE,cAAc,cAAiC,CAAC,GAAG,GAAG,cAClF,aAAa,CAAC,GAAG,wBAAwB,EAAE,YAAY,CAAC,GAAG,GAAG,SAAS,CAAC;;;;;;;;AASzE,MAAM,YAAsB,WAAW"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * 根入口提供面向 Vue 3、TypeScript 与 UniApp 浏览器项目的固定 ESLint 配置。\n *\n * 配置片段、glob 常量与原始规则分别由 `./configs`、`./constants` 与 `./rules` 子路径提供。\n *\n * @packageDocumentation\n */\nimport { defineConfig } from \"eslint/config\";\nimport { createCommonConfigs } from \"./configs/common\";\nimport { createEnvironmentConfigs, createNodeToolingConfigs } from \"./configs/environment\";\nimport { createGitignoreConfigs, createGlobalIgnores } from \"./configs/ignores\";\nimport { createImportConfigs } from \"./configs/import\";\nimport { createJavaScriptConfigs } from \"./configs/javascript\";\nimport { createJsonConfigs } from \"./configs/json\";\nimport { createPrettierConfigs } from \"./configs/prettier\";\nimport { createRegexpConfigs } from \"./configs/regexp\";\nimport { createPackageJsonSortConfigs } from \"./configs/sort-package\";\nimport { createTsconfigSortConfigs } from \"./configs/sort-tsconfig\";\nimport { createTypeScriptConfigs } from \"./configs/typescript\";\nimport { createUniAppConfigs } from \"./configs/uniapp\";\nimport { createVueConfigs } from \"./configs/vue\";\nimport { GLOBS_CODE, GLOBS_JAVASCRIPT, GLOBS_TYPESCRIPT, GLOB_NVUE } from \"./constants\";\nimport type { Linter } from \"eslint\";\nimport type { Config } from \"eslint/config\";\nimport type { RuntimeEnvironment } from \"./configs/environment\";\nimport type { RuleOptions } from \"./typegen\";\n\ntype RejectUnknownRuleNames<Rules extends RuleOptions> = Rules & Record<Exclude<keyof Rules, keyof RuleOptions>, never>;\n\n/**\n * 为项目规则提供精确的规则名、严重级别和规则选项自动补全。\n *\n * @remarks\n * 该函数不会修改传入对象;它只在 TypeScript 编译阶段拒绝未知规则和无效选项。\n *\n * @typeParam Rules - 调用方传入的规则记录类型;保留字面量键和值以提供精确推断。\n * @param rules - 需要进行规则名、严重级别和选项校验的 ESLint 规则记录。\n * @returns 原始规则记录。返回值同时兼容 ESLint 的通用 `RulesRecord` 类型。\n */\nexport const defineRules = <const Rules extends RuleOptions>(rules: RejectUnknownRuleNames<Rules>): Rules & Linter.RulesRecord => rules;\n\nexport type { RuleOptions } from \"./typegen\";\n\n/**\n * 根配置工厂唯一保留的项目选项。\n *\n * @remarks\n * 根入口固定启用 `.gitignore`、JavaScript、类型感知 TypeScript、Vue 3、UniApp、Import、\n * RegExp、JSON、清单排序和 Prettier 兼容层。项目级规则、globals 与 ignores 应通过\n * `fastConfig()` 的后置 Flat Config 参数声明。React、Angular、Markdown 与其他可选能力\n * 应从 `@fast-china/eslint-config/configs` 显式组合。\n */\nexport interface FastConfigOptions {\n\t/**\n\t * 应用代码实际运行的环境。\n\t *\n\t * - `\"browser\"`:提供浏览器全局变量。\n\t * - `\"node\"`:提供 Node.js 全局变量。\n\t * - `\"universal\"`:同时提供浏览器与 Node.js 全局变量。\n\t *\n\t * 配置文件、脚本、测试和 CLI 文件无论选择何种环境都会单独获得 Node.js globals。\n\t * @defaultValue `\"browser\"`\n\t */\n\tenvironment?: RuntimeEnvironment;\n}\n\nconst SCRIPT_FILES = [...GLOBS_JAVASCRIPT, ...GLOBS_TYPESCRIPT];\nconst VUE_PROJECT_FILES = [...GLOBS_CODE, GLOB_NVUE];\n\nconst createProjectConfigs = (environment: RuntimeEnvironment, codeFiles: readonly string[], frameworkConfigs: readonly Config[] = []): Config[] =>\n\tdefineConfig([\n\t\t...createGlobalIgnores(),\n\t\t...createGitignoreConfigs(),\n\t\t...createEnvironmentConfigs({\n\t\t\tenvironment,\n\t\t\tfiles: codeFiles,\n\t\t\tnodeFiles: SCRIPT_FILES,\n\t\t}),\n\t\t...createCommonConfigs(codeFiles),\n\t\t...createJavaScriptConfigs(),\n\t\t...createImportConfigs(codeFiles),\n\t\t...createRegexpConfigs(codeFiles),\n\t\t...createTypeScriptConfigs(),\n\t\t...createJsonConfigs(),\n\t\t...createPackageJsonSortConfigs(),\n\t\t...createTsconfigSortConfigs(),\n\t\t...frameworkConfigs,\n\t\t...createPrettierConfigs(),\n\t\t...createNodeToolingConfigs(SCRIPT_FILES),\n\t]);\n\n/**\n * 创建不绑定前端框架的固定基础配置。\n *\n * @remarks\n * 默认包含 `.gitignore`、JavaScript、类型感知 TypeScript、Import、RegExp、JSON、\n * `package.json`/`tsconfig*.json` 排序、Prettier 兼容层和 Node.js 工程文件覆写。\n * React、Angular、Markdown 与 Lodash 等能力由调用方从 `./configs` 子路径继续组合。\n *\n * @param options - 应用代码的运行环境。\n * @returns 可作为 React、Angular、Node.js 或 SDK 项目基础的 Flat Config 数组。\n */\nexport const createBaseConfigs = ({ environment = \"browser\" }: FastConfigOptions = {}): Config[] => createProjectConfigs(environment, SCRIPT_FILES);\n\nconst createVueProjectConfigs = ({ environment = \"browser\" }: FastConfigOptions = {}): Config[] =>\n\tcreateProjectConfigs(environment, VUE_PROJECT_FILES, [...createVueConfigs(), ...createUniAppConfigs(VUE_PROJECT_FILES)]);\n\n/**\n * 创建固定的 Vue 3、TypeScript 与 UniApp ESLint Flat Config。\n *\n * @remarks\n * 除运行环境外,根入口不提供能力启停开关。TypeScript 和 Vue 始终使用\n * `strictTypeChecked`、`stylisticTypeChecked` 与 Project Service;被检查文件必须属于可发现的 tsconfig。\n * 额外配置会放在全部内置片段之后,因此可以覆盖项目规则、globals、ignores 或解析器选项。\n *\n * @param options - 应用代码的运行环境。\n * @param overrides - 追加到全部内置片段之后的 ESLint Flat Config。\n * @returns 可直接导出给 ESLint 的 Flat Config 数组。\n *\n * @example\n * ```ts\n * import { defineRules, fastConfig } from \"@fast-china/eslint-config\";\n *\n * export default fastConfig(\n * { environment: \"browser\" },\n * {\n * files: [\"src/generated/*.ts\"],\n * rules: defineRules({ \"@typescript-eslint/no-unused-vars\": \"off\" }),\n * },\n * );\n * ```\n */\nexport const fastConfig = ({ environment = \"browser\" }: FastConfigOptions = {}, ...overrides: Config[]): Config[] =>\n\tdefineConfig([...createVueProjectConfigs({ environment }), ...overrides]);\n\n/**\n * 可直接导出或展开的默认 ESLint Flat Config。\n *\n * @remarks\n * 默认使用浏览器环境。需要切换运行环境或追加项目覆写时,请使用具名导出的\n * {@link fastConfig} 工厂。\n */\nconst fastChina: Config[] = fastConfig();\n\nexport default fastChina;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,eAAgD,UAAqE;AA2BlI,MAAM,eAAe,CAAC,GAAG,kBAAkB,GAAG,gBAAgB;AAC9D,MAAM,oBAAoB,CAAC,GAAG,YAAY,SAAS;AAEnD,MAAM,wBAAwB,aAAiC,WAA8B,mBAAsC,CAAC,MACnI,aAAa;CACZ,GAAG,oBAAoB;CACvB,GAAG,uBAAuB;CAC1B,GAAG,yBAAyB;EAC3B;EACA,OAAO;EACP,WAAW;CACZ,CAAC;CACD,GAAG,oBAAoB,SAAS;CAChC,GAAG,wBAAwB;CAC3B,GAAG,oBAAoB,SAAS;CAChC,GAAG,oBAAoB,SAAS;CAChC,GAAG,wBAAwB;CAC3B,GAAG,kBAAkB;CACrB,GAAG,6BAA6B;CAChC,GAAG,0BAA0B;CAC7B,GAAG;CACH,GAAG,sBAAsB;CACzB,GAAG,yBAAyB,YAAY;AACzC,CAAC;;;;;;;;;;;;AAaF,MAAa,qBAAqB,EAAE,cAAc,cAAiC,CAAC,MAAgB,qBAAqB,aAAa,YAAY;AAElJ,MAAM,2BAA2B,EAAE,cAAc,cAAiC,CAAC,MAClF,qBAAqB,aAAa,mBAAmB,CAAC,GAAG,iBAAiB,GAAG,GAAG,oBAAoB,iBAAiB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BxH,MAAa,cAAc,EAAE,cAAc,cAAiC,CAAC,GAAG,GAAG,cAClF,aAAa,CAAC,GAAG,wBAAwB,EAAE,YAAY,CAAC,GAAG,GAAG,SAAS,CAAC;;;;;;;;AASzE,MAAM,YAAsB,WAAW"}
@@ -3,7 +3,6 @@ import eslintPluginImportX from "eslint-plugin-import-x";
3
3
  const STYLE_IMPORT_PATTERN = /\.(?:acss|css|less|pcss|postcss|sass|scss|sss|styl|stylus|ttss|wxss)(?:[?#].*)?$/i;
4
4
  const isStyleImport = (source) => typeof source === "string" && STYLE_IMPORT_PATTERN.test(source);
5
5
  const importOrderRule = eslintPluginImportX.rules.order;
6
- if (importOrderRule === void 0) throw new Error("eslint-plugin-import-x does not provide the order rule.");
7
6
  /**
8
7
  * 复用 import-x/order 的全部行为,但把样式导入交给 style-imports-last 独立处理。
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"import.mjs","names":[],"sources":["../../src/plugins/import.ts"],"sourcesContent":["import eslintPluginImportX from \"eslint-plugin-import-x\";\nimport type { Rule } from \"eslint\";\n\nconst STYLE_IMPORT_PATTERN = /\\.(?:acss|css|less|pcss|postcss|sass|scss|sss|styl|stylus|ttss|wxss)(?:[?#].*)?$/i;\n\nconst isStyleImport = (source: unknown): source is string => typeof source === \"string\" && STYLE_IMPORT_PATTERN.test(source);\n\nconst importOrderRule = eslintPluginImportX.rules.order;\n\nif (importOrderRule === undefined) {\n\tthrow new Error(\"eslint-plugin-import-x does not provide the order rule.\");\n}\n\n/**\n * 复用 import-x/order 的全部行为,但把样式导入交给 style-imports-last 独立处理。\n *\n * @remarks\n * import-x/order 没有按路径忽略导入的选项。如果让样式继续进入该规则,全局\n * alphabetize 会改变样式的层叠顺序,因此只过滤静态样式 import,其他副作用导入仍受\n * warnOnUnassignedImports 约束。\n */\nconst importOrderWithoutStylesRule: typeof importOrderRule = {\n\t...importOrderRule,\n\tcreate(context) {\n\t\tconst listeners = importOrderRule.create(context);\n\t\tconst checkImport = listeners.ImportDeclaration;\n\n\t\treturn {\n\t\t\t...listeners,\n\t\t\tImportDeclaration(node) {\n\t\t\t\tif (!isStyleImport(node.source.value)) {\n\t\t\t\t\tcheckImport?.(node);\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t},\n};\n\n/** 只要求样式导入形成文件顶部 import 区域的最后一个连续分组,不改变组内顺序。 */\nconst styleImportsLastRule: Rule.RuleModule = {\n\tmeta: {\n\t\ttype: \"suggestion\",\n\t\tdocs: {\n\t\t\tdescription: \"Require stylesheet imports to form the final contiguous import group without sorting them.\",\n\t\t},\n\t\tschema: [],\n\t\tmessages: {\n\t\t\tstyleImportsLast: \"Style import `{{source}}` must occur after all non-style imports.\",\n\t\t},\n\t},\n\tcreate(context) {\n\t\treturn {\n\t\t\tProgram(node) {\n\t\t\t\tconst imports = node.body.filter((statement) => statement.type === \"ImportDeclaration\");\n\t\t\t\tlet lastNonStyleImportIndex = -1;\n\n\t\t\t\tfor (const [index, statement] of imports.entries()) {\n\t\t\t\t\tif (!isStyleImport(statement.source.value)) {\n\t\t\t\t\t\tlastNonStyleImportIndex = index;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const statement of imports.slice(0, lastNonStyleImportIndex)) {\n\t\t\t\t\tif (isStyleImport(statement.source.value)) {\n\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\tnode: statement,\n\t\t\t\t\t\t\tmessageId: \"styleImportsLast\",\n\t\t\t\t\t\t\tdata: { source: statement.source.value },\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t},\n};\n\n/** import-x 插件适配:样式导入不参与 import-x/order,其他规则保持上游实现。 */\nexport const styleAwareImportXPlugin = {\n\t...eslintPluginImportX,\n\trules: {\n\t\t...eslintPluginImportX.rules,\n\t\torder: importOrderWithoutStylesRule,\n\t\t\"style-imports-last\": styleImportsLastRule,\n\t},\n};\n"],"mappings":";;AAGA,MAAM,uBAAuB;AAE7B,MAAM,iBAAiB,WAAsC,OAAO,WAAW,YAAY,qBAAqB,KAAK,MAAM;AAE3H,MAAM,kBAAkB,oBAAoB,MAAM;AAElD,IAAI,oBAAoB,KAAA,GACvB,MAAM,IAAI,MAAM,yDAAyD;;;;;;;;;AAW1E,MAAM,+BAAuD;CAC5D,GAAG;CACH,OAAO,SAAS;EACf,MAAM,YAAY,gBAAgB,OAAO,OAAO;EAChD,MAAM,cAAc,UAAU;EAE9B,OAAO;GACN,GAAG;GACH,kBAAkB,MAAM;IACvB,IAAI,CAAC,cAAc,KAAK,OAAO,KAAK,GACnC,cAAc,IAAI;GAEpB;EACD;CACD;AACD;;AAGA,MAAM,uBAAwC;CAC7C,MAAM;EACL,MAAM;EACN,MAAM,EACL,aAAa,6FACd;EACA,QAAQ,CAAC;EACT,UAAU,EACT,kBAAkB,oEACnB;CACD;CACA,OAAO,SAAS;EACf,OAAO,EACN,QAAQ,MAAM;GACb,MAAM,UAAU,KAAK,KAAK,QAAQ,cAAc,UAAU,SAAS,mBAAmB;GACtF,IAAI,0BAA0B;GAE9B,KAAK,MAAM,CAAC,OAAO,cAAc,QAAQ,QAAQ,GAChD,IAAI,CAAC,cAAc,UAAU,OAAO,KAAK,GACxC,0BAA0B;GAI5B,KAAK,MAAM,aAAa,QAAQ,MAAM,GAAG,uBAAuB,GAC/D,IAAI,cAAc,UAAU,OAAO,KAAK,GACvC,QAAQ,OAAO;IACd,MAAM;IACN,WAAW;IACX,MAAM,EAAE,QAAQ,UAAU,OAAO,MAAM;GACxC,CAAC;EAGJ,EACD;CACD;AACD;;AAGA,MAAa,0BAA0B;CACtC,GAAG;CACH,OAAO;EACN,GAAG,oBAAoB;EACvB,OAAO;EACP,sBAAsB;CACvB;AACD"}
1
+ {"version":3,"file":"import.mjs","names":[],"sources":["../../src/plugins/import.ts"],"sourcesContent":["import eslintPluginImportX from \"eslint-plugin-import-x\";\nimport type { Rule } from \"eslint\";\n\nconst STYLE_IMPORT_PATTERN = /\\.(?:acss|css|less|pcss|postcss|sass|scss|sss|styl|stylus|ttss|wxss)(?:[?#].*)?$/i;\n\nconst isStyleImport = (source: unknown): source is string => typeof source === \"string\" && STYLE_IMPORT_PATTERN.test(source);\n\nconst importOrderRule = eslintPluginImportX.rules.order;\n\n/**\n * 复用 import-x/order 的全部行为,但把样式导入交给 style-imports-last 独立处理。\n *\n * @remarks\n * import-x/order 没有按路径忽略导入的选项。如果让样式继续进入该规则,全局\n * alphabetize 会改变样式的层叠顺序,因此只过滤静态样式 import,其他副作用导入仍受\n * warnOnUnassignedImports 约束。\n */\nconst importOrderWithoutStylesRule: typeof importOrderRule = {\n\t...importOrderRule,\n\tcreate(context) {\n\t\tconst listeners = importOrderRule.create(context);\n\t\tconst checkImport = listeners.ImportDeclaration;\n\n\t\treturn {\n\t\t\t...listeners,\n\t\t\tImportDeclaration(node) {\n\t\t\t\tif (!isStyleImport(node.source.value)) {\n\t\t\t\t\tcheckImport?.(node);\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t},\n};\n\n/** 只要求样式导入形成文件顶部 import 区域的最后一个连续分组,不改变组内顺序。 */\nconst styleImportsLastRule: Rule.RuleModule = {\n\tmeta: {\n\t\ttype: \"suggestion\",\n\t\tdocs: {\n\t\t\tdescription: \"Require stylesheet imports to form the final contiguous import group without sorting them.\",\n\t\t},\n\t\tschema: [],\n\t\tmessages: {\n\t\t\tstyleImportsLast: \"Style import `{{source}}` must occur after all non-style imports.\",\n\t\t},\n\t},\n\tcreate(context) {\n\t\treturn {\n\t\t\tProgram(node) {\n\t\t\t\tconst imports = node.body.filter((statement) => statement.type === \"ImportDeclaration\");\n\t\t\t\tlet lastNonStyleImportIndex = -1;\n\n\t\t\t\tfor (const [index, statement] of imports.entries()) {\n\t\t\t\t\tif (!isStyleImport(statement.source.value)) {\n\t\t\t\t\t\tlastNonStyleImportIndex = index;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const statement of imports.slice(0, lastNonStyleImportIndex)) {\n\t\t\t\t\tif (isStyleImport(statement.source.value)) {\n\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\tnode: statement,\n\t\t\t\t\t\t\tmessageId: \"styleImportsLast\",\n\t\t\t\t\t\t\tdata: { source: statement.source.value },\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t},\n};\n\n/** import-x 插件适配:样式导入不参与 import-x/order,其他规则保持上游实现。 */\nexport const styleAwareImportXPlugin = {\n\t...eslintPluginImportX,\n\trules: {\n\t\t...eslintPluginImportX.rules,\n\t\torder: importOrderWithoutStylesRule,\n\t\t\"style-imports-last\": styleImportsLastRule,\n\t},\n};\n"],"mappings":";;AAGA,MAAM,uBAAuB;AAE7B,MAAM,iBAAiB,WAAsC,OAAO,WAAW,YAAY,qBAAqB,KAAK,MAAM;AAE3H,MAAM,kBAAkB,oBAAoB,MAAM;;;;;;;;;AAUlD,MAAM,+BAAuD;CAC5D,GAAG;CACH,OAAO,SAAS;EACf,MAAM,YAAY,gBAAgB,OAAO,OAAO;EAChD,MAAM,cAAc,UAAU;EAE9B,OAAO;GACN,GAAG;GACH,kBAAkB,MAAM;IACvB,IAAI,CAAC,cAAc,KAAK,OAAO,KAAK,GACnC,cAAc,IAAI;GAEpB;EACD;CACD;AACD;;AAGA,MAAM,uBAAwC;CAC7C,MAAM;EACL,MAAM;EACN,MAAM,EACL,aAAa,6FACd;EACA,QAAQ,CAAC;EACT,UAAU,EACT,kBAAkB,oEACnB;CACD;CACA,OAAO,SAAS;EACf,OAAO,EACN,QAAQ,MAAM;GACb,MAAM,UAAU,KAAK,KAAK,QAAQ,cAAc,UAAU,SAAS,mBAAmB;GACtF,IAAI,0BAA0B;GAE9B,KAAK,MAAM,CAAC,OAAO,cAAc,QAAQ,QAAQ,GAChD,IAAI,CAAC,cAAc,UAAU,OAAO,KAAK,GACxC,0BAA0B;GAI5B,KAAK,MAAM,aAAa,QAAQ,MAAM,GAAG,uBAAuB,GAC/D,IAAI,cAAc,UAAU,OAAO,KAAK,GACvC,QAAQ,OAAO;IACd,MAAM;IACN,WAAW;IACX,MAAM,EAAE,QAAQ,UAAU,OAAO,MAAM;GACxC,CAAC;EAGJ,EACD;CACD;AACD;;AAGA,MAAa,0BAA0B;CACtC,GAAG;CACH,OAAO;EACN,GAAG,oBAAoB;EACvB,OAAO;EACP,sBAAsB;CACvB;AACD"}
@@ -6,7 +6,7 @@
6
6
  * Angular ESLint 的拆分插件不直接导出 Flat Config 预置;本记录与 angular-eslint
7
7
  * 22.x 的 `tsRecommended` 保持一致,并逐条说明启用理由。
8
8
  */
9
- declare const angularRules: {
9
+ export declare const angularRules: {
10
10
  "@angular-eslint/contextual-lifecycle": "error";
11
11
  "@angular-eslint/no-empty-lifecycle-method": "error";
12
12
  "@angular-eslint/no-input-rename": "error";
@@ -28,7 +28,7 @@ declare const angularRules: {
28
28
  * 该记录与 angular-eslint 22.x 的 `templateRecommended` 对齐,并补充默认启用的现代
29
29
  * 控制流约束。它同时应用于外部模板与 processor 提取的内联模板。
30
30
  */
31
- declare const angularTemplateRules: {
31
+ export declare const angularTemplateRules: {
32
32
  "@angular-eslint/template/banana-in-box": "error";
33
33
  "@angular-eslint/template/eqeqeq": "error";
34
34
  "@angular-eslint/template/no-negated-async": "error";
@@ -41,7 +41,7 @@ declare const angularTemplateRules: {
41
41
  * 规则覆盖替代文本、键盘交互、焦点、表单标签与 ARIA 合法性,可通过
42
42
  * `createAngularConfigs({ templateAccessibility: false })` 整组关闭而不影响模板基础正确性规则。
43
43
  */
44
- declare const angularTemplateAccessibilityRules: {
44
+ export declare const angularTemplateAccessibilityRules: {
45
45
  "@angular-eslint/template/alt-text": "error";
46
46
  "@angular-eslint/template/click-events-have-key-events": "error";
47
47
  "@angular-eslint/template/elements-content": "error";
@@ -55,5 +55,4 @@ declare const angularTemplateAccessibilityRules: {
55
55
  "@angular-eslint/template/valid-aria": "error";
56
56
  };
57
57
  //#endregion
58
- export { angularRules, angularTemplateAccessibilityRules, angularTemplateRules };
59
58
  //# sourceMappingURL=angular.d.mts.map
@@ -6,15 +6,16 @@
6
6
  * 默认规则面向 SDK、OA、Admin 与客户端项目使用同一套质量标准。这里只保留
7
7
  * 跨语言且误报较少的规则;纯格式和语法偏好交给 Prettier 或项目自行覆盖。
8
8
  */
9
- declare const commonRules: {
9
+ export declare const commonRules: {
10
10
  "array-callback-return": "error";
11
11
  "no-alert": "warn";
12
12
  "no-case-declarations": "error";
13
+ "no-eval": "error";
13
14
  "no-multi-str": "error";
14
15
  "no-with": "error";
15
- "no-void": ["error", {
16
- allowAsStatement: true;
17
- }];
16
+ "no-void": "error";
17
+ curly: ["error", "multi-line", "consistent"];
18
+ "default-case-last": "error";
18
19
  eqeqeq: ["error", "always", {
19
20
  null: "ignore";
20
21
  }];
@@ -29,5 +30,4 @@ declare const commonRules: {
29
30
  }];
30
31
  };
31
32
  //#endregion
32
- export { commonRules };
33
33
  //# sourceMappingURL=common.d.mts.map
@@ -10,9 +10,16 @@ const commonRules = {
10
10
  "array-callback-return": "error",
11
11
  "no-alert": "warn",
12
12
  "no-case-declarations": "error",
13
+ "no-eval": "error",
13
14
  "no-multi-str": "error",
14
15
  "no-with": "error",
15
- "no-void": ["error", { allowAsStatement: true }],
16
+ "no-void": "error",
17
+ curly: [
18
+ "error",
19
+ "multi-line",
20
+ "consistent"
21
+ ],
22
+ "default-case-last": "error",
16
23
  eqeqeq: [
17
24
  "error",
18
25
  "always",
@@ -1 +1 @@
1
- {"version":3,"file":"common.mjs","names":[],"sources":["../../src/rules/common.ts"],"sourcesContent":["import type { RuleOptions } from \"../typegen\";\n\n/**\n * 跨 JavaScript、TypeScript 与 Vue 脚本生效的公共规则。\n *\n * @remarks\n * 默认规则面向 SDK、OA、Admin 与客户端项目使用同一套质量标准。这里只保留\n * 跨语言且误报较少的规则;纯格式和语法偏好交给 Prettier 或项目自行覆盖。\n */\nexport const commonRules = {\n\t// 要求数组回调在所有可到达分支返回值,避免 map/filter 等调用静默产生 undefined。\n\t\"array-callback-return\": \"error\",\n\t// 浏览器弹窗通常不适合生产代码;使用 warn 允许原型调试,同时确保发布前能够被发现。\n\t\"no-alert\": \"warn\",\n\t// switch 的 case 不创建词法作用域;要求用花括号包裹声明,避免跨 case 冲突。\n\t\"no-case-declarations\": \"error\",\n\t// 禁止反斜杠续行字符串,优先使用可读性更好的模板字符串。\n\t\"no-multi-str\": \"error\",\n\t// with 会让标识符解析不可预测,并且在严格模式和 ESM 中不可用。\n\t\"no-with\": \"error\",\n\t// 允许用 `void promise` 明确忽略 Promise,但禁止在普通表达式中滥用 void。\n\t\"no-void\": [\n\t\t\"error\",\n\t\t{\n\t\t\tallowAsStatement: true,\n\t\t},\n\t],\n\t// 要求严格相等;保留 `value == null` 同时判断 null/undefined 的常用写法。\n\teqeqeq: [\"error\", \"always\", { null: \"ignore\" }],\n\t// 使用幂运算符代替 Math.pow,使数学表达式更直接。\n\t\"prefer-exponentiation-operator\": \"error\",\n\t// 使用 Object.hasOwn 代替 obj.hasOwnProperty,兼容无原型对象以及同名方法被覆盖的对象。\n\t\"prefer-object-has-own\": \"error\",\n\t// 仅排序同一 import 声明中的导入成员;声明之间的分组和顺序交给 import-x/order。\n\t// 该规则无法自动修复成员顺序,使用 warn 避免历史代码因纯排序问题被立即阻断。\n\t\"sort-imports\": [\n\t\t\"warn\",\n\t\t{\n\t\t\tignoreCase: false,\n\t\t\tignoreDeclarationSort: true,\n\t\t\tignoreMemberSort: false,\n\t\t\tmemberSyntaxSortOrder: [\"none\", \"all\", \"multiple\", \"single\"],\n\t\t\tallowSeparatedGroups: false,\n\t\t},\n\t],\n} satisfies RuleOptions;\n"],"mappings":";;;;;;;;AASA,MAAa,cAAc;CAE1B,yBAAyB;CAEzB,YAAY;CAEZ,wBAAwB;CAExB,gBAAgB;CAEhB,WAAW;CAEX,WAAW,CACV,SACA,EACC,kBAAkB,KACnB,CACD;CAEA,QAAQ;EAAC;EAAS;EAAU,EAAE,MAAM,SAAS;CAAC;CAE9C,kCAAkC;CAElC,yBAAyB;CAGzB,gBAAgB,CACf,QACA;EACC,YAAY;EACZ,uBAAuB;EACvB,kBAAkB;EAClB,uBAAuB;GAAC;GAAQ;GAAO;GAAY;EAAQ;EAC3D,sBAAsB;CACvB,CACD;AACD"}
1
+ {"version":3,"file":"common.mjs","names":[],"sources":["../../src/rules/common.ts"],"sourcesContent":["import type { RuleOptions } from \"../typegen\";\n\n/**\n * 跨 JavaScript、TypeScript 与 Vue 脚本生效的公共规则。\n *\n * @remarks\n * 默认规则面向 SDK、OA、Admin 与客户端项目使用同一套质量标准。这里只保留\n * 跨语言且误报较少的规则;纯格式和语法偏好交给 Prettier 或项目自行覆盖。\n */\nexport const commonRules = {\n\t// 要求数组回调在所有可到达分支返回值,避免 map/filter 等调用静默产生 undefined。\n\t\"array-callback-return\": \"error\",\n\t// 浏览器弹窗通常不适合生产代码;使用 warn 允许原型调试,同时确保发布前能够被发现。\n\t\"no-alert\": \"warn\",\n\t// switch 的 case 不创建词法作用域;要求用花括号包裹声明,避免跨 case 冲突。\n\t\"no-case-declarations\": \"error\",\n\t// 禁止动态执行字符串代码,避免代码注入和静态分析失效。\n\t\"no-eval\": \"error\",\n\t// 禁止反斜杠续行字符串,优先使用可读性更好的模板字符串。\n\t\"no-multi-str\": \"error\",\n\t// with 会让标识符解析不可预测,并且在严格模式和 ESM 中不可用。\n\t\"no-with\": \"error\",\n\t// Promise 是否等待由业务语义决定,不使用 `void promise` 作为 ESLint 规避语法。\n\t\"no-void\": \"error\",\n\t// 简单单行分支允许省略花括号;多行分支必须使用花括号,同一条件链保持一致。\n\tcurly: [\"error\", \"multi-line\", \"consistent\"],\n\t// default 分支不是强制项,但存在时统一位于其他 case 之后。\n\t\"default-case-last\": \"error\",\n\t// 要求严格相等;保留 `value == null` 同时判断 null/undefined 的常用写法。\n\teqeqeq: [\"error\", \"always\", { null: \"ignore\" }],\n\t// 使用幂运算符代替 Math.pow,使数学表达式更直接。\n\t\"prefer-exponentiation-operator\": \"error\",\n\t// 使用 Object.hasOwn 代替 obj.hasOwnProperty,兼容无原型对象以及同名方法被覆盖的对象。\n\t\"prefer-object-has-own\": \"error\",\n\t// 仅排序同一 import 声明中的导入成员;声明之间的分组和顺序交给 import-x/order。\n\t// 该规则无法自动修复成员顺序,使用 warn 避免历史代码因纯排序问题被立即阻断。\n\t\"sort-imports\": [\n\t\t\"warn\",\n\t\t{\n\t\t\tignoreCase: false,\n\t\t\tignoreDeclarationSort: true,\n\t\t\tignoreMemberSort: false,\n\t\t\tmemberSyntaxSortOrder: [\"none\", \"all\", \"multiple\", \"single\"],\n\t\t\tallowSeparatedGroups: false,\n\t\t},\n\t],\n} satisfies RuleOptions;\n"],"mappings":";;;;;;;;AASA,MAAa,cAAc;CAE1B,yBAAyB;CAEzB,YAAY;CAEZ,wBAAwB;CAExB,WAAW;CAEX,gBAAgB;CAEhB,WAAW;CAEX,WAAW;CAEX,OAAO;EAAC;EAAS;EAAc;CAAY;CAE3C,qBAAqB;CAErB,QAAQ;EAAC;EAAS;EAAU,EAAE,MAAM,SAAS;CAAC;CAE9C,kCAAkC;CAElC,yBAAyB;CAGzB,gBAAgB,CACf,QACA;EACC,YAAY;EACZ,uBAAuB;EACvB,kBAAkB;EAClB,uBAAuB;GAAC;GAAQ;GAAO;GAAY;EAAQ;EAC3D,sBAAsB;CACvB,CACD;AACD"}
@@ -6,7 +6,7 @@
6
6
  * 该记录补充 import-x 推荐预置,统一导入位置、重复导入及分组顺序。依赖项目 resolver
7
7
  * 的静态导出分析默认关闭,避免共享配置误判路径别名或自定义模块解析方式。
8
8
  */
9
- declare const importRules: {
9
+ export declare const importRules: {
10
10
  "import-x/first": "error";
11
11
  "import-x/no-duplicates": "error";
12
12
  "import-x/order": ["error", {
@@ -37,5 +37,4 @@ declare const importRules: {
37
37
  "import-x/named": "off";
38
38
  };
39
39
  //#endregion
40
- export { importRules };
41
40
  //# sourceMappingURL=import.d.mts.map
@@ -6,7 +6,7 @@
6
6
  * `@eslint/js` 推荐预置负责基础正确性。本记录补充命名、声明顺序和现代语法约定,
7
7
  * 供 SDK、管理端和客户端共同使用。
8
8
  */
9
- declare const javascriptRules: {
9
+ export declare const javascriptRules: {
10
10
  camelcase: ["error", {
11
11
  properties: "never";
12
12
  }];
@@ -50,5 +50,4 @@ declare const javascriptRules: {
50
50
  "no-redeclare": "error";
51
51
  };
52
52
  //#endregion
53
- export { javascriptRules };
54
53
  //# sourceMappingURL=javascript.d.mts.map
@@ -6,7 +6,7 @@
6
6
  * 该规则只约束静态 import/export 的模块来源,不会安装依赖,也不会检查动态
7
7
  * `import()` 或 CommonJS `require()`。选择此策略的项目应自行安装 `lodash-unified`。
8
8
  */
9
- declare const preferLodashUnifiedRules: {
9
+ export declare const preferLodashUnifiedRules: {
10
10
  "no-restricted-imports": ["error", {
11
11
  paths: {
12
12
  name: string;
@@ -25,7 +25,7 @@ declare const preferLodashUnifiedRules: {
25
25
  * 根入口和 `lodash/*` 子路径都允许使用;规则只负责避免与 `lodash-es` 或
26
26
  * `lodash-unified` 混用,不替项目决定整包导入或按方法导入。
27
27
  */
28
- declare const preferLodashRules: {
28
+ export declare const preferLodashRules: {
29
29
  "no-restricted-imports": ["error", {
30
30
  paths: {
31
31
  name: string;
@@ -38,5 +38,4 @@ declare const preferLodashRules: {
38
38
  }];
39
39
  };
40
40
  //#endregion
41
- export { preferLodashRules, preferLodashUnifiedRules };
42
41
  //# sourceMappingURL=lodash.d.mts.map
@@ -6,7 +6,7 @@
6
6
  * `@eslint-react/recommended*` 负责组件、JSX、DOM 与 Web API 正确性,React 官方
7
7
  * Hooks Recommended 负责 Hooks 与 React Compiler 正确性;这里仅消除重复报告并补充 DOM 规则。
8
8
  */
9
- declare const reactRules: {
9
+ export declare const reactRules: {
10
10
  "@eslint-react/error-boundaries": "off";
11
11
  "@eslint-react/exhaustive-deps": "off";
12
12
  "@eslint-react/purity": "off";
@@ -22,5 +22,4 @@ declare const reactRules: {
22
22
  "@eslint-react/dom-no-unsafe-target-blank": "error";
23
23
  };
24
24
  //#endregion
25
- export { reactRules };
26
25
  //# sourceMappingURL=react.d.mts.map
@@ -6,7 +6,7 @@
6
6
  * 不直接继承 regexp 插件的完整推荐预置,避免把字符类简写、量词写法和标志排序等
7
7
  * 纯偏好作为阻断错误。这里显式维护无效结构、潜在错误和灾难性回溯检查。
8
8
  */
9
- declare const regexpRules: {
9
+ export declare const regexpRules: {
10
10
  "no-control-regex": "error";
11
11
  "no-misleading-character-class": "error";
12
12
  "no-regex-spaces": "error";
@@ -34,5 +34,4 @@ declare const regexpRules: {
34
34
  "regexp/strict": "error";
35
35
  };
36
36
  //#endregion
37
- export { regexpRules };
38
37
  //# sourceMappingURL=regexp.d.mts.map
@@ -6,7 +6,7 @@
6
6
  * `[高影响][可自动修复]`:固定项目组合默认启用,首次修复可能重排大量字段。
7
7
  * 注意:这里故意不排序 `exports` 内部键;条件导出的键顺序具有模块解析语义。
8
8
  */
9
- declare const packageJsonSortRules: {
9
+ export declare const packageJsonSortRules: {
10
10
  "jsonc/sort-array-values": ["error", {
11
11
  order: {
12
12
  type: "asc";
@@ -29,5 +29,4 @@ declare const packageJsonSortRules: {
29
29
  }];
30
30
  };
31
31
  //#endregion
32
- export { packageJsonSortRules };
33
32
  //# sourceMappingURL=sort-package.d.mts.map
@@ -6,7 +6,7 @@
6
6
  * `[高影响][可自动修复]`:固定项目组合默认启用,首次修复会重排大量字段,
7
7
  * 但只改变 JSONC 的阅读顺序,不改变 TypeScript 编译选项值。
8
8
  */
9
- declare const tsconfigJsonSortRules: {
9
+ export declare const tsconfigJsonSortRules: {
10
10
  "jsonc/no-comments": "off";
11
11
  "jsonc/sort-keys": ["error", {
12
12
  order: string[];
@@ -17,5 +17,4 @@ declare const tsconfigJsonSortRules: {
17
17
  }];
18
18
  };
19
19
  //#endregion
20
- export { tsconfigJsonSortRules };
21
20
  //# sourceMappingURL=sort-tsconfig.d.mts.map
@@ -3,10 +3,15 @@
3
3
  * TypeScript 本地覆写规则。
4
4
  *
5
5
  * @remarks
6
- * 公共模块边界要求显式类型,业务内部函数保留 TypeScript 返回类型推断;默认的
7
- * recommendedTypeChecked 预置负责补充类型语义检查。
6
+ * 普通 TS/TSX 的命名函数与公共模块边界要求显式类型,内联回调保留上下文推断;
7
+ * strictTypeChecked 与 stylisticTypeChecked 预置负责补充类型语义和官方风格检查。
8
8
  */
9
- declare const typescriptRules: {
9
+ export declare const typescriptRules: {
10
+ "no-void": "error";
11
+ "@typescript-eslint/explicit-function-return-type": ["error", {
12
+ allowExpressions: true;
13
+ allowTypedFunctionExpressions: true;
14
+ }];
10
15
  "@typescript-eslint/explicit-module-boundary-types": ["error", {
11
16
  allowArgumentsExplicitlyTypedAsAny: false;
12
17
  }];
@@ -17,7 +22,6 @@ declare const typescriptRules: {
17
22
  caughtErrors: "all";
18
23
  caughtErrorsIgnorePattern: string;
19
24
  ignoreRestSiblings: true;
20
- varsIgnorePattern: string;
21
25
  }];
22
26
  "@typescript-eslint/no-namespace": "off";
23
27
  "@typescript-eslint/no-explicit-any": "warn";
@@ -39,12 +43,37 @@ declare const typescriptRules: {
39
43
  }];
40
44
  };
41
45
  /** 仅在 Project Service 提供完整类型信息后应用的 TypeScript 类型感知规则覆写。 */
42
- declare const typescriptTypeCheckedRules: {
43
- "@typescript-eslint/return-await": "error";
46
+ export declare const typescriptTypeCheckedRules: {
47
+ "@typescript-eslint/no-floating-promises": "off";
48
+ "@typescript-eslint/strict-void-return": "off";
49
+ "@typescript-eslint/no-meaningless-void-operator": "off";
50
+ "@typescript-eslint/no-confusing-void-expression": ["error", {
51
+ ignoreArrowShorthand: true;
52
+ }];
53
+ "@typescript-eslint/restrict-template-expressions": ["error", {
54
+ allowNumber: true;
55
+ }];
56
+ "@typescript-eslint/no-dynamic-delete": "off";
57
+ "@typescript-eslint/no-extraneous-class": "off";
58
+ "@typescript-eslint/no-deprecated": "warn";
59
+ "@typescript-eslint/no-unnecessary-condition": "warn";
60
+ "@typescript-eslint/consistent-type-definitions": "off";
61
+ "@typescript-eslint/consistent-indexed-object-style": "off";
62
+ "@typescript-eslint/class-literal-property-style": "off";
63
+ "@typescript-eslint/prefer-regexp-exec": "off";
64
+ "@typescript-eslint/consistent-type-exports": "error";
65
+ "@typescript-eslint/prefer-readonly": "error";
66
+ "@typescript-eslint/prefer-nullish-coalescing": ["error", {
67
+ ignorePrimitives: true;
68
+ }];
69
+ "@typescript-eslint/unified-signatures": ["error", {
70
+ ignoreDifferentlyNamedParameters: true;
71
+ ignoreOverloadsWithDifferentJSDoc: true;
72
+ }];
73
+ "@typescript-eslint/switch-exhaustiveness-check": "error";
44
74
  "@typescript-eslint/prefer-promise-reject-errors": ["error", {
45
75
  allowThrowingUnknown: true;
46
76
  }];
47
77
  };
48
78
  //#endregion
49
- export { typescriptRules, typescriptTypeCheckedRules };
50
79
  //# sourceMappingURL=typescript.d.mts.map
@@ -3,10 +3,15 @@
3
3
  * TypeScript 本地覆写规则。
4
4
  *
5
5
  * @remarks
6
- * 公共模块边界要求显式类型,业务内部函数保留 TypeScript 返回类型推断;默认的
7
- * recommendedTypeChecked 预置负责补充类型语义检查。
6
+ * 普通 TS/TSX 的命名函数与公共模块边界要求显式类型,内联回调保留上下文推断;
7
+ * strictTypeChecked 与 stylisticTypeChecked 预置负责补充类型语义和官方风格检查。
8
8
  */
9
9
  const typescriptRules = {
10
+ "no-void": "error",
11
+ "@typescript-eslint/explicit-function-return-type": ["error", {
12
+ allowExpressions: true,
13
+ allowTypedFunctionExpressions: true
14
+ }],
10
15
  "@typescript-eslint/explicit-module-boundary-types": ["error", { allowArgumentsExplicitlyTypedAsAny: false }],
11
16
  "@typescript-eslint/no-redeclare": "error",
12
17
  "@typescript-eslint/no-unused-vars": ["error", {
@@ -14,8 +19,7 @@ const typescriptRules = {
14
19
  argsIgnorePattern: "^_",
15
20
  caughtErrors: "all",
16
21
  caughtErrorsIgnorePattern: "^_",
17
- ignoreRestSiblings: true,
18
- varsIgnorePattern: "^_"
22
+ ignoreRestSiblings: true
19
23
  }],
20
24
  "@typescript-eslint/no-namespace": "off",
21
25
  "@typescript-eslint/no-explicit-any": "warn",
@@ -36,7 +40,27 @@ const typescriptRules = {
36
40
  };
37
41
  /** 仅在 Project Service 提供完整类型信息后应用的 TypeScript 类型感知规则覆写。 */
38
42
  const typescriptTypeCheckedRules = {
39
- "@typescript-eslint/return-await": "error",
43
+ "@typescript-eslint/no-floating-promises": "off",
44
+ "@typescript-eslint/strict-void-return": "off",
45
+ "@typescript-eslint/no-meaningless-void-operator": "off",
46
+ "@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
47
+ "@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true }],
48
+ "@typescript-eslint/no-dynamic-delete": "off",
49
+ "@typescript-eslint/no-extraneous-class": "off",
50
+ "@typescript-eslint/no-deprecated": "warn",
51
+ "@typescript-eslint/no-unnecessary-condition": "warn",
52
+ "@typescript-eslint/consistent-type-definitions": "off",
53
+ "@typescript-eslint/consistent-indexed-object-style": "off",
54
+ "@typescript-eslint/class-literal-property-style": "off",
55
+ "@typescript-eslint/prefer-regexp-exec": "off",
56
+ "@typescript-eslint/consistent-type-exports": "error",
57
+ "@typescript-eslint/prefer-readonly": "error",
58
+ "@typescript-eslint/prefer-nullish-coalescing": ["error", { ignorePrimitives: true }],
59
+ "@typescript-eslint/unified-signatures": ["error", {
60
+ ignoreDifferentlyNamedParameters: true,
61
+ ignoreOverloadsWithDifferentJSDoc: true
62
+ }],
63
+ "@typescript-eslint/switch-exhaustiveness-check": "error",
40
64
  "@typescript-eslint/prefer-promise-reject-errors": ["error", { allowThrowingUnknown: true }]
41
65
  };
42
66
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.mjs","names":[],"sources":["../../src/rules/typescript.ts"],"sourcesContent":["import type { RuleOptions } from \"../typegen\";\n\n/**\n * TypeScript 本地覆写规则。\n *\n * @remarks\n * 公共模块边界要求显式类型,业务内部函数保留 TypeScript 返回类型推断;默认的\n * recommendedTypeChecked 预置负责补充类型语义检查。\n */\nexport const typescriptRules = {\n\t// 导出函数和类的公共方法必须显式声明参数与返回类型,使公共 API 不依赖实现细节推断;参数不允许显式 any。\n\t\"@typescript-eslint/explicit-module-boundary-types\": [\"error\", { allowArgumentsExplicitlyTypedAsAny: false }],\n\t// 使用 TypeScript 版本避免核心规则误判声明合并、类型和值的同名声明。\n\t\"@typescript-eslint/no-redeclare\": \"error\",\n\t// 未使用符号视为错误;以下划线开头可显式表示参数、异常或变量被有意忽略。\n\t\"@typescript-eslint/no-unused-vars\": [\n\t\t\"error\",\n\t\t{\n\t\t\targs: \"after-used\",\n\t\t\targsIgnorePattern: \"^_\",\n\t\t\tcaughtErrors: \"all\",\n\t\t\tcaughtErrorsIgnorePattern: \"^_\",\n\t\t\tignoreRestSiblings: true,\n\t\t\tvarsIgnorePattern: \"^_\",\n\t\t},\n\t],\n\t// [默认关闭] 声明文件、全局扩展和部分 SDK 仍需要 namespace。\n\t\"@typescript-eslint/no-namespace\": \"off\",\n\t// any 会绕过类型检查,但第三方边界和渐进迁移仍可能需要,因此只警告。\n\t\"@typescript-eslint/no-explicit-any\": \"warn\",\n\t// TypeScript 源码统一使用 ESM import;Node 工具文件由末尾覆写单独放开。\n\t\"@typescript-eslint/no-require-imports\": \"error\",\n\t// 禁止普通空函数,避免遗漏实现;仅允许无函数体逻辑的构造器和有意留空的重写方法。\n\t\"@typescript-eslint/no-empty-function\": [\"error\", { allow: [\"constructors\", \"overrideMethods\"] }],\n\t// 使用 TS 版本识别类型断言等语法;允许常见的短路和三元表达式调用模式。\n\t\"@typescript-eslint/no-unused-expressions\": [\n\t\t\"error\",\n\t\t{\n\t\t\tallowShortCircuit: true,\n\t\t\tallowTernary: true,\n\t\t},\n\t],\n\t// 删除可由 TypeScript 明确推断的原始值类型标注。\n\t\"@typescript-eslint/no-inferrable-types\": \"error\",\n\t// 禁止非空断言,要求显式处理空值边界。\n\t\"@typescript-eslint/no-non-null-assertion\": \"error\",\n\t// 可选链之后再做非空断言逻辑矛盾,通常表示边界条件设计有误。\n\t\"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n\t// 纯类型依赖必须使用独立的 `import type`,避免生成无用运行时导入并统一导入声明结构。\n\t\"@typescript-eslint/consistent-type-imports\": [\n\t\t\"error\",\n\t\t{\n\t\t\tdisallowTypeAnnotations: false,\n\t\t\tfixStyle: \"separate-type-imports\",\n\t\t\tprefer: \"type-imports\",\n\t\t},\n\t],\n} satisfies RuleOptions;\n\n/** 仅在 Project Service 提供完整类型信息后应用的 TypeScript 类型感知规则覆写。 */\nexport const typescriptTypeCheckedRules = {\n\t// 默认 in-try-catch 模式:try/catch/finally 内要求 return await,让本地错误处理捕获 Promise 拒绝;其他位置避免多余 await。\n\t\"@typescript-eslint/return-await\": \"error\",\n\t// 允许透明转发外部 Promise 的未知拒绝原因;静态可知的 string、number 等仍会被报告。\n\t\"@typescript-eslint/prefer-promise-reject-errors\": [\"error\", { allowThrowingUnknown: true }],\n} satisfies RuleOptions;\n"],"mappings":";;;;;;;;AASA,MAAa,kBAAkB;CAE9B,qDAAqD,CAAC,SAAS,EAAE,oCAAoC,MAAM,CAAC;CAE5G,mCAAmC;CAEnC,qCAAqC,CACpC,SACA;EACC,MAAM;EACN,mBAAmB;EACnB,cAAc;EACd,2BAA2B;EAC3B,oBAAoB;EACpB,mBAAmB;CACpB,CACD;CAEA,mCAAmC;CAEnC,sCAAsC;CAEtC,yCAAyC;CAEzC,wCAAwC,CAAC,SAAS,EAAE,OAAO,CAAC,gBAAgB,iBAAiB,EAAE,CAAC;CAEhG,4CAA4C,CAC3C,SACA;EACC,mBAAmB;EACnB,cAAc;CACf,CACD;CAEA,0CAA0C;CAE1C,4CAA4C;CAE5C,0DAA0D;CAE1D,8CAA8C,CAC7C,SACA;EACC,yBAAyB;EACzB,UAAU;EACV,QAAQ;CACT,CACD;AACD;;AAGA,MAAa,6BAA6B;CAEzC,mCAAmC;CAEnC,mDAAmD,CAAC,SAAS,EAAE,sBAAsB,KAAK,CAAC;AAC5F"}
1
+ {"version":3,"file":"typescript.mjs","names":[],"sources":["../../src/rules/typescript.ts"],"sourcesContent":["import type { RuleOptions } from \"../typegen\";\n\n/**\n * TypeScript 本地覆写规则。\n *\n * @remarks\n * 普通 TS/TSX 的命名函数与公共模块边界要求显式类型,内联回调保留上下文推断;\n * strictTypeChecked 与 stylisticTypeChecked 预置负责补充类型语义和官方风格检查。\n */\nexport const typescriptRules = {\n\t// 单独组合 createTypeScriptConfigs() 时也禁止用 void 操作符标记被忽略的 Promise。\n\t\"no-void\": \"error\",\n\t// 普通 TS/TSX 函数要求显式返回类型;内联回调和已有函数类型约束的表达式继续依赖上下文推断。\n\t\"@typescript-eslint/explicit-function-return-type\": [\"error\", { allowExpressions: true, allowTypedFunctionExpressions: true }],\n\t// 导出函数和类的公共方法必须显式声明参数与返回类型,使公共 API 不依赖实现细节推断;参数不允许显式 any。\n\t\"@typescript-eslint/explicit-module-boundary-types\": [\"error\", { allowArgumentsExplicitlyTypedAsAny: false }],\n\t// 使用 TypeScript 版本避免核心规则误判声明合并、类型和值的同名声明。\n\t\"@typescript-eslint/no-redeclare\": \"error\",\n\t// 未使用符号视为错误;仅参数和异常可用下划线明确表示有意忽略。\n\t\"@typescript-eslint/no-unused-vars\": [\n\t\t\"error\",\n\t\t{\n\t\t\targs: \"after-used\",\n\t\t\targsIgnorePattern: \"^_\",\n\t\t\tcaughtErrors: \"all\",\n\t\t\tcaughtErrorsIgnorePattern: \"^_\",\n\t\t\tignoreRestSiblings: true,\n\t\t},\n\t],\n\t// [默认关闭] 声明文件、全局扩展和部分 SDK 仍需要 namespace。\n\t\"@typescript-eslint/no-namespace\": \"off\",\n\t// any 会绕过类型检查,但第三方边界和渐进迁移仍可能需要,因此只警告。\n\t\"@typescript-eslint/no-explicit-any\": \"warn\",\n\t// TypeScript 源码统一使用 ESM import;Node 工具文件由末尾覆写单独放开。\n\t\"@typescript-eslint/no-require-imports\": \"error\",\n\t// 禁止普通空函数,避免遗漏实现;仅允许无函数体逻辑的构造器和有意留空的重写方法。\n\t\"@typescript-eslint/no-empty-function\": [\"error\", { allow: [\"constructors\", \"overrideMethods\"] }],\n\t// 使用 TS 版本识别类型断言等语法;允许常见的短路和三元表达式调用模式。\n\t\"@typescript-eslint/no-unused-expressions\": [\n\t\t\"error\",\n\t\t{\n\t\t\tallowShortCircuit: true,\n\t\t\tallowTernary: true,\n\t\t},\n\t],\n\t// 删除可由 TypeScript 明确推断的原始值类型标注。\n\t\"@typescript-eslint/no-inferrable-types\": \"error\",\n\t// 禁止非空断言,要求显式处理空值边界。\n\t\"@typescript-eslint/no-non-null-assertion\": \"error\",\n\t// 可选链之后再做非空断言逻辑矛盾,通常表示边界条件设计有误。\n\t\"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n\t// 纯类型依赖必须使用独立的 `import type`,避免生成无用运行时导入并统一导入声明结构。\n\t\"@typescript-eslint/consistent-type-imports\": [\n\t\t\"error\",\n\t\t{\n\t\t\tdisallowTypeAnnotations: false,\n\t\t\tfixStyle: \"separate-type-imports\",\n\t\t\tprefer: \"type-imports\",\n\t\t},\n\t],\n} satisfies RuleOptions;\n\n/** 仅在 Project Service 提供完整类型信息后应用的 TypeScript 类型感知规则覆写。 */\nexport const typescriptTypeCheckedRules = {\n\t// 是否等待、返回或处理 Promise 由开发者根据业务顺序和异常语义决定。\n\t\"@typescript-eslint/no-floating-promises\": \"off\",\n\t// 不限制框架生命周期和事件回调的返回写法。\n\t\"@typescript-eslint/strict-void-return\": \"off\",\n\t// 核心 no-void 已禁止全部 void 操作符,关闭类型感知的重复诊断。\n\t\"@typescript-eslint/no-meaningless-void-operator\": \"off\",\n\t// 保留简洁的 `() => notify()` 回调,其他容易混淆 void 值与返回值的用法继续检查。\n\t\"@typescript-eslint/no-confusing-void-expression\": [\"error\", { ignoreArrowShorthand: true }],\n\t// 数字是模板字符串的常见安全插值;对象、any 和空值仍需显式处理。\n\t\"@typescript-eslint/restrict-template-expressions\": [\"error\", { allowNumber: true }],\n\t// 动态删除对象字段是表单和字典的正常操作;数组 delete 仍由 no-array-delete 禁止。\n\t\"@typescript-eslint/no-dynamic-delete\": \"off\",\n\t// 纯静态工具类可能是 SDK 的有意 API 设计,不强制改写为函数或对象。\n\t\"@typescript-eslint/no-extraneous-class\": \"off\",\n\t// 弃用 API 需要可见,但兼容多个依赖版本时不应直接阻断构建。\n\t\"@typescript-eslint/no-deprecated\": \"warn\",\n\t// TypeScript 类型不一定覆盖外部输入的真实运行时,防御性条件仅提醒审查。\n\t\"@typescript-eslint/no-unnecessary-condition\": \"warn\",\n\t// 语法形式不影响类型安全,不强制 interface/type、索引类型、字面量属性和 RegExp API 的单一写法。\n\t\"@typescript-eslint/consistent-type-definitions\": \"off\",\n\t\"@typescript-eslint/consistent-indexed-object-style\": \"off\",\n\t\"@typescript-eslint/class-literal-property-style\": \"off\",\n\t\"@typescript-eslint/prefer-regexp-exec\": \"off\",\n\t// 纯类型导出必须使用 export type,避免生成或暗示不存在的运行时导出。\n\t\"@typescript-eslint/consistent-type-exports\": \"error\",\n\t// 只在构造阶段赋值且之后保持不变的私有成员应声明为 readonly。\n\t\"@typescript-eslint/prefer-readonly\": \"error\",\n\t// 原始类型的 || 与 ?? 可能承载不同业务语义,不为了风格强制互换。\n\t\"@typescript-eslint/prefer-nullish-coalescing\": [\"error\", { ignorePrimitives: true }],\n\t// 参数名称或独立 JSDoc 属于公共重载契约;仅合并真正重复的签名。\n\t\"@typescript-eslint/unified-signatures\": [\n\t\t\"error\",\n\t\t{\n\t\t\tignoreDifferentlyNamedParameters: true,\n\t\t\tignoreOverloadsWithDifferentJSDoc: true,\n\t\t},\n\t],\n\t// 联合类型和枚举新增成员时,switch 必须覆盖全部分支或显式提供 default。\n\t\"@typescript-eslint/switch-exhaustiveness-check\": \"error\",\n\t// 允许透明转发外部 Promise 的未知拒绝原因;静态可知的 string、number 等仍会被报告。\n\t\"@typescript-eslint/prefer-promise-reject-errors\": [\"error\", { allowThrowingUnknown: true }],\n} satisfies RuleOptions;\n"],"mappings":";;;;;;;;AASA,MAAa,kBAAkB;CAE9B,WAAW;CAEX,oDAAoD,CAAC,SAAS;EAAE,kBAAkB;EAAM,+BAA+B;CAAK,CAAC;CAE7H,qDAAqD,CAAC,SAAS,EAAE,oCAAoC,MAAM,CAAC;CAE5G,mCAAmC;CAEnC,qCAAqC,CACpC,SACA;EACC,MAAM;EACN,mBAAmB;EACnB,cAAc;EACd,2BAA2B;EAC3B,oBAAoB;CACrB,CACD;CAEA,mCAAmC;CAEnC,sCAAsC;CAEtC,yCAAyC;CAEzC,wCAAwC,CAAC,SAAS,EAAE,OAAO,CAAC,gBAAgB,iBAAiB,EAAE,CAAC;CAEhG,4CAA4C,CAC3C,SACA;EACC,mBAAmB;EACnB,cAAc;CACf,CACD;CAEA,0CAA0C;CAE1C,4CAA4C;CAE5C,0DAA0D;CAE1D,8CAA8C,CAC7C,SACA;EACC,yBAAyB;EACzB,UAAU;EACV,QAAQ;CACT,CACD;AACD;;AAGA,MAAa,6BAA6B;CAEzC,2CAA2C;CAE3C,yCAAyC;CAEzC,mDAAmD;CAEnD,mDAAmD,CAAC,SAAS,EAAE,sBAAsB,KAAK,CAAC;CAE3F,oDAAoD,CAAC,SAAS,EAAE,aAAa,KAAK,CAAC;CAEnF,wCAAwC;CAExC,0CAA0C;CAE1C,oCAAoC;CAEpC,+CAA+C;CAE/C,kDAAkD;CAClD,sDAAsD;CACtD,mDAAmD;CACnD,yCAAyC;CAEzC,8CAA8C;CAE9C,sCAAsC;CAEtC,gDAAgD,CAAC,SAAS,EAAE,kBAAkB,KAAK,CAAC;CAEpF,yCAAyC,CACxC,SACA;EACC,kCAAkC;EAClC,mCAAmC;CACpC,CACD;CAEA,kDAAkD;CAElD,mDAAmD,CAAC,SAAS,EAAE,sBAAsB,KAAK,CAAC;AAC5F"}
@@ -6,7 +6,7 @@
6
6
  * 上游 `flat/recommended` 负责 Vue 3 正确性与模板约定;本记录补充事件、属性命名和
7
7
  * 闭合标签规则。Vue Web、Admin 与 UniApp 使用同一套严重级别。
8
8
  */
9
- declare const vueRules: {
9
+ export declare const vueRules: {
10
10
  "vue/no-v-html": "warn";
11
11
  "vue/require-default-prop": "off";
12
12
  "vue/require-explicit-emits": "error";
@@ -28,5 +28,4 @@ declare const vueRules: {
28
28
  }];
29
29
  };
30
30
  //#endregion
31
- export { vueRules };
32
31
  //# sourceMappingURL=vue.d.mts.map