chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -28,7 +28,7 @@ const readBlockList = () =>
|
||||
|
||||
/** @type {(import('eslint').Linter.Config)[]} */
|
||||
module.exports = [
|
||||
// NOTE: 不能和下一项配置合并
|
||||
// NOTE: Cannot be merged with the next configuration
|
||||
{
|
||||
ignores: [
|
||||
'**/*.d.ts',
|
||||
@@ -68,7 +68,7 @@ module.exports = [
|
||||
...require('@coze-arch/eslint-plugin').configs.recommended,
|
||||
require('@coze-arch/eslint-plugin/zustand').configs.recommended,
|
||||
{
|
||||
files: ['**/*.?(m|c)?(j|t)s?(x)'], // 排除规则对package.json生效
|
||||
files: ['**/*.?(m|c)?(j|t)s?(x)'], // Exclusion rules take effect for package.json
|
||||
plugins: {
|
||||
prettier: require('eslint-plugin-prettier'),
|
||||
'@babel': require('@babel/eslint-plugin'),
|
||||
|
||||
@@ -5,7 +5,7 @@ module.exports = [
|
||||
{
|
||||
files: ['**/*.?(m|c)?(j|t)s?(x)'],
|
||||
settings: {
|
||||
// TODO: 全局保留一份配置
|
||||
// TODO: Keep a configuration globally
|
||||
'import/resolver': {
|
||||
node: {
|
||||
moduleDirectory: ['node_modules', 'src'],
|
||||
@@ -72,8 +72,8 @@ module.exports = [
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
// TODO: 目前由于 edenx 会动态生成一些插件模块,因此启动会报错
|
||||
// 后续需要修复问题,启动下述规则
|
||||
// TODO: At present, because edenx will dynamically generate some plug-in modules, an error will be reported when starting.
|
||||
// You need to fix the problem later, and start the following rules.
|
||||
// "import/no-unresolved": "error"
|
||||
},
|
||||
},
|
||||
|
||||
@@ -59,9 +59,9 @@ module.exports = [
|
||||
{
|
||||
vars: 'all',
|
||||
args: 'none', // function arguments should not force to match this rule.
|
||||
argsIgnorePattern: '^_', // 规范允许下划线
|
||||
ignoreRestSiblings: true, //使用rest语法(如 `var { foo, ...rest } = data`) 忽略foo。
|
||||
destructuredArrayIgnorePattern: '^_', //结构数组允许使用_
|
||||
argsIgnorePattern: '^_', // Specifications allow underlining
|
||||
ignoreRestSiblings: true, //Use rest syntax (such as'var {foo,... rest} = data ') to ignore foo.
|
||||
destructuredArrayIgnorePattern: '^_', //Structural arrays allow _
|
||||
caughtErrors: 'none',
|
||||
// "caughtErrorsIgnorePattern": "^e$"
|
||||
},
|
||||
@@ -314,7 +314,7 @@ module.exports = [
|
||||
},
|
||||
},
|
||||
|
||||
// TODO: 之前overides的内容,后需可考虑直接合入上面标准配置
|
||||
// TODO: The content of overides before can be considered to be directly integrated into the above standard configuration later
|
||||
{
|
||||
files: ['**/*.?(m|c)ts?(x)'],
|
||||
rules: {
|
||||
@@ -324,8 +324,8 @@ module.exports = [
|
||||
fixStyle: 'inline-type-imports',
|
||||
},
|
||||
],
|
||||
// 这些规则都是从 packages/config/.eslintrc.react.js 复制迁移过来
|
||||
// 后续在做调整
|
||||
// These rules are copied and migrated from packages/config/.eslintrc.react.js
|
||||
// Adjustments are being made later.
|
||||
'@typescript-eslint/no-redundant-type-constituents': 0,
|
||||
'@typescript-eslint/no-throw-literal': 'off',
|
||||
'@typescript-eslint/no-unnecessary-condition': 0,
|
||||
@@ -335,14 +335,14 @@ module.exports = [
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'no-shadow': 'off',
|
||||
'@typescript-eslint/no-shadow': 'error',
|
||||
// TODO: 后续开启
|
||||
// TODO: Follow-up opening
|
||||
// 'import/no-cycle': 'error',
|
||||
|
||||
'@typescript-eslint/prefer-string-starts-ends-with': 0,
|
||||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 0,
|
||||
'@typescript-eslint/no-implied-eval': 0, // warning
|
||||
|
||||
// TODO: 打开下面这些配置
|
||||
// TODO: Open the following configurations
|
||||
// fix: https://stackoverflow.com/questions/63961803/eslint-says-all-enums-in-typescript-app-are-already-declared-in-the-upper-scope
|
||||
// 'no-shadow': 'off',
|
||||
// '@typescript-eslint/no-shadow': ['error'],
|
||||
@@ -364,7 +364,7 @@ module.exports = [
|
||||
// },
|
||||
// ],
|
||||
// complexity: ['error', { max: 15 }],
|
||||
// 后面统一使用CustomError后 再开启
|
||||
// After using CustomError uniformly later, open it again.
|
||||
'@coze-arch/no-new-error': 'off',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user