no-eslint-disableA simple CLI that checks for the existence of "eslint" in a project. If found, it fails and lists all occurrences. In most occurrences, these are likely eslint disable comments. Use the
excludeargument to ignore occurrences in specific glob patterns.
Great for keeping your code clean and free of "disable" comments; discourages deviations from your ESLint configuration.
InstallationYou may not need to install it as a dependency (see "Usage" below), but if you do:
npm install --save-dev no-eslint-disable
yarn add -D no-eslint-disable
npx no-eslint-disable <dir> [--exclude=glob]
minimatch is used for glob patterns.
srcdirectory, excluding JS config files:
npx no-eslint-disable src --exclude="*.config.js"
Why not an ESLint plugin?It already exists (there may also be others), and...
Having a separate CLI tool enables you, for example, to run
npx no-eslint-disable srcin a pull request check, or in your CI/CD tool, without adding this package as a dependency.
LicenseMIT - see LICENSE