How to disable linting during React Next.js Node.js application build

If your application is in the proof of concept phase, it works and you just want to build it, you can disable the linting process to have a successful build regardless of linting errors.

  • To disable TSLint for one line only, add the // @ts-ignore before the line.
  • To disable TSLint on the entire file add // @ts-nocheck as the first line of the file.
  • To disable ESLint during build add the DISABLE_ESLINT_PLUGIN=true environment variable to the .env file in your project root directory
  • To disable ESLint during Docker image build add the ARG DISABLE_ESLINT_PLUGIN=true to the Dockerfile

Leave a comment

Your email address will not be published. Required fields are marked *