no-eslint-disable
v0.1.2
Published
A 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 `exclude` argument to ignore occurrences in specific glob patterns.
Downloads
910
Readme
no-eslint-disable
A 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 exclude
argument to ignore occurrences in specific glob patterns.
Great for keeping your code clean and free of "disable" comments; discourages deviations from your ESLint configuration.
Installation
You may not need to install it as a dependency (see "Usage" below), but if you do:
npm
npm install --save-dev no-eslint-disable
yarn
yarn add -D no-eslint-disable
Usage
npx no-eslint-disable <dir> [--exclude=glob]
minimatch is used for glob patterns.
Examples
Checking your src
directory, 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 src
in a pull request check, or in your CI/CD tool, without adding this package as a dependency.
License
MIT - see LICENSE