This repository has been archived by the owner on Aug 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
66 lines (60 loc) · 1.59 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
const OFF = 0;
const WARN = 1;
const ERROR = 2;
module.exports = {
root: true, // stop ESLint from looking for a configuration file in parent folders
extends: ['@kiwicom/eslint-config'],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
experimentalObjectRestSpread: true,
},
},
env: {
es6: true,
jest: true,
node: true,
},
// set each global variable name equal to true to allow the variable to be overwritten or
// false to disallow overwriting
globals: {
fetch: false, // already by default in RN
FormData: false, // already by default in RN
__DEV__: false, // already by default in RN
},
rules: {
// I am experimenting with new way how to import stuff which requires to access things
// from workspaces deeply.
'monorepo/no-internal-import': OFF,
// Styles in this repository are slightly different from `@kiwicom/eslint-config`
'prettier/prettier': [
ERROR,
{
singleQuote: true,
trailingComma: 'all',
jsxBracketSameLine: false,
},
],
'no-restricted-imports': [
ERROR,
{
paths: [
{
name: 'react-native',
importNames: [
'Dimensions', // Dimensions
'Text', // Text
'TouchableOpacity', // Touchable
'TouchableNativeFeedback', // Touchable
'StyleSheet', // StyleSheet
],
message: "Please use '_shared' package instead.",
},
],
},
],
},
};