UNPKG

@blueking/eslint-config

Version:

蓝鲸前端代码 ESLint 规则

30 lines (26 loc) 801 B
module.exports = { // 禁止空语句(可在空语句写注释避免),允许空的 catch 语句 // https://eslint.org/docs/rules/no-empty 'no-empty': ['error', { allowEmptyCatch: true }], // 禁止在语句末尾使用分号 // https://eslint.org/docs/rules/semi semi: ['error', 'never'], // 禁用不必要的分号 // https://eslint.org/docs/rules/no-extra-semi 'no-extra-semi': 'error', // https://eslint.org/docs/rules/max-len 'max-len': ['error', { code: 120, tabWidth: 2 }], // https://eslint.org/docs/rules/comma-dangle 'comma-dangle': ['error', { arrays: 'never', objects: 'never', imports: 'never', exports: 'never', functions: 'never' }], // https://eslint.org/docs/rules/no-nested-ternary 'no-nested-ternary': 'warn' }