You've already forked template-MP
56 lines
1.4 KiB
JavaScript
56 lines
1.4 KiB
JavaScript
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',
|
|
},
|
|
} |