node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

eslint-plugin-eslint-comments

eslint-plugin-eslint-comments

npm version Downloads/month Build Status codecov Dependency Status

Additional ESLint rules for ESLint's directive-comments (e.g. //eslint-disable-line).

💿 Installation

npm install --save-dev eslint eslint-plugin-eslint-comments

Requirements

  • Node.js ^4.0.0, ^6.0.0, or newer.
  • ESLint ^3.1.0, or newer.

📖 Usage

Write in your ESLint configurations: http://eslint.org/docs/user-guide/configuring#using-the-configuration-from-a-plugin

Example

.eslintrc.json

{
    "plugins": [
        "eslint-comments"
    ],
    "rules": {
        "eslint-comments/disable-enable-pair": "error",
        "eslint-comments/no-duplicate-disable": "error",
        "eslint-comments/no-unlimited-disable": "error",
        "eslint-comments/no-unused-disable": "error",
        "eslint-comments/no-unused-enable": "error",
        "eslint-comments/no-use": "error",
    }
}

Rules

⚓️ Semantic Versioning Policy

eslint-plugin-eslint-comments follows semantic versioning and ESLint's Semantic Versioning Policy.

  • Patch release (intended to not break your lint build)
    • A bug fix in a rule that results in eslint-plugin-eslint-comments reporting fewer errors.
    • Improvements to documentation.
    • Non-user-facing changes such as refactoring code, adding, deleting, or modifying tests, and increasing test coverage.
    • Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone).
  • Minor release (might break your lint build)
    • A bug fix in a rule that results in eslint-plugin-eslint-comments reporting more errors.
    • A new rule is created.
    • A new option to an existing rule is created.
    • An existing rule is deprecated.
  • Major release (likely to break your lint build)
    • A support for old Node version is dropped.
    • A support for old ESLint version is dropped.
    • An existing rule is removed.
    • An existing option of a rule is removed.
    • An existing config is updated.

📰 Changelog

💪 Contributing

Welcome contributing!

Please use GitHub's Issues/PRs.

Development Tools

  • npm test runs tests and measures coverage.
  • npm run watch runs tests and measures coverage when source code are changed.
  • npm run coverage shows the coverage result of npm test command.
  • npm run clean removes the coverage result of npm test command.