This repository has been archived by the owner on Aug 12, 2020. It is now read-only.
forked from ravidsrk/smart-contract-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
102 lines (101 loc) · 2.44 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
module.exports = {
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
generators: true,
experimentalObjectRestSpread: true
},
sourceType: 'module',
allowImportExportEverywhere: false
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:promise/recommended',
'plugin:security/recommended'
],
plugins: [
'compat',
'prettier',
'promise',
'security'
],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.json', '.css'],
paths: './src'
}
},
polyfills: ['fetch', 'promises']
},
env: {
node: true,
},
globals: {
__DEV__: true,
__dirname: 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
},
rules: {
'compat/compat': 'error',
'import/first': 'error',
'import/no-anonymous-default-export': 'error',
'import/no-unassigned-import': 'error',
'import/prefer-default-export': 'error',
'import/no-named-as-default': 'off',
'import/no-unresolved': 'error',
'prettier/prettier': [
'error',
{
semi: false,
singleQuote: true,
trailingComma: 'none'
}
],
'promise/avoid-new': 'off',
'security/detect-object-injection': 'off',
'arrow-body-style': 'off',
'lines-between-class-members': ['error', 'always'],
'no-console': ['warn', { allow: ['assert'] }],
'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'
}
}