Socket
Socket
Sign inDemoInstall

@eslint-community/eslint-plugin-eslint-comments

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eslint-community/eslint-plugin-eslint-comments

Additional ESLint rules for ESLint directive comments.


Version published
Weekly downloads
220K
decreased by-12.34%
Maintainers
2
Weekly downloads
 
Created

What is @eslint-community/eslint-plugin-eslint-comments?

@eslint-community/eslint-plugin-eslint-comments is an ESLint plugin that provides rules for managing ESLint directive comments (e.g., `// eslint-disable`, `// eslint-enable`, `// eslint-disable-next-line`). It helps ensure that these comments are used correctly and consistently throughout your codebase.

What are @eslint-community/eslint-plugin-eslint-comments's main functionalities?

Disallow unused eslint-disable comments

This feature ensures that `eslint-disable` comments are not left in the code if they are not actually disabling any rules. It helps keep the code clean and free of unnecessary comments.

/* eslint-disable no-unused-vars */
// eslint-disable-next-line no-console
console.log('Hello, world!');
/* eslint-enable no-unused-vars */

Require eslint-enable comments

This feature enforces that every `eslint-disable` comment is followed by a corresponding `eslint-enable` comment, ensuring that rules are only disabled for specific sections of code and not indefinitely.

/* eslint-disable no-console */
console.log('Hello, world!');
/* eslint-enable no-console */

Disallow eslint-disable comments without description

This feature requires that `eslint-disable` comments include a description explaining why the rule is being disabled. This helps provide context and justification for disabling rules, making the code more maintainable.

/* eslint-disable no-console -- needed for debugging */
console.log('Hello, world!');
/* eslint-enable no-console */

Other packages similar to @eslint-community/eslint-plugin-eslint-comments

Keywords

FAQs

Package last updated on 08 Apr 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc