forked from brophdawg11/vue-ssr-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
46 lines (45 loc) · 1.69 KB
/
.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
35
36
37
38
39
40
41
42
43
44
45
46
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: '@babel/eslint-parser',
sourceType: 'module',
},
env: {
browser: true,
jest: true,
},
extends: [
'airbnb-base',
],
rules: {
// Kept from airbnb-base@13, that switched to 'always' in 14
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
// 4 space indent
indent: ['error', 4],
// Don't enforce newlines on function parens
'function-paren-newline': 'off',
// Max length 0f 80 characters in source code
'max-len': ['error', {
code: 100,
ignoreUrls: true,
}],
// Don't allow console.*, force logger usage
'no-console': 'error',
// Allow unary ++ and -- operators
'no-plusplus': 'off',
// Allow up to 8 props, but mostly rely on max line length to limit this
'object-curly-newline': ['error', {
ObjectExpression: { minProperties: 8, multiline: true, consistent: true },
ObjectPattern: { minProperties: 8, multiline: true, consistent: true },
ImportDeclaration: { minProperties: 8, multiline: true, consistent: true },
ExportDeclaration: { minProperties: 8, multiline: true, consistent: true },
}],
// Put operators at the end of the line (?, :, &&, ||)
'operator-linebreak': ['error', 'after'],
// Don't enforce a blank line or not at the beginning of a block
'padded-blocks': 'off',
// Don't enforce promises being rejected with Error objects
'prefer-promise-reject-errors': 'off',
},
};