🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

no-eslint-disable

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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.

0.1.2
latest
npm
Version published
Weekly downloads
256
0.39%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 16 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts