forked from anaprimawaty/pixelect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
34 lines (33 loc) · 970 Bytes
/
.eslintrc.js
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
const isProduction = process.env.NODE_ENV === 'production'
module.exports = {
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
sourceType: 'module',
},
// https://github.com/standard/standard/blob/master/docs/README-en.md
// We override some rules:
// * Trailing commas: always
// * Space before function paren: never
extends: ['standard', 'plugin:vue/recommended', 'prettier'],
plugins: isProduction
? ['vue', 'html', 'prettier']
: ['vue', 'html', 'prettier', 'only-warn'],
rules: {
'arrow-parens': 0,
'generator-star-spacing': 0,
'no-debugger': isProduction ? 2 : 0,
'space-before-function-paren': [isProduction ? 'error' : 'warn', 'never'],
'prettier/prettier': [
isProduction ? 'error' : 'warn',
{
singleQuote: true,
trailingComma: 'es5',
bracketSpacing: true,
jsxBracketSameLine: true,
parser: 'babylon',
semi: false,
},
],
},
}