-
Notifications
You must be signed in to change notification settings - Fork 39
/
.eslintrc.js
100 lines (97 loc) · 2.49 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
module.exports = {
env: {
browser: true,
es6: true
},
extends: [
'standard',
'plugin:@typescript-eslint/recommended'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'import'],
settings: {
'import/resolver': {
// NOTE: sk - These aliases are required for the import/order rule.
// We are using the typescript baseUrl to do absolute import paths
// relative to /src, which eslint can't tell apart from 3rd party deps
alias: {
map: [
['eth', './src/eth'],
['sol', './src/sol'],
['utils', './src/utils']
],
extensions: ['.js', '.json', '.ts']
}
}
},
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-this-alias': 'off',
'no-use-before-define': 'off',
camelcase: 'off',
'no-unused-vars': 'off',
'func-call-spacing': 'off',
semi: ['error', 'never'],
'no-undef': 'off',
'no-empty': 'off',
'arrow-parens': 'off',
'padded-blocks': 'off',
'space-before-function-paren': 'off',
'generator-star-spacing': 'off',
'import/order': [
'error',
{
alphabetize: {
order: 'asc'
},
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index'
],
'newlines-between': 'always',
pathGroups: [
{
pattern: 'react',
group: 'builtin',
position: 'before'
}
],
pathGroupsExcludedImportTypes: ['builtin']
}
],
'import/no-default-export': 'error'
},
overrides: [
{
files: ['src/**/*.d.ts', 'rollup.config.ts'],
rules: {
'import/no-default-export': 'off'
}
}
]
}