Always tscheck, ignore eslint in prod
This commit is contained in:
parent
0d35ab95fd
commit
85dcfd4cf5
2 changed files with 8 additions and 5 deletions
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue