This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.js
116 lines (116 loc) · 2.23 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/* eslint-disable import/no-commonjs */
module.exports = {
extends: [
require.resolve('eslint-config-google'),
require.resolve('eslint-config-node'),
],
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
ecmaVersion: 8,
},
env: {
browser: false,
mocha: true,
node: true,
es6: true,
},
plugins: [
'no-only-tests',
'babel',
'import',
],
ignorePatterns: [
'**/*.d.ts',
],
rules: {
'arrow-parens': [
'error',
'always',
{
'requireForBlockBody': true,
},
],
'lines-between-class-members': 'error',
'no-underscore-dangle': 'off',
'no-only-tests/no-only-tests': 'error',
'import/extensions': [
'error',
'always',
{
ignorePackages: true,
},
],
'import/prefer-default-export': 'off',
'import/no-nodejs-modules': 'off',
'import/no-extraneous-dependencies': [
'error',
{
'devDependencies': [
'**/test/**/*.js',
'**/*.config.js',
'**/*.conf.js',
],
},
],
'class-methods-use-this': [
// this is unnecessary for node apps.
'off',
{
'exceptMethods': [],
},
],
'no-undef': 'error',
'require-jsdoc': ['warn', {
require: {
FunctionDeclaration: true,
MethodDefinition: true,
ClassDeclaration: true,
ArrowFunctionExpression: true,
FunctionExpression: true,
},
}],
'comma-dangle': 'warn',
'new-cap': [
'error',
{
properties: false,
capIsNew: false,
},
],
'max-len': [
'error',
{
code: 120,
},
],
'object-curly-spacing': [
'error',
'always',
],
'no-console': [
'error',
],
'no-unused-expressions': 'error',
'babel/no-unused-expressions': 'error',
'prefer-template': 'error',
'no-return-await': 'error',
'no-template-curly-in-string': 'error',
'indent': [
'error',
2,
{
SwitchCase: 1,
VariableDeclarator: 1,
outerIIFEBody: 0,
MemberExpression: 0,
},
],
'no-shadow': [
'error',
{
builtinGlobals: true,
},
],
},
};