Skip to content

Commit

Permalink
build(dev,proxy,prod): ent-3643 eslint webpack plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Aug 10, 2021
1 parent 2c88bb6 commit edbb1cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions config/build.plugins.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { join, resolve } = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
const ESLintPlugin = require('eslint-webpack-plugin');
const fedModulePlugin = require('@redhat-cloud-services/frontend-components-config/federated-modules');
const { setupWebpackDotenvFilesForEnv } = require('./build.dotenv');

Expand All @@ -25,6 +26,9 @@ const setCommonPlugins = () => {

const plugins = [
...setupWebpackDotenvFilesForEnv({ directory: RELATIVE_DIRNAME, env: DOTENV_ENV }),
new ESLintPlugin({
lintDirtyModulesOnly: NODE_ENV !== 'production'
}),
new CopyPlugin({
patterns: [{ from: join(STATIC_DIR, 'locales'), to: join(DIST_DIR, 'locales'), noErrorOnMissing: true }]
}),
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"dev:chrome": "bash ./scripts/dev.chrome.sh -b prod-stable",
"release": "standard-version",
"start": "run-p -l api:dev start:js",
"start:js": "export NODE_ENV=development; webpack serve --config config/webpack.dev.config.js",
"start:js-proxy": "export NODE_ENV=development; webpack serve --config config/webpack.proxy.config.js",
"start:js": "export NODE_ENV=development; webpack serve --color --config config/webpack.dev.config.js",
"start:js-proxy": "export NODE_ENV=development; webpack serve --color --config config/webpack.proxy.config.js",
"start:proxy": "run-s -l api:proxy-hosts start:js-proxy",
"test": "run-s test:spell* test:lint test:ci",
"test:ci": "export CI=true; jest ./src --coverage",
Expand All @@ -82,7 +82,7 @@
"@patternfly/react-styles": "4.11.0",
"@patternfly/react-table": "4.29.0",
"@patternfly/react-tokens": "4.12.0",
"@redhat-cloud-services/frontend-components": "3.3.4",
"@redhat-cloud-services/frontend-components": "3.3.9",
"@redhat-cloud-services/frontend-components-notifications": "3.2.2",
"@redhat-cloud-services/frontend-components-utilities": "3.2.3",
"axios": "^0.21.1",
Expand Down Expand Up @@ -139,6 +139,7 @@
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-webpack-plugin": "^3.0.1",
"express": "^4.17.1",
"glob": "^7.1.7",
"jest": "26.6.0",
Expand Down

0 comments on commit edbb1cc

Please sign in to comment.