-
Notifications
You must be signed in to change notification settings - Fork 45
/
.eslintrc.js
57 lines (57 loc) · 2.35 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
47
48
49
50
51
52
53
54
55
56
57
module.exports = {
env: {
commonjs: true,
es2021: true,
node: true,
jest: true,
},
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 13,
},
rules: {
'array-bracket-spacing': ['error', 'never'],
'array-element-newline': ['error', 'consistent'],
'arrow-spacing': ['error', { before: true, after: true }],
'arrow-parens': ['error', 'always'],
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': ['error', { before: false, after: true }],
'comma-style': ['error', 'last'],
'computed-property-spacing': ['error', 'never'],
'default-case-last': ['error'],
'dot-location': ['error', 'property'],
'func-call-spacing': ['error', 'never'],
'function-call-argument-newline': ['error', 'consistent'],
'eol-last': ['error', 'always'],
'indent': ['error', 4],
'key-spacing': ['error', { mode: 'strict' }],
'keyword-spacing': ['error', { before: true, after: true }],
'linebreak-style': ['error', 'unix'],
'no-multi-spaces': 'error',
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 1 }],
'no-nested-ternary': 'error',
'no-new-object': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'error',
'no-return-await': 'error',
'no-tabs': 'error',
'no-throw-literal': 'error',
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
'no-whitespace-before-property': 'error',
'object-curly-spacing': ['error', 'always'],
'operator-linebreak': ['error', 'before'],
'padded-blocks': ['error', 'never'],
'prefer-promise-reject-errors': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'quote-props': ['error', 'consistent-as-needed'],
'quotes': ['error', 'single'],
'rest-spread-spacing': ['error', 'never'],
'semi': ['error', 'always'],
'space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }],
'template-curly-spacing': ['error', 'never'],
},
};