forked from streamr-dev/hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
75 lines (74 loc) · 2.52 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
const path = require('path')
module.exports = {
extends: ['plugin:react/recommended', 'streamr-ts', 'plugin:cypress/recommended', 'prettier'],
parser: '@typescript-eslint/parser',
settings: {
'import/resolver': {
webpack: {
config: path.resolve(__dirname, 'webpack.config.js'),
},
},
},
plugins: ['react-hooks', 'import', 'react', 'jsx-a11y'],
rules: {
'prefer-const': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'no-unused-vars': 'off', // as we prefer the typescript version of this rule
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn',
'no-multiple-empty-lines': 'warn',
'jsx-a11y/no-noninteractive-tabindex': 'warn',
'react/jsx-indent': 'warn',
'max-len': 'warn',
'react/prop-types': 0,
'no-unreachable': 'warn',
'object-curly-newline': 0,
'no-trailing-spaces': 'warn',
'no-void': 'off',
// these promise/atomic rules should probably be turned on
'promise/catch-or-return': 'off',
'promise/always-return': 'off',
'require-atomic-updates': 'off',
'react/sort-comp': 0,
"react/no-unknown-property": ['error', { ignore: ['css'] }],
'import/extensions': 'off',
'import/order': [
'warn',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
pathGroups: [
{
pattern: '$*/**',
group: 'internal',
position: 'after',
},
{
pattern: '$*',
group: 'internal',
position: 'after',
},
{
pattern: '~/**',
group: 'internal',
position: 'after',
}
],
},
],
indent: 'off',
'@typescript-eslint/explicit-module-boundary-types': [
'off', // TODO - change to 'error' in the future
{
allowArgumentsExplicitlyTypedAsAny: true,
},
],
"@typescript-eslint/no-namespace": "off",
"no-underscore-dangle": "off",
},
overrides: [
{
files: ['*.tsx', '*.ts', '*.js'],
},
],
}