如何防止 CreateReactApp 编译因 lint 错误而停止?
how can I prevent CreateReactApp compilation from stopping on lint errors?
尽管来自 TSLint 或 ESLint 的警告,我如何允许 createReactApp 编译?
例如,编译会在[tslint] block is empty (no-empty)
停止,这很烦人。
我希望显示警告但不阻止编译。
我怎样才能做到这一点?
您应该能够调整您的 tslint.json
文件以将 tslint
问题显示为警告而不是错误,这应该允许您的代码编译。
https://github.com/wmonk/create-react-app-typescript/issues/238#issuecomment-360142264
Indeed - the plugin we're using for tslint refers to the severity defined configuration file (i.e. tslint.json). If there is no severity defined, everything will fire up on error level.
It should be possible to use the warning level by adding "defaultSeverity": "warning" to the tslint.json in the generated project's root directory. Can you give this a try?
尽管来自 TSLint 或 ESLint 的警告,我如何允许 createReactApp 编译?
例如,编译会在[tslint] block is empty (no-empty)
停止,这很烦人。
我希望显示警告但不阻止编译。
我怎样才能做到这一点?
您应该能够调整您的 tslint.json
文件以将 tslint
问题显示为警告而不是错误,这应该允许您的代码编译。
https://github.com/wmonk/create-react-app-typescript/issues/238#issuecomment-360142264
Indeed - the plugin we're using for tslint refers to the severity defined configuration file (i.e. tslint.json). If there is no severity defined, everything will fire up on error level.
It should be possible to use the warning level by adding "defaultSeverity": "warning" to the tslint.json in the generated project's root directory. Can you give this a try?