- core.ts 从 1162 行降至 865 行:命令/浮动工具栏/右键菜单/大纲 拆至 commands.ts / floating-toolbar.ts / context-menu.ts / outline.ts (原型安装,API 与测试完全兼容) - 6 个预设插件状态改用 Symbol 键存储,定义 EditorLike 契约接口, 消灭 (editor as any).__xxx 魔法属性 - 实现 maxLength(textarea maxlength + 程序化入口截断)与 zenMode 初始状态(此前为 dead config) - 搜索面板补齐 matchCase/wholeWord(翻译键已有但未实现, 中文全字边界感知) - 分隔条 localStorage key 加入实例 id 隔离 - eslint 启用 type-aware 规则(consistent-type-imports / no-unnecessary-type-assertion),0 errors
34 lines
980 B
JSON
34 lines
980 B
JSON
{
|
|
"root": true,
|
|
"env": {
|
|
"browser": true,
|
|
"es2020": true,
|
|
"node": true,
|
|
"jest": true
|
|
},
|
|
"parser": "@typescript-eslint/parser",
|
|
"parserOptions": {
|
|
"ecmaVersion": 2020,
|
|
"sourceType": "module",
|
|
"project": "./tsconfig.json"
|
|
},
|
|
"plugins": ["@typescript-eslint"],
|
|
"extends": [
|
|
"eslint:recommended"
|
|
],
|
|
"rules": {
|
|
"no-console": "warn",
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
|
|
"@typescript-eslint/consistent-type-imports": ["warn", { "prefer": "type-imports", "fixStyle": "inline-type-imports" }],
|
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
|
"no-undef": "off",
|
|
"no-empty": "off",
|
|
"no-useless-escape": "off",
|
|
"no-control-regex": "off",
|
|
"no-regex-spaces": "off",
|
|
"no-constant-condition": ["warn", { "checkLoops": false }]
|
|
},
|
|
"ignorePatterns": ["dist/", "coverage/", "node_modules/"]
|
|
}
|