Always tscheck, ignore eslint in prod

This commit is contained in:
Dane Everitt 2020-07-12 10:43:37 -07:00
parent 0d35ab95fd
commit 85dcfd4cf5
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 8 additions and 5 deletions

View file

@ -26,15 +26,18 @@ extends:
- "plugin:react/recommended" - "plugin:react/recommended"
- "plugin:@typescript-eslint/recommended" - "plugin:@typescript-eslint/recommended"
rules: rules:
quotes:
- warn
- single
indent: indent:
- error - warn
- 4 - 4
- SwitchCase: 1 - SwitchCase: 1
semi: semi:
- error - warn
- always - always
comma-dangle: comma-dangle:
- error - warn
- always-multiline - always-multiline
array-bracket-spacing: array-bracket-spacing:
- warn - warn

View file

@ -76,11 +76,11 @@ module.exports = {
plugins: [ plugins: [
new webpack.ContextReplacementPlugin(/brace[/\\](mode|worker)/, new RegExp(`^\.\/(${modes.join('|')})$`)), new webpack.ContextReplacementPlugin(/brace[/\\](mode|worker)/, new RegExp(`^\.\/(${modes.join('|')})$`)),
new AssetsManifestPlugin({ writeToDisk: true, publicPath: true, integrity: true, integrityHashes: ['sha384'] }), new AssetsManifestPlugin({ writeToDisk: true, publicPath: true, integrity: true, integrityHashes: ['sha384'] }),
!isProduction ? new ForkTsCheckerWebpackPlugin({ new ForkTsCheckerWebpackPlugin(isProduction ? {} : {
eslint: { eslint: {
files: `${path.join(__dirname, '/resources/scripts')}/**/*.{ts,tsx}`, files: `${path.join(__dirname, '/resources/scripts')}/**/*.{ts,tsx}`,
}, },
}) : null, }),
process.env.ANALYZE_BUNDLE ? new BundleAnalyzerPlugin({ process.env.ANALYZE_BUNDLE ? new BundleAnalyzerPlugin({
analyzerHost: '0.0.0.0', analyzerHost: '0.0.0.0',
analyzerPort: 8081, analyzerPort: 8081,