-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
139 lines (138 loc) · 2.77 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
const path = require('path')
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/essential',
'@vue/prettier',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:security/recommended'
],
plugins: ['compat', 'security'],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'import/first': 'error',
'import/no-anonymous-default-export': 'off',
'import/no-unassigned-import': 'off',
'import/prefer-default-export': 'error',
'import/no-named-as-default': 'off',
'prettier/prettier': [
'error',
{
semi: false,
singleQuote: true,
trailingComma: 'none'
}
],
'lines-between-class-members': ['error', 'always'],
'no-shadow': 'error',
'no-var': 'error',
'padding-line-between-statements': [
'error',
{
blankLine: 'always',
prev: 'class',
next: '*'
},
{
blankLine: 'always',
prev: 'do',
next: '*'
},
{
blankLine: 'always',
prev: '*',
next: 'export'
},
{
blankLine: 'always',
prev: 'for',
next: '*'
},
{
blankLine: 'always',
prev: 'if',
next: '*'
},
{
blankLine: 'always',
prev: 'switch',
next: '*'
},
{
blankLine: 'always',
prev: 'try',
next: '*'
},
{
blankLine: 'always',
prev: 'while',
next: '*'
},
{
blankLine: 'always',
prev: 'with',
next: '*'
}
],
'prefer-const': 'error',
'security/detect-object-injection': 'off',
'vue/no-unused-components': [
'error',
{
ignoreWhenBindingPresent: true
}
]
},
settings: {
'import/resolver': {
webpack: {
config: {
resolve: {
alias: {
'@': path.join(__dirname, '/src'),
vue$: 'vue/dist/vue.runtime.esm.js'
},
extensions: ['.js', '.jsx', '.vue', '.json']
}
}
}
}
},
globals: {
__DEV__: true,
__dirname: true,
accounts: true,
after: true,
afterAll: true,
afterEach: true,
artifacts: true,
assert: true,
before: true,
beforeAll: true,
beforeEach: true,
console: true,
contract: true,
describe: true,
expect: true,
fetch: true,
global: true,
it: true,
module: true,
process: true,
Promise: true,
require: true,
setTimeout: true,
test: true,
xdescribe: true,
xit: true,
web3: true
}
}