summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <lacerda.filipa@gmail.com>2017-02-14 17:58:09 +0000
committerFilipa Lacerda <lacerda.filipa@gmail.com>2017-02-14 17:58:09 +0000
commit10a063e945b38e87f7a7d463d9d3a5dcd8ea736f (patch)
tree72999bb086b2f3de93ab011627494cff8fcd7d56
parent059f47b6ba09ae1a6b1dbfc2debf82064d8793fc (diff)
parent34b8cdf87ce8e36e5f442bf7068869833f35243b (diff)
downloadgitlab-ce-10a063e945b38e87f7a7d463d9d3a5dcd8ea736f.tar.gz
Merge branch 'eslint-resolve-webpack-modules' into 'master'
Enable eslint to resolve webpack modules according to webpack.config.js See merge request !9218
-rw-r--r--.eslintrc14
-rw-r--r--package.json1
2 files changed, 11 insertions, 4 deletions
diff --git a/.eslintrc b/.eslintrc
index 1a2cd821af7..0fcd866778f 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -12,12 +12,18 @@
"localStorage": false
},
"plugins": [
- "filenames"
+ "filenames",
+ "import"
],
+ "settings": {
+ "import/resolver": {
+ "webpack": {
+ "config": "./config/webpack.config.js"
+ }
+ }
+ },
"rules": {
"filenames/match-regex": [2, "^[a-z0-9_]+(.js)?$"],
- "no-multiple-empty-lines": ["error", { "max": 1 }],
- "import/no-extraneous-dependencies": "off",
- "import/no-unresolved": "off"
+ "no-multiple-empty-lines": ["error", { "max": 1 }]
}
}
diff --git a/package.json b/package.json
index e36925aa4f2..3e36bf1c2bd 100644
--- a/package.json
+++ b/package.json
@@ -39,6 +39,7 @@
"devDependencies": {
"eslint": "^3.10.1",
"eslint-config-airbnb-base": "^10.0.1",
+ "eslint-import-resolver-webpack": "^0.8.1",
"eslint-plugin-filenames": "^1.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jasmine": "^2.1.0",