no-eslint-disable
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i no-eslint-disable

Weekly Downloads

159

Version

0.1.2

License

MIT

Unpacked Size

36 kB

Total Files

21

Last publish

Collaborators

  • andyasberry