Skip to content

Commit ef4f07b

Browse files
committed
Make eslint happy
1 parent 414ccf2 commit ef4f07b

File tree

23 files changed

+259
-402
lines changed

23 files changed

+259
-402
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ node_modules/
33
storybook-static/
44
*.spec.js
55
src/generated/gql/
6+
.eslintrc.js
7+
webpack.config.js

.eslintrc.js

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
const path = require('path')
22

33
module.exports = {
4-
extends: ['plugin:react/recommended', 'streamr-ts', 'plugin:cypress/recommended', 'prettier'],
4+
extends: [
5+
'plugin:react/recommended',
6+
'streamr-ts',
7+
'plugin:cypress/recommended',
8+
'prettier',
9+
],
510
parser: '@typescript-eslint/parser',
611
settings: {
712
'import/resolver': {
@@ -16,7 +21,18 @@ module.exports = {
1621
'react-hooks/rules-of-hooks': 'error',
1722
'react-hooks/exhaustive-deps': 'warn',
1823
'no-unused-vars': 'off', // as we prefer the typescript version of this rule
19-
'@typescript-eslint/no-unused-vars': 'warn',
24+
'@typescript-eslint/no-unused-vars': [
25+
'warn',
26+
{
27+
args: 'all',
28+
argsIgnorePattern: '^_',
29+
caughtErrors: 'all',
30+
caughtErrorsIgnorePattern: '^_',
31+
destructuredArrayIgnorePattern: '^_',
32+
varsIgnorePattern: '^_',
33+
ignoreRestSiblings: true,
34+
},
35+
],
2036
'@typescript-eslint/ban-ts-comment': 'warn',
2137
'no-multiple-empty-lines': 'warn',
2238
'jsx-a11y/no-noninteractive-tabindex': 'warn',
@@ -32,12 +48,20 @@ module.exports = {
3248
'promise/always-return': 'off',
3349
'require-atomic-updates': 'off',
3450
'react/sort-comp': 0,
35-
"react/no-unknown-property": ['error', { ignore: ['css'] }],
51+
'react/no-unknown-property': ['error', { ignore: ['css'] }],
3652
'import/extensions': 'off',
3753
'import/order': [
3854
'warn',
3955
{
40-
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
56+
groups: [
57+
'builtin',
58+
'external',
59+
'internal',
60+
'parent',
61+
'sibling',
62+
'index',
63+
'object',
64+
],
4165
pathGroups: [
4266
{
4367
pattern: '$*/**',
@@ -53,7 +77,7 @@ module.exports = {
5377
pattern: '~/**',
5478
group: 'internal',
5579
position: 'after',
56-
}
80+
},
5781
],
5882
},
5983
],
@@ -64,16 +88,8 @@ module.exports = {
6488
allowArgumentsExplicitlyTypedAsAny: true,
6589
},
6690
],
67-
"@typescript-eslint/no-namespace": "off",
68-
"no-underscore-dangle": "off",
69-
"@typescript-eslint/ban-types": [
70-
"error",
71-
{
72-
"types": {
73-
"{}": false,
74-
},
75-
},
76-
],
91+
'@typescript-eslint/no-namespace': 'off',
92+
'no-underscore-dangle': 'off',
7793
},
7894
overrides: [
7995
{

0 commit comments

Comments
 (0)