mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
dbaf83e2a4
* feat(checkbox): init checkbox * feat(checkbox): update checkbox-button checkbox-group * feat(checkbox): init unit test * feat(checkbox): update unit test * fix(checkbox): improve some code * test(checkbox): update test case
60 lines
1.5 KiB
JavaScript
60 lines
1.5 KiB
JavaScript
module.exports = {
|
|
parser: 'vue-eslint-parser',
|
|
parserOptions: {
|
|
parser: '@typescript-eslint/parser',
|
|
sourceType: 'module',
|
|
},
|
|
env: {
|
|
browser: true,
|
|
node: true,
|
|
},
|
|
plugins: [
|
|
'@typescript-eslint',
|
|
],
|
|
extends: [
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:vue/vue3-recommended',
|
|
],
|
|
rules: {
|
|
// js/ts
|
|
'eol-last': 'error',
|
|
'no-trailing-spaces': 'error',
|
|
'comma-style': ['error', 'last'],
|
|
'comma-dangle': ['error', 'always-multiline'],
|
|
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
|
|
camelcase: ['error', { properties: 'never' }],
|
|
semi: ['error', 'never'],
|
|
indent: ['error', 2, { SwitchCase: 1 }],
|
|
'object-curly-spacing': ['error', 'always'],
|
|
// vue
|
|
'vue/singleline-html-element-content-newline': 'off',
|
|
'vue/html-self-closing': ['error', {
|
|
html: {
|
|
void: 'never',
|
|
normal: 'never',
|
|
component: 'always',
|
|
},
|
|
}],
|
|
'vue/max-attributes-per-line': ['error', {
|
|
singleline: 3,
|
|
multiline: 1,
|
|
}],
|
|
'@typescript-eslint/member-delimiter-style': [
|
|
2,
|
|
{
|
|
multiline: {
|
|
delimiter: 'none',
|
|
requireLast: false,
|
|
},
|
|
singleline: {
|
|
delimiter: 'semi',
|
|
requireLast: true,
|
|
},
|
|
},
|
|
],
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'vue/html-closing-bracket-spacing': 'error',
|
|
'@typescript-eslint/no-explicit-any': 0,
|
|
},
|
|
}
|