统一模板包 visual 契约并补齐完成证据;修复 release 版本一致性、管理员 token 撤销、CORS 与默认品牌配置;收敛依赖安全风险并完成全量回归验证。
74 lines
2.4 KiB
JavaScript
74 lines
2.4 KiB
JavaScript
import eslint from "@eslint/js";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: [
|
|
"**/dist/**",
|
|
"**/.next/**",
|
|
"**/node_modules/**",
|
|
"prototype/**",
|
|
"**/prisma/**",
|
|
"apps/api/test/**/*.test.js",
|
|
"apps/api/test/**/*.cjs",
|
|
"apps/admin/test/**/*.test.mjs",
|
|
"apps/admin/public/**",
|
|
"packages/types/test/**/*.test.mjs",
|
|
"apps/taro/test/**/*.test.mjs",
|
|
"apps/taro/src/assets/**",
|
|
"apps/taro/config/**/*.cjs",
|
|
"apps/miniapp/pages/**/*.js",
|
|
"apps/miniapp/app.js",
|
|
"apps/admin/vite.config.ts",
|
|
"packages/config/src/generated-template-packages.ts",
|
|
],
|
|
},
|
|
eslint.configs.recommended,
|
|
...tseslint.configs.recommendedTypeChecked,
|
|
{
|
|
languageOptions: {
|
|
parserOptions: { projectService: true, tsconfigRootDir: import.meta.dirname },
|
|
},
|
|
rules: {
|
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
"@typescript-eslint/no-floating-promises": "error",
|
|
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
},
|
|
},
|
|
{
|
|
files: ["apps/api/test/**/*.ts"],
|
|
rules: {
|
|
"@typescript-eslint/no-unsafe-argument": "off",
|
|
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
"@typescript-eslint/no-unsafe-return": "off",
|
|
"@typescript-eslint/no-floating-promises": "off",
|
|
"@typescript-eslint/require-await": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["packages/api-client/test/**/*.ts"],
|
|
rules: {
|
|
"@typescript-eslint/no-unsafe-call": "off",
|
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
"@typescript-eslint/require-await": "off",
|
|
},
|
|
},
|
|
{
|
|
...tseslint.configs.disableTypeChecked,
|
|
files: [
|
|
"apps/admin/template-preview-css.mjs",
|
|
"apps/api/scripts/template-contract-migration-audit.mjs",
|
|
"apps/api/scripts/create-atelier-brand.mjs",
|
|
"apps/api/test/template-contract-migration-audit.test.mjs",
|
|
"apps/api/test/prepare-integration-template-packages.mjs",
|
|
"apps/api/test/template-contract-migration.integration.mjs",
|
|
],
|
|
languageOptions: {
|
|
parserOptions: { project: false, projectService: false },
|
|
globals: { console: "readonly", process: "readonly", URL: "readonly" },
|
|
},
|
|
},
|
|
);
|