I have a React - Typescript created with:
create-react-app my-app --scripts-version=react-scripts-ts
It compiles fine, but every time I see this message or warning:
No valid rules have been specified for JavaScript files
Any ideas how to get rid of it?
> react-scripts-ts build
Creating an optimized production build...
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
ts-loader: Using [email protected] and /Users/julian/my-app/tsconfig.json
No valid rules have been specified for JavaScript files
Compiled successfully.
My tscongif.json and tslint.json files can be found here: https://gist.github.com/JulianG/be82d9fa20f48f60ce10371fa5095230
After reading https://github.com/palantir/tslint/issues/3735#issuecomment-383115457 I found the following:
Because my tsconfig.json
contained "allowJs": true
, a jsRules
key was needed in my tslint.json
.
The solution was to simply add a rule to tslint.json
like this:
"jsRules": {
"no-empty": true
}
Thanks to @explosion-pills for point to the answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With