* feat(core): 启用 TypeScript 最严格的类型检查 * ci: 配置 Codecov 以适应类型安全改进 * fix(core): 修复 CodeQL 安全警告 * fix(core): eslint.config.mjs
51 lines
1.5 KiB
JSON
51 lines
1.5 KiB
JSON
{
|
|
"root": true,
|
|
"parser": "@typescript-eslint/parser",
|
|
"parserOptions": {
|
|
"ecmaVersion": 2020,
|
|
"sourceType": "module",
|
|
"project": "./tsconfig.json"
|
|
},
|
|
"plugins": [
|
|
"@typescript-eslint"
|
|
],
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"plugin:@typescript-eslint/recommended"
|
|
],
|
|
"rules": {
|
|
"semi": ["error", "always"],
|
|
"quotes": ["error", "single", { "avoidEscape": true }],
|
|
"indent": ["error", 4, { "SwitchCase": 1 }],
|
|
"no-trailing-spaces": "error",
|
|
"eol-last": ["error", "always"],
|
|
"comma-dangle": ["error", "none"],
|
|
"object-curly-spacing": ["error", "always"],
|
|
"array-bracket-spacing": ["error", "never"],
|
|
"arrow-parens": ["error", "always"],
|
|
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1 }],
|
|
"no-console": "off",
|
|
"@typescript-eslint/no-explicit-any": "error",
|
|
"@typescript-eslint/no-unsafe-assignment": "warn",
|
|
"@typescript-eslint/no-unsafe-member-access": "warn",
|
|
"@typescript-eslint/no-unsafe-call": "warn",
|
|
"@typescript-eslint/no-unsafe-return": "warn",
|
|
"@typescript-eslint/no-unsafe-argument": "warn",
|
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
|
"@typescript-eslint/no-non-null-assertion": "off"
|
|
},
|
|
"ignorePatterns": [
|
|
"node_modules/",
|
|
"dist/",
|
|
"bin/",
|
|
"build/",
|
|
"coverage/",
|
|
"thirdparty/",
|
|
"examples/lawn-mower-demo/",
|
|
"extensions/",
|
|
"*.min.js",
|
|
"*.d.ts"
|
|
]
|
|
}
|