-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc
37 lines (35 loc) · 1.27 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
{
// Use the AirBnB JS styleguide - /~https://github.com/airbnb/javascript
"extends": "airbnb",
// We use "babel-eslint" mainly for React Native Classes
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true,
"experimentalObjectRestSpread": true
}
},
// We can add/overwrite custom rules here
"rules": {
// React Native has JSX in JS files
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }],
"react/require-default-props": "off",
// React Native includes images via require("../images/example.png")
"global-require": "off",
// Hack see: /~https://github.com/facebookincubator/create-react-app/issues/2631
// and /~https://github.com/airbnb/javascript/pull/1482
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }],
// Turning these warnings off since for some reason vscode iss erroring when use the eslint-import-resolver-babel-module package
"import/no-unresolved": "off",
"import/extensions": "off"
},
"settings": {
"import/resolver": {
"babel-module": {}
}
}
}