Skip to content

Commit

Permalink
Add eslint rule to disallow importing devDependencies in lib sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi authored and diasbruno committed Apr 13, 2018
1 parent 4887c69 commit 2132488
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ module.exports = {
"pragma": "React",
"version": "15.0"
},
"propWrapperFunctions": [ "forbidExtraProps" ]
"propWrapperFunctions": [ "forbidExtraProps" ],
"import/resolver": "webpack"
},

"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:import/recommended", "prettier"],

"plugins": ["prettier"],

Expand All @@ -45,6 +46,10 @@ module.exports = {
"prettier/prettier": "error",
"react/no-find-dom-node": [0],
"react/jsx-closing-bracket-location": [0],
"react/require-default-props": 0
"react/require-default-props": 0,
"import/no-extraneous-dependencies": [2, {
"devDependencies": ["specs/**"]
}]
}

}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"cross-env": "^5.0.1",
"eslint": "^4.8.0",
"eslint-config-prettier": "^2.6.0",
"eslint-import-resolver-webpack": "^0.9.0",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.4.0",
Expand Down

0 comments on commit 2132488

Please sign in to comment.