-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
52 lines (52 loc) · 1.42 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
module.exports = {
extends: [
'airbnb',
'prettier',
'plugin:prettier/recommended',
'eslint-config-prettier',
],
parser: '@typescript-eslint/parser',
ignorePatterns: ['**/node_modules/**'],
rules: {
'react/jsx-filename-extension': [
2,
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
], // https://stackoverflow.com/questions/55614983/jsx-not-allowed-in-files-with-extension-tsxeslintreact-jsx-filename-extensio
'react/react-in-jsx-scope': 'off', // https://stackoverflow.com/questions/42640636/react-must-be-in-scope-when-using-jsx-react-react-in-jsx-scope
camelcase: ['error', { allow: ['Inter_*'] }],
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
json: 'never',
},
],
'react/jsx-props-no-spreading': 0,
'no-unused-vars': 'warn',
'react/no-unused-prop-types': 'warn',
'no-use-before-define': 'warn',
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
'react/prop-types': ['error', { ignore: ['navigation'] }],
},
settings: {
'import/resolver': { node: { extensions: ['.js', '.jsx', '.ts', '.tsx'] } },
},
globals: {
NodeJS: true,
fetch: true,
FormData: true,
File: true,
},
plugins: ['prettier'],
};