mirror of
https://github.com/kuaifan/dootask.git
synced 2026-06-27 01:32:12 +00:00
- phpstan(larastan ^3.10, level 1 + baseline 封存 86 个存量错误),composer stan / stan-baseline - ESLint 9 flat config(vue2-essential,存量违规降 warn,error 基线为 0),npm run lint - CI:.github/workflows/tests.yml(static-checks + phpunit,phpunit 用 kuaifan/php 镜像跑,FFI doo.so 不在仓库) - Claude Code hooks:编辑 app/ 下 PHP 后自动单文件 phpstan,失败回灌 - 检索地图:routes/api-map.md(doc:api-map 生成,325 接口)、docs/events-map.md(events:map)、types/dootask-globals.d.ts($A 207 方法)、npm run check:lang(存量缺失 93 条,CI 暂非阻塞) - CLAUDE.md:版本号更正 Laravel 13/PHP 8.4,新增质量门禁、检索地图、架构增量规则章节 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
68 lines
2.4 KiB
JavaScript
68 lines
2.4 KiB
JavaScript
import pluginVue from 'eslint-plugin-vue';
|
|
import globals from 'globals';
|
|
|
|
// 起步策略:只开能抓真实 bug 的规则,存量代码必须 0 error;
|
|
// 风格类/噪声规则后续按需逐步收紧。
|
|
export default [
|
|
{
|
|
ignores: [
|
|
'node_modules/**',
|
|
'vendor/**',
|
|
'public/**',
|
|
'electron/**',
|
|
'docker/**',
|
|
'resources/assets/statics/**',
|
|
// 第三方移植的 directive,内含过期的 babel/* eslint 注释
|
|
'resources/assets/js/directives/v-click-outside-x.js',
|
|
],
|
|
},
|
|
...pluginVue.configs['flat/vue2-essential'],
|
|
{
|
|
files: ['resources/assets/js/**/*.{js,mjs,vue}', 'scripts/**/*.mjs'],
|
|
linterOptions: {
|
|
reportUnusedDisableDirectives: 'off',
|
|
},
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
$A: 'readonly',
|
|
$L: 'readonly',
|
|
$: 'readonly',
|
|
jQuery: 'readonly',
|
|
LANGUAGE_DATA: 'readonly',
|
|
SystemConfig: 'readonly',
|
|
},
|
|
},
|
|
rules: {
|
|
'no-dupe-keys': 'error',
|
|
'no-dupe-args': 'error',
|
|
'no-const-assign': 'error',
|
|
'no-class-assign': 'error',
|
|
'no-compare-neg-zero': 'error',
|
|
'no-self-assign': 'error',
|
|
'use-isnan': 'error',
|
|
'valid-typeof': 'error',
|
|
// 以下规则存量代码有违规,先降为 warn 保持可见;清零后逐条升回 error
|
|
'no-unreachable': 'warn',
|
|
'no-cond-assign': 'warn',
|
|
'vue/multi-word-component-names': 'off',
|
|
'vue/require-v-for-key': 'warn',
|
|
'vue/no-use-v-if-with-v-for': 'warn',
|
|
'vue/valid-template-root': 'warn',
|
|
'vue/valid-v-for': 'warn',
|
|
'vue/no-unused-components': 'warn',
|
|
'vue/no-mutating-props': 'warn',
|
|
'vue/no-unused-vars': 'warn',
|
|
'vue/no-textarea-mustache': 'warn',
|
|
'vue/no-reserved-keys': 'warn',
|
|
'vue/no-side-effects-in-computed-properties': 'warn',
|
|
'vue/no-v-text-v-html-on-component': 'warn',
|
|
'vue/require-valid-default-prop': 'warn',
|
|
'vue/valid-v-show': 'warn',
|
|
},
|
|
},
|
|
];
|