From 85dcfd4cf571d45732bc580d7f845ddf5b62fc71 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 12 Jul 2020 10:43:37 -0700 Subject: [PATCH] Always tscheck, ignore eslint in prod --- resources/scripts/.eslintrc.yml | 9 ++++++--- webpack.config.js | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/scripts/.eslintrc.yml b/resources/scripts/.eslintrc.yml index 0b0d552f6..0e22c8f66 100644 --- a/resources/scripts/.eslintrc.yml +++ b/resources/scripts/.eslintrc.yml @@ -26,15 +26,18 @@ extends: - "plugin:react/recommended" - "plugin:@typescript-eslint/recommended" rules: + quotes: + - warn + - single indent: - - error + - warn - 4 - SwitchCase: 1 semi: - - error + - warn - always comma-dangle: - - error + - warn - always-multiline array-bracket-spacing: - warn diff --git a/webpack.config.js b/webpack.config.js index a4d533687..b1276732c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -76,11 +76,11 @@ module.exports = { plugins: [ new webpack.ContextReplacementPlugin(/brace[/\\](mode|worker)/, new RegExp(`^\.\/(${modes.join('|')})$`)), new AssetsManifestPlugin({ writeToDisk: true, publicPath: true, integrity: true, integrityHashes: ['sha384'] }), - !isProduction ? new ForkTsCheckerWebpackPlugin({ + new ForkTsCheckerWebpackPlugin(isProduction ? {} : { eslint: { files: `${path.join(__dirname, '/resources/scripts')}/**/*.{ts,tsx}`, }, - }) : null, + }), process.env.ANALYZE_BUNDLE ? new BundleAnalyzerPlugin({ analyzerHost: '0.0.0.0', analyzerPort: 8081,