From d620855bd2b6ade36ec1cf0110b0032858b34ef0 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 20 Jan 2022 10:52:30 +0100 Subject: [PATCH] chore: fixing up the config Signed-off-by: blam --- packages/cli/src/lib/bundler/config.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts index 6a73627d1d..f2f4eb3de9 100644 --- a/packages/cli/src/lib/bundler/config.ts +++ b/packages/cli/src/lib/bundler/config.ts @@ -34,6 +34,7 @@ import { BundlingOptions, BackendBundlingOptions } from './types'; import { version } from '../../lib/version'; import { paths as cliPaths } from '../../lib/paths'; import { runPlain } from '../run'; +import ESLintPlugin from 'eslint-webpack-plugin'; import pickBy from 'lodash/pickBy'; export function resolveBaseUrl(config: Config): URL { @@ -89,12 +90,14 @@ export async function createConfig( const baseUrl = frontendConfig.getString('app.baseUrl'); const validBaseUrl = new URL(baseUrl); - if (checksEnabled) { plugins.push( new ForkTsCheckerWebpackPlugin({ typescript: { configFile: paths.targetTsConfig }, }), + new ESLintPlugin({ + files: ['**', '!**/__tests__/**', '!**/?(*.)(spec|test).*'], + }), ); } @@ -342,6 +345,9 @@ export async function createBackendConfig( new ForkTsCheckerWebpackPlugin({ typescript: { configFile: paths.targetTsConfig }, }), + new ESLintPlugin({ + files: ['**', '!**/__tests__/**', '!**/?(*.)(spec|test).*'], + }), ] : []), ],