forked from Shopify/polaris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
109 lines (109 loc) · 3 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"extends": [
"plugin:shopify/typescript",
"plugin:shopify/react",
"plugin:shopify/jest",
"plugin:shopify/node",
"plugin:shopify/polaris",
"plugin:shopify/prettier"
],
"settings": {
"react": {
"version": "16.8"
}
},
"rules": {
"func-style": "off",
"no-process-env": "off",
"no-warning-comments": "off",
"no-negated-condition": "off",
"no-console": "error",
"consistent-return": "off",
"match-default-export-name": "off",
"jsx-use-translation-function": "off",
"lines-around-comment": [
"error",
{
"beforeBlockComment": false,
"allowBlockStart": false
}
],
"babel/no-unused-expressions": "off",
"import/named": "off",
"import/no-default-export": ["error"],
"react/button-has-type": "off",
"react/no-array-index-key": "off",
"react/jsx-fragments": ["error", "element"],
"react/no-unsafe": ["error", {"checkAliases": true}],
"shopify/jsx-no-complex-expressions": "off",
"shopify/jsx-prefer-fragment-wrappers": "off",
"shopify/no-ancestor-directory-import": "error",
"shopify/react-prefer-private-members": "off",
"jsx-a11y/label-has-for": [
2,
{
"required": {
"some": ["nesting", "id"]
},
"allowChildren": false
}
],
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/anchor-has-content": "off",
"jsx-a11y/control-has-associated-label": "off",
"jsx-a11y/role-supports-aria-props": "off",
"jsx-a11y/mouse-events-have-key-events": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "test-utilities/legacy",
"message": "Please import the modern testing library from 'test-utilities' instead"
}
]
}
]
},
"overrides": [
{
"files": ["src/**/*.{ts,tsx}"],
"extends": ["plugin:shopify/typescript-type-checking"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"@typescript-eslint/prefer-readonly": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/unbound-method": "off"
}
},
{
"files": ["**/*.test.{ts,tsx}"],
"rules": {
"jest/no-truthy-falsy": "off",
"shopify/no-ancestor-directory-import": "off"
}
},
{
"files": ["examples/**/*.js"],
"rules": {
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
"react/prop-types": "off",
"shopify/jsx-no-hardcoded-content": "off"
}
},
{
"files": ["playground/Playground.tsx"],
"rules": {
"react/prefer-stateless-function": "off",
"shopify/jsx-no-hardcoded-content": "off",
"shopify/react-initialize-state": "off"
}
}
]
}