mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-21 19:39:19 +08:00
84 lines
2.3 KiB
JavaScript
84 lines
2.3 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
env: {
|
|
browser: true,
|
|
node: true,
|
|
es6: true
|
|
},
|
|
globals: {
|
|
defineProps: 'readonly',
|
|
defineEmits: 'readonly',
|
|
defineExpose: 'readonly'
|
|
},
|
|
parserOptions: {
|
|
parser: '@typescript-eslint/parser',
|
|
ecmaVersion: 2020
|
|
},
|
|
extends: [
|
|
'plugin:vue/vue3-recommended',
|
|
'plugin:vue/vue3-strongly-recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'@vue/standard',
|
|
'@vue/typescript/recommended'
|
|
],
|
|
rules: {
|
|
'vue/multi-word-component-names': 'off',
|
|
'vue/comment-directive': 'off',
|
|
'no-console': 'off',
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
'@typescript-eslint/ban-types': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/member-delimiter-style': [
|
|
'error',
|
|
{
|
|
multiline: {
|
|
delimiter: 'none'
|
|
},
|
|
singleline: {
|
|
delimiter: 'comma'
|
|
}
|
|
}
|
|
],
|
|
// 'vue/html-self-closing': [
|
|
// 'error',
|
|
// {
|
|
// html: {
|
|
// void: 'always',
|
|
// normal: 'always',
|
|
// component: 'always'
|
|
// },
|
|
// svg: 'always',
|
|
// math: 'always'
|
|
// }
|
|
// ],
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-var-requires': 'off',
|
|
'prefer-regex-literals': 'off',
|
|
'space-before-function-paren': ['error', 'never'],
|
|
'vue/array-bracket-spacing': 'error',
|
|
'vue/arrow-spacing': 'error',
|
|
'vue/block-spacing': 'error',
|
|
'vue/brace-style': 'error',
|
|
'vue/camelcase': 'error',
|
|
'vue/comma-dangle': 'error',
|
|
'vue/component-name-in-template-casing': 'error',
|
|
'vue/eqeqeq': 'error',
|
|
'vue/key-spacing': 'error',
|
|
'vue/match-component-file-name': 'error',
|
|
'vue/object-curly-spacing': 'error',
|
|
'vue/max-attributes-per-line': 'off',
|
|
'vue/html-closing-bracket-newline': 'off',
|
|
'no-useless-escape': 'off',
|
|
'@typescript-eslint/no-this-alias': [
|
|
'error',
|
|
{
|
|
allowDestructuring: true, // Allow `const { props, state } = this`; false by default
|
|
allowedNames: ['self'] // Allow `const self = this`; `[]` by default
|
|
}
|
|
],
|
|
'vue/attribute-hyphenation': 'off',
|
|
'vue/custom-event-name-casing': 'off',
|
|
'dot-notation': 'off'
|
|
}
|
|
}
|