Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force a compilation and ignore @typescript-eslint errors?

I'm currently working on a React project, initiated with Create React App. Currently, to compile, I am using the default command npm run start which runs react-scripts start.

I have a bunch of @typescript-eslint rules that force me to have a clean code before delivering it and deploy it. However, while I'm developing, I may have some unused variables and still want to compile to see if something else works.

Is there a command to force the compilation, while ignoring some or all @typescript-eslint rules?

like image 591
Thanh-Quy Nguyen Avatar asked Jan 25 '26 01:01

Thanh-Quy Nguyen


1 Answers

This is a CRA configuration that can be overwritten. In an .env file, you can add these variables

TSC_COMPILE_ON_ERROR=true
ESLINT_NO_DEV_ERRORS=true

Here is the full list https://create-react-app.dev/docs/advanced-configuration/

like image 91
Andrew Avatar answered Jan 26 '26 14:01

Andrew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!