|
| 1 | +/* |
| 2 | + * Tencent is pleased to support the open source community by making |
| 3 | + * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. |
| 4 | + * |
| 5 | + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. |
| 6 | + * |
| 7 | + * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License. |
| 8 | + * |
| 9 | + * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition): |
| 10 | + * |
| 11 | + * --------------------------------------------------- |
| 12 | + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated |
| 13 | + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation |
| 14 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and |
| 15 | + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
| 16 | + * |
| 17 | + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of |
| 18 | + * the Software. |
| 19 | + * |
| 20 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO |
| 21 | + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 22 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF |
| 23 | + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| 24 | + * IN THE SOFTWARE. |
| 25 | +*/ |
| 26 | + |
| 27 | +module.exports = { |
| 28 | + root: true, |
| 29 | + extends: ['eslint-config-tencent', 'plugin:vue/recommended'], |
| 30 | + plugins: ['codecc'], |
| 31 | + overrides: [ |
| 32 | + { |
| 33 | + files: ['*.ts', '*.tsx'], |
| 34 | + extends: ['eslint-config-tencent/ts'], |
| 35 | + }, |
| 36 | + { |
| 37 | + files: ['*.vue'], |
| 38 | + rules: { |
| 39 | + 'codecc/license': 'off', |
| 40 | + }, |
| 41 | + }, |
| 42 | + { |
| 43 | + files: [ |
| 44 | + '**/__test__/*.{j,t}s?(x)', |
| 45 | + '**/tests/unit/**/*.spec.{j,t}s?(x)', |
| 46 | + ], |
| 47 | + env: { |
| 48 | + jest: true, |
| 49 | + }, |
| 50 | + }, |
| 51 | + ], |
| 52 | + rules: { |
| 53 | + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 54 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 55 | + 'codecc/license': ['error', { |
| 56 | + license: `/* |
| 57 | +* Tencent is pleased to support the open source community by making |
| 58 | +* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. |
| 59 | +* |
| 60 | +* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. |
| 61 | +* |
| 62 | +* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License. |
| 63 | +* |
| 64 | +* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition): |
| 65 | +* |
| 66 | +* --------------------------------------------------- |
| 67 | +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated |
| 68 | +* documentation files (the "Software"), to deal in the Software without restriction, including without limitation |
| 69 | +* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and |
| 70 | +* to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
| 71 | +* |
| 72 | +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of |
| 73 | +* the Software. |
| 74 | +* |
| 75 | +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO |
| 76 | +* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 77 | +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF |
| 78 | +* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| 79 | +* IN THE SOFTWARE. |
| 80 | +*/\n`, |
| 81 | + pattern: 'Tencent is pleased to support the open source community', |
| 82 | + }], |
| 83 | + // 'codecc/comment-ratio': ['error', 10], |
| 84 | + 'codecc/comment-ratio': 'off', |
| 85 | + 'max-len': [ |
| 86 | + 'error', |
| 87 | + { |
| 88 | + code: 120, |
| 89 | + ignoreStrings: true, |
| 90 | + ignoreUrls: true, |
| 91 | + ignoreRegExpLiterals: true, |
| 92 | + ignoreTemplateLiterals: true, |
| 93 | + }, |
| 94 | + ], |
| 95 | + }, |
| 96 | +}; |
0 commit comments