forked from react-native-community/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
44 lines (43 loc) · 890 Bytes
/
.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
const prettierConfig = require('./.prettierrc');
module.exports = {
extends: ['@react-native-community', 'plugin:import/errors'],
env: {
node: true,
},
rules: {
'prettier/prettier': [2],
},
// @todo: remove once we cover whole codebase with types
plugins: ['import'],
settings: {
react: {
version: 'latest',
},
'import/resolver': {
alias: {
map: [['types', './types/index.js']],
},
// Use <rootDir>/tsconfig.json for typescript resolution
typescript: {},
},
},
overrides: [
{
files: [
'**/__mocks__/**',
'**/__fixtures__/**',
'**/__e2e__/**',
'jest/**',
],
env: {
jest: true,
},
},
{
files: ['*.ts', '**/*.ts'],
rules: {
'prettier/prettier': [2, {prettierConfig, parser: 'typescript'}],
},
},
],
};