-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
86 lines (72 loc) · 2.41 KB
/
.eslintrc
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"useJSXTextNode": true,
// "project": "./tsconfig.json", // https://github.com/typescript-eslint/typescript-eslint/issues/389
"tsconfigRootDir": "."
},
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true,
"jasmine": true
},
"globals": {
"fetch": false
},
"plugins": [
"@typescript-eslint",
"react",
"react-native",
"prettier"
],
"extends": [
"plugin:@typescript-eslint/recommended",
"airbnb",
"prettier",
"prettier/react"
],
"settings": {
"import/resolver": {
"reactnative": true,
"eslint-import-resolver-typescript": true
},
"react": {
// https://github.com/yannickcr/eslint-plugin-react/issues/1751
"pragma": "React",
"version": "16.4"
}
},
"rules": {
// Display all prettier errors
"prettier/prettier": "error",
// Allow camelcase
"camelcase": 0,
// Disable a few @typescript-eslint/recommended rules that may not make sense for us
"@typescript-eslint/indent": 0,
"@typescript-eslint/no-unused-vars": [2, { "args": "none" }],
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/camelcase": 0,
// https://github.com/airbnb/javascript/issues/1875
"react/no-did-update-set-state": 0,
// These rules should be turned on but would require too much refactor now
"react/prop-types": ["error", { "ignore": ["navigation", "style"]}],
"react/destructuring-assignment": 0,
"react/require-default-props": 0,
// Allow creation of style object at end of file
"no-use-before-define": 0,
// Configuration rules
"no-restricted-imports": ["error", { "patterns": ["../*"] }], // Disallow relative paths
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".tsx"] }], // Use JSX inside .js files
"import/no-extraneous-dependencies": ["error", {"packageDir": "./"}], // https://github.com/benmosher/eslint-plugin-import/issues/458
},
}