Turn off/on eslinting for all javascript files in a folder (including subfolders)
Sometimes when working with large legacy applications, you want to enable new lint rules gradually through the project. Instead of turning off eslint for whole folders using ignorePatterns
I find it useful to exclude each file indvidualy. That makes it easier to later turn on and fixing linting in these files one by one.
This tool will exclude linting on files by adding a exclusion rule for that file.
- eslint
- yarn/npm
yarn add --dev lint-control
From your project root run these command to turn eslinting on/off for files in a folder including all subfolders
yarn lint-control --disable ${FOLDER_NAME}
yarn lint-control --enable ${FOLDER_NAME}
Disabling eslint for all files under src/views/
yarn lint-control --disable src/views/
Logo made by Adioma https://adioma.com/