-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
63 lines (63 loc) · 1.48 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
modules: true,
},
},
extends: [
'plugin:react/recommended',
'plugin:import/typescript',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:prettier/recommended',
'prettier/react',
],
plugins: ['import'],
rules: {
// turn on errors for missing imports
'import/no-unresolved': 'error',
// Separate import groups with newline by section
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
'unknown',
],
'newlines-between': 'always',
},
],
'no-console': 1, // Warning to reduce console logs used throughout app
'react/prop-types': 0, // Not using prop-types because we have TypeScript
'newline-before-return': 1,
'no-useless-return': 1,
'prefer-const': 1,
'no-useless-return': 1,
'no-unused-vars': 0,
'react/react-in-jsx-scope': 0,
'react/display-name': 0,
'import/no-named-as-default-member': 0,
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
'import/ignore': ['middy/middlewares', 'dynamoose'],
react: {
version: 'detect',
},
},
}