This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
.eslintrc.js
80 lines (79 loc) · 2.25 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
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
const OFF = 0;
const WARNING = 1;
const ERROR = 2;
module.exports = {
env: {
browser: true,
es6: true,
node: true,
jest: true,
jasmine: true
},
root: true, // stop ESLint from looking for a configuration file in parent folders
parser: "babel-eslint",
parserOptions: {
sourceType: "module",
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true
}
},
plugins: ["detox", "react-native"],
extends: [
"@adeira/eslint-config"
],
rules: {
'relay/generated-flow-types': WARNING, // TODO: Activate
curly: ERROR,
"no-console": [ERROR, { allow: ["warn", "error"] }],
"no-restricted-imports": [
ERROR,
{
patterns: ["moment"], // DateFormatter
paths: [
{
name: "react-native",
importNames: [
"Button", // Button
"LayoutAnimation", // LayoutAnimation
"StyleSheet", // StyleSheet
"Text", // Text
"TouchableHighlight", // Touchable
"TouchableNativeFeedback", // Touchable
"TouchableOpacity", // Touchable
"TouchableWithoutFeedback", // TouchableWithoutFeedback
"Switch", //Switch
"Alert", // Alert (localization)
"TextInput",
"Modal",
"WebView"
],
message: "Please use '@kiwicom/mobile-shared' package instead."
},
{
name: "@kiwicom/orbit-design-tokens",
importNames: ["defaultTokens"],
message: "Please use '@kiwicom/mobile-orbit' package instead."
},
{
name: "react-native-read-more-text", // ReadMore
message: "Please use '@kiwicom/mobile-shared' package instead."
},
{
name: "react-navigation",
importNames: [
"StackNavigator", // StackNavigator
"withNavigation"
],
message: "Please use '@kiwicom/mobile-navigation' package instead."
},
{
name: "react-relay",
message: "Please use '@kiwicom/mobile-relay' package instead."
}
]
}
],
"react-native/no-unused-styles": ERROR
}
};