-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.eslintrc.js
46 lines (46 loc) · 1.59 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
module.exports = {
env: {
browser: true,
es6: true
},
extends: ['airbnb-base'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module'
},
plugins: [
'@typescript-eslint'
],
rules: {
'indent': ['error', 4],
'semi': ['error', 'never'],
'comma-dangle': ['error', 'never'],
'no-trailing-spaces': ['error', { ignoreComments: true }],
'quote-props': ['error', 'consistent'],
'func-names': ['error', 'never'],
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }],
'arrow-parens': ['error', 'as-needed'],
'no-undef': 'off',
'array-callback-return': ['error', { allowImplicit: true }],
'no-restricted-syntax': ['error', "BinaryExpression[operator='of']"],
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'no-param-reassign': 'off',
'import/no-unresolved': 'off',
'no-continue': 'off',
'no-use-before-define': 'off',
'brace-style': ['error', 'stroustrup'],
'linebreak-style': 'off',
'no-restricted-globals': 'off',
'arrow-body-style': 'off',
'no-return-assign': 'off',
'operator-linebreak': ['error', 'after'],
'no-unused-expressions': ['error', { 'allowShortCircuit': true }],
// 由于本项目用于翻译,所以允许出现超长行
'max-len': 'off',
'object-curly-newline': ['error', {
'ExportDeclaration': { 'multiline': true, 'minProperties': 8 }
}]
}
}