-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.js
49 lines (48 loc) · 1.27 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
const path = require('path');
module.exports = {
parser: '@typescript-eslint/parser',
root: true,
parserOptions: {
jsx: true,
useJSXTextNode: true,
ecmaFeatures: { jsx: true },
},
plugins: ['@typescript-eslint'],
extends: [
'@react-native',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:react-native/all',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
],
settings: {
react: {
pragma: 'React',
version: 'detect',
},
'import/resolver': {
typescript: {
project: [path.resolve(__dirname, './tsconfig.json')],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'],
},
node: {
moduleDirectory: [path.resolve(__dirname, './node_modules')],
},
},
'import/ignore': ['react-native'],
'import/extensions': ['.js', '.jsx', '.ts', '.tsx', '.d.ts'],
},
rules: {
'prettier/prettier': ['error', { singleQuote: true, jsxSingleQuote: true }],
'react/jsx-curly-brace-presence': ['error', 'never'],
'@typescript-eslint/no-var-requires': 0,
'no-console': 2,
'dot-notation': 0,
},
};