chore(repo): 移除重复版权文件头并纳入共享单测
集中保留原版权声明,移除文件头检查和全局测试忽略规则。验证:全量单测、受影响用例复测及静态检查通过。
This commit is contained in:
@@ -1,25 +1,8 @@
|
||||
const globals = require('globals');
|
||||
const { rules: headerRules } = require('eslint-plugin-header');
|
||||
const react = require('eslint-plugin-react');
|
||||
const reactHooks = require('eslint-plugin-react-hooks');
|
||||
const unusedImports = require('eslint-plugin-unused-imports');
|
||||
|
||||
const headerRule = headerRules.header;
|
||||
const header = {
|
||||
rules: {
|
||||
header: {
|
||||
...headerRule,
|
||||
meta: {
|
||||
...headerRule.meta,
|
||||
schema: [
|
||||
{ enum: ['block', 'line'] },
|
||||
{ type: 'array', items: { type: 'string' } },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
ignores: [
|
||||
@@ -45,7 +28,6 @@ module.exports = [
|
||||
},
|
||||
settings: { react: { version: 'detect' } },
|
||||
plugins: {
|
||||
header,
|
||||
react,
|
||||
'react-hooks': reactHooks,
|
||||
'unused-imports': unusedImports,
|
||||
@@ -78,30 +60,6 @@ module.exports = [
|
||||
],
|
||||
},
|
||||
],
|
||||
'header/header': [
|
||||
2,
|
||||
'block',
|
||||
[
|
||||
'',
|
||||
'Copyright (C) 2025 QuantumNous',
|
||||
'',
|
||||
'This program is free software: you can redistribute it and/or modify',
|
||||
'it under the terms of the GNU Affero General Public License as',
|
||||
'published by the Free Software Foundation, either version 3 of the',
|
||||
'License, or (at your option) any later version.',
|
||||
'',
|
||||
'This program is distributed in the hope that it will be useful,',
|
||||
'but WITHOUT ANY WARRANTY; without even the implied warranty of',
|
||||
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the',
|
||||
'GNU Affero General Public License for more details.',
|
||||
'',
|
||||
'You should have received a copy of the GNU Affero General Public License',
|
||||
'along with this program. If not, see <https://www.gnu.org/licenses/>.',
|
||||
'',
|
||||
'For commercial licensing, please contact support@quantumnous.com',
|
||||
'',
|
||||
],
|
||||
],
|
||||
'no-multiple-empty-lines': ['error', { max: 1 }],
|
||||
|
||||
// ===== 防线:杜绝“用了未定义/未导入标识符”导致的运行时崩溃(本次线上事故根因)=====
|
||||
|
||||
Reference in New Issue
Block a user