🔧: 修改 eslintrc.js 配置
This commit is contained in:
parent
ab5c55eacb
commit
b704f90fe7
99
.eslintrc.js
99
.eslintrc.js
@ -1,54 +1,49 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
node: true,
|
node: true,
|
||||||
es6: true
|
es6: true,
|
||||||
|
},
|
||||||
|
parser: "vue-eslint-parser",
|
||||||
|
parserOptions: {
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
ecmaVersion: 2020,
|
||||||
|
sourceType: "module",
|
||||||
|
jsxPragma: "React",
|
||||||
|
ecmaFeatures: {
|
||||||
|
jsx: true,
|
||||||
},
|
},
|
||||||
parser: 'vue-eslint-parser',
|
},
|
||||||
parserOptions: {
|
extends: [
|
||||||
parser: '@typescript-eslint/parser',
|
"prettier",
|
||||||
ecmaVersion: 2020,
|
"plugin:vue/vue3-recommended",
|
||||||
sourceType: 'module',
|
"plugin:@typescript-eslint/recommended",
|
||||||
jsxPragma: 'React',
|
"plugin:prettier/recommended",
|
||||||
ecmaFeatures: {
|
],
|
||||||
jsx: true
|
rules: {
|
||||||
}
|
"@typescript-eslint/ban-ts-ignore": "off",
|
||||||
},
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
globals: {
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
AMap: false,
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
AMapUI: false
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
},
|
"vue/custom-event-name-casing": "off",
|
||||||
extends: [
|
"no-use-before-define": "off",
|
||||||
'prettier',
|
"@typescript-eslint/no-use-before-define": "off",
|
||||||
'plugin:vue/vue3-recommended',
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
'plugin:@typescript-eslint/recommended',
|
"@typescript-eslint/ban-types": "off",
|
||||||
'plugin:prettier/recommended'
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
],
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||||
rules: {
|
"space-before-function-paren": "off",
|
||||||
'@typescript-eslint/ban-ts-ignore': 'off',
|
"vue/name-property-casing": ["error", "PascalCase"],
|
||||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
"vue/attributes-order": "off",
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
"vue/one-component-per-file": "off",
|
||||||
'@typescript-eslint/no-var-requires': 'off',
|
"vue/html-closing-bracket-newline": "off",
|
||||||
'@typescript-eslint/no-empty-function': 'off',
|
"vue/max-attributes-per-line": "off",
|
||||||
'vue/custom-event-name-casing': 'off',
|
"vue/multiline-html-element-content-newline": "off",
|
||||||
'no-use-before-define': 'off',
|
"vue/singleline-html-element-content-newline": "off",
|
||||||
'@typescript-eslint/no-use-before-define': 'off',
|
"vue/attribute-hyphenation": "off",
|
||||||
'@typescript-eslint/ban-ts-comment': 'off',
|
"vue/require-default-prop": "off",
|
||||||
'@typescript-eslint/ban-types': 'off',
|
"vue/script-setup-uses-vars": "off",
|
||||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
},
|
||||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
};
|
||||||
'space-before-function-paren': 'off',
|
|
||||||
'vue/name-property-casing': ['error', 'PascalCase'],
|
|
||||||
'vue/attributes-order': 'off',
|
|
||||||
'vue/one-component-per-file': 'off',
|
|
||||||
'vue/html-closing-bracket-newline': 'off',
|
|
||||||
'vue/max-attributes-per-line': 'off',
|
|
||||||
'vue/multiline-html-element-content-newline': 'off',
|
|
||||||
'vue/singleline-html-element-content-newline': 'off',
|
|
||||||
'vue/attribute-hyphenation': 'off',
|
|
||||||
'vue/require-default-prop': 'off',
|
|
||||||
'vue/script-setup-uses-vars': 'off'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user