-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconfig.js
39 lines (38 loc) · 1.33 KB
/
config.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
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
require.resolve('eslint-config-react-app'),
require.resolve('eslint-config-ringcentral'),
'plugin:@typescript-eslint/recommended', // must be below react-app & ringcentral to enable proper parser
require.resolve('eslint-config-prettier'), // must be below ringcentral to override react prefs
],
rules: {
curly: 'error',
'no-shadow': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/indent': 'off', // prettier takes care of it
'@typescript-eslint/no-shadow': 'error',
'react/jsx-closing-bracket-location': 'off' // prettier takes care of it
},
env: {
browser: true,
node: true,
},
settings: {
react: {
version: 'detect',
},
// @see https://github.com/alexgorbatchev/eslint-import-resolver-typescript
// @see https://github.com/import-js/eslint-plugin-import/issues/1282#issuecomment-600907820
'import/resolver': {
'typescript': {
'alwaysTryTypes': true,
}
}
},
};