Skip to content

Commit

Permalink
Turn on jest env in test files only
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Aug 10, 2020
1 parent 93ebf28 commit b879e41
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .eslintrc.json
Expand Up @@ -2,15 +2,16 @@
"extends": "airbnb",
"env": {
"browser": true,
"es6": true,
"jest": true
"es6": true
},
"parser": "babel-eslint",
"rules": {
"arrow-parens": ["error", "as-needed", {
"requireForBlockBody": true
}],
"jsx-a11y/label-has-associated-control": ["error", { "required": { "some": ["id", "nesting"] }}],
"no-param-reassign": ["error", { "props": true, "ignorePropertyModificationsFor": ["element"] }],
"no-restricted-globals": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-sort-props": ["error", {
"reservedFirst": ["key"]
Expand All @@ -20,6 +21,16 @@
"react/state-in-constructor": ["error", "never"]
},
"overrides": [
{
"files": [
"**/*.spec.js",
"**/*.spec.jsx",
"**/__tests__/*"
],
"env": {
"jest": true
}
},
{
"files": [
"sample/**",
Expand Down

0 comments on commit b879e41

Please sign in to comment.