-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
54 lines (54 loc) · 1.28 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
/**
* ESLint Configuration
*/
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: {
// 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,
},
settings: {
'import/resolver': {
// Allow `@/` to map to `src/client/`
alias: {
map: [
['@', './src/client'],
['@resources', './src/resources'],
],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
},
},
react: {
version: 'detect',
},
},
}