This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
node.js
86 lines (79 loc) · 2.44 KB
/
node.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
'use strict'
const { warn, error, never, always, off, single, all } = require('./constants')
module.exports = {
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
env: {
es6: true,
node: true,
browser: true,
jest: true
},
globals: {
artifacts: true,
console: true,
contract: true,
context: true,
fetch: true,
process: true,
URL: true
},
rules: {
'array-bracket-spacing': [ error, always ],
'array-callback-return': warn,
'block-spacing': [ error, always ],
'brace-style': [ error, '1tbs', { allowSingleLine: false } ],
'comma-dangle': [ warn, never ],
'comma-spacing': error,
'comma-style': error,
'computed-property-spacing': [ error, never ],
'consistent-this': [ error, 'self' ],
'curly': [ error, all ],
'eol-last': [ error, always ],
'eqeqeq': [ error, always, { null: 'ignore' } ],
'for-direction': error,
'func-call-spacing': [ error, never ],
'indent': [ error, 2, { SwitchCase: 1 } ],
'key-spacing': error,
'keyword-spacing': error,
'max-len': off,
'new-cap': error,
'no-buffer-constructor': error,
'no-console': off,
'no-constant-condition': [ error, { checkLoops: false } ],
'no-lonely-if': error,
'no-loop-func': error,
'no-mixed-operators': error,
'no-mixed-spaces-and-tabs': error,
'no-multi-spaces': error,
'no-new-require': error,
'no-param-reassign': [ error, { props: false } ],
'no-path-concat': error,
'no-return-assign': error,
'no-self-compare': error,
'no-shadow': error,
'no-tabs': error,
'no-throw-literal': error,
'no-trailing-spaces': error,
'no-undefined': off,
'no-unneeded-ternary': [ error, { defaultAssignment: false } ],
'no-use-before-define': [ error, { functions: false, classes: true } ],
'no-useless-constructor': error,
'object-curly-spacing': [ error, always ],
'prefer-const': warn,
'prefer-rest-params': error,
'prefer-spread': error,
'quotes': [ error, single ],
'semi': [ error, never ],
'space-before-blocks': error,
'space-before-function-paren': [ error, { anonymous: always, named: never, asyncArrow: always } ],
'space-in-parens': [ error, never ],
'space-infix-ops': error,
'space-unary-ops': error,
'spaced-comment': [ error, always, { 'markers': [ '/', ':', '::' ] } ],
'yoda': [ error, never, { exceptRange: true } ]
}
}