generated from Amsterdam/frontend-react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
78 lines (77 loc) · 1.77 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
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 - 2021 Gemeente Amsterdam
module.exports = {
env: {
es6: true,
browser: true,
jest: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:promise/recommended',
'prettier',
],
globals: {
L: true,
},
overrides: [
{
files: ['**/*.test.*'],
rules: {},
},
{
extends: ['plugin:@typescript-eslint/recommended'],
files: ['**/*.ts', '**/*.tsx'],
rules: {
'react/prop-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off'
},
},
{
files: ['**/*.js', '**/*.jsx'],
rules: {},
},
],
parser: '@typescript-eslint/parser',
root: true,
rules: {
'no-debugger': 1,
'no-console': [
'warn',
{
'allow': [
'info',
'table',
'warn',
'error'
]
}
],
'no-redeclare': 'off',
'promise/always-return': 'off',
'promise/catch-or-return': 'off',
'promise/no-callback-in-promise': 'off',
'react/react-in-jsx-scope': 'off',
'react/display-name': 'off',
'import/no-webpack-loader-syntax': 'off',
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
},
};