Package Exports
- eslint-plugin-eslint-comments
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-eslint-comments) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eslint-plugin-eslint-comments
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
- eslint-comments/disable-enable-pair requires a
eslint-enable
comment for everyeslint-disable
comment. - eslint-comments/no-duplicate-disable disallows duplicate
eslint-disable
comments. - eslint-comments/no-unlimited-disable disallows
eslint-disable
comments without rule names. - eslint-comments/no-unused-disable disallows unused
eslint-disable
comments. - eslint-comments/no-unused-enable disallows unused
eslint-enable
comments. - eslint-comments/no-use disallows ESLint directive-comments.
⚓ 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).
- A bug fix in a rule that results in
- 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.
- A bug fix in a rule that results in
- 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 ofnpm test
command.npm run clean
removes the coverage result ofnpm test
command.