You've already forked template-MP
新增:全量优化
This commit is contained in:
56
.eslintrc.js
Normal file
56
.eslintrc.js
Normal file
@@ -0,0 +1,56 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true,
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:vue/vue3-essential',
|
||||
'prettier',
|
||||
'plugin:prettier/recommended',
|
||||
],
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: ['vue', 'prettier'],
|
||||
rules: {
|
||||
'prettier/prettier': 'error',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/no-unused-vars': 'error',
|
||||
'vue/html-self-closing': 'off',
|
||||
'vue/max-attributes-per-line': [
|
||||
'error',
|
||||
{
|
||||
singleline: {
|
||||
max: 3,
|
||||
},
|
||||
multiline: {
|
||||
max: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-unused-vars': 'error',
|
||||
'no-undef': 'error',
|
||||
'no-var': 'error',
|
||||
'prefer-const': 'error',
|
||||
'object-shorthand': 'error',
|
||||
'quote-props': ['error', 'as-needed'],
|
||||
'array-callback-return': 'error',
|
||||
'prefer-arrow-callback': 'error',
|
||||
'arrow-parens': ['error', 'as-needed'],
|
||||
'arrow-spacing': 'error',
|
||||
'no-duplicate-imports': 'error',
|
||||
},
|
||||
globals: {
|
||||
uni: 'readonly',
|
||||
getApp: 'readonly',
|
||||
getCurrentPages: 'readonly',
|
||||
plus: 'readonly',
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user