forked from BetterTyped/react-zoom-pan-pinch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
52 lines (52 loc) · 1.77 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
{
"globals": {
"window": "writable",
"document": "writable",
"localStorage": "writable",
"fetch": "readonly",
"FormData": "readonly",
"FileReader": "readonly",
"Headers": "readonly",
"navigator": "readonly",
"it": "readonly",
"test": "readonly",
"beforeEach": "readonly",
"describe": "readonly",
"expect": "readonly",
"cy": "readonly",
"should": "readonly",
"ReactNode": "readonly"
},
"extends": ["airbnb", "prettier"],
"plugins": ["prettier", "react", "jsx-a11y", "import"],
"rules": {
"react/jsx-filename-extension": [
1,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
],
"prettier/prettier": ["error"],
"import/prefer-default-export": "off", // disabled because we don't want default exports in utils files etc.
"import/no-unresolved": "off", // disabled to allow absolute path imports
"prefer-template": "off", // disable because it is not necessary and valuable
"react/jsx-wrap-multilines": 0, // disabled because it's made automatically with prettier
"no-use-before-define": ["error", { "functions": false }], // disabled for making more structured components
"no-param-reassign": ["error", { "props": false }], // disabled to allow using draft, previous state props
"no-console": ["error", { "allow": ["warn", "error"] }], // warn and error logs are allowed for debug purposes
"jsx-a11y/label-has-for": [
"error",
{
"required": {
"every": ["id"]
}
}
], // require only passing htmlFor to the label, nesting is an option
"import/no-extraneous-dependencies": 0 // allow dev dependencies
},
"parser": "babel-eslint",
"overrides": [
{
"files": ["*test.js", "*test.jsx", "utils.jsx"],
"rules": {}
}
]
}