diff --git a/.gitignore b/.gitignore index 4864a639..54acbdde 100644 --- a/.gitignore +++ b/.gitignore @@ -159,5 +159,3 @@ packages/*/dist packages/*/buid packages/ui-toolkit/styleguide/ packages/*/package-lock.json - -/packages/ui-toolkit/styleguide/index.html diff --git a/packages/cp-frontend/.eslintrc b/packages/cp-frontend/.eslintrc index b17555dc..2b67b7bc 100644 --- a/packages/cp-frontend/.eslintrc +++ b/packages/cp-frontend/.eslintrc @@ -2,6 +2,8 @@ "extends": "joyent-portal", "rules": { "no-console": 0, - "new-cap": 0 + "new-cap": 0, + // temp + "no-undef": 1 } } diff --git a/packages/cp-frontend/scripts/patch-webpack-config.js b/packages/cp-frontend/scripts/patch-webpack-config.js index 63e2a445..cc38fa95 100644 --- a/packages/cp-frontend/scripts/patch-webpack-config.js +++ b/packages/cp-frontend/scripts/patch-webpack-config.js @@ -10,6 +10,29 @@ module.exports = config => { config.module.rules = config.module.rules .reduce((loaders, loader, index) => { + if (Array.isArray(loader.use)) { + return loaders.concat([ + Object.assign(loader, { + use: loader.use.map(l => { + if (isString(l) || !isString(l.loader)) { + return l; + } + + if (!l.loader.match(/eslint-loader/)) { + return l; + } + + return Object.assign(l, { + options: Object.assign(l.options, { + baseConfig: null, + useEslintrc: true + }) + }); + }) + }) + ]); + } + if (!isString(loader.loader)) { return loaders.concat([loader]); }