-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
84 lines (83 loc) · 2.11 KB
/
index.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
81
82
83
84
const OFF = 0
const WARNING = 1
const ERROR = 2
module.exports = {
env: {
jest: true,
},
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "import"],
extends: [
"prettier",
"standard",
"@react-native",
"eslint:recommended",
"eslint-config-prettier",
"plugin:react/recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
"no-shadow": OFF,
"no-duplicate-imports": ERROR,
"react/jsx-boolean-value": ERROR,
"jest/no-disabled-tests": WARNING,
"@typescript-eslint/no-shadow": ERROR,
"react-native/no-unused-styles": ERROR,
"react/jsx-curly-brace-presence": ERROR,
"react/jsx-max-depth": [ERROR, { max: 5 }],
"react/jsx-pascal-case": [ERROR, { allowAllCaps: false }],
"react/jsx-no-duplicate-props": [ERROR, { ignoreCase: true }],
"react/jsx-one-expression-per-line": [ERROR, { allow: "single-child" }],
"react/jsx-filename-extension": [ERROR, { extensions: [".js", ".tsx"] }],
"react/jsx-handler-names": [
ERROR,
{
eventHandlerPrefix: "on",
eventHandlerPropPrefix: "on",
},
],
"import/order": [
ERROR,
{
groups: ["builtin", "external", "internal"],
pathGroups: [
{
group: "external",
position: "before",
pattern: "@(react|react-native)",
},
],
pathGroupsExcludedImportTypes: ["internal"],
"newlines-between": "always",
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
"react/jsx-sort-props": [
ERROR,
{
ignoreCase: true,
callbacksLast: true,
reservedFirst: true,
shorthandFirst: true,
noSortAlphabetically: true,
},
],
"react/jsx-wrap-multilines": [
ERROR,
{
arrow: "parens",
return: "parens",
assignment: "parens",
declaration: "parens",
prop: "parens-new-line",
logical: "parens-new-line",
condition: "parens-new-line",
},
],
},
}