.eslintrc.js
940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* @Description:
* @LastEditors: Please set LastEditors
* @Date: 2021-02-02 21:32:37
*/
module.exports = {
root: true,
env: {
node: true,
browser: true
},
extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier'],
plugins: ['prettier'],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'prettier/prettier': [
'error',
{
jsxBracketSameLine: false,
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 80,
tabWidth: 2,
endOfLine: 'auto',
trailingComma: 'none',
arrowParens: 'avoid',
htmlWhitespaceSensitivity: 'ignore'
}
],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
quotes: [1, 'single'],
semi: [0],
'space-before-function-paren': [0, 'always']
}
};