eslint-formatter-comment
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -44,3 +44,3 @@ // This is a slightly modified variant of the compact formatter | ||
output += " - " + message.message; | ||
output += message.ruleId ? " /* eslint " + message.ruleId + ":0 */" : ""; | ||
output += message.ruleId ? " // eslint-disable-line " + message.ruleId : ""; | ||
output += "\n"; | ||
@@ -47,0 +47,0 @@ }); |
{ | ||
"name": "eslint-formatter-comment", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Compact formatter for ESLint errors including a JavaScript comment to disable the rule", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,16 +6,18 @@ # eslint comment formatter | ||
- filename with line and column appended with colons as many editor CLIs will accept this as a command line argument and place the cursor exactly on the error using this information | ||
- Allows copy/pasting of a complete JavaScript comment to disable this rule in a specific location. Note that some rules have configuration more complicated that just on or off, but at the moment this formatter always just outputs ":0" to disable. Pull requests welcome to make this specific to each rule. | ||
- Allows copy/pasting of a complete JavaScript comment to disable this rule in a specific location. | ||
Note this is a copy and tweak job from the built-in "compact" eslint formatter. | ||
# Example Output | ||
## Example Output | ||
``` | ||
app/entries/operations/index.js:6:15 Error - Missing semicolon. /* eslint semi:0 */ | ||
app/entries/operations/index.js:6:10 Error - Strings must use doublequote. /* eslint quotes:0 */ | ||
app/entries/operations/index.js:6:4 Error - foo is defined but never used /* eslint no-unused-vars:0 */ | ||
app/entries/operations/index.js:1:26 Error - Strings must use singlequote. // eslint-disable-line quotes | ||
app/entries/operations/index.js:2:38 Error - Extra semicolon. // eslint-disable-line semi | ||
app/entries/operations/index.js:3:5 Error - foo is defined but never used // eslint-disable-line no-unused-vars | ||
app/entries/operations/index.js:3:9 Error - Extra semicolon. // eslint-disable-line semi | ||
``` | ||
#License | ||
# License | ||
This formatter is MIT licensed. The [ESLint License](./ESLint.license) is included with this repository as well. | ||
This formatter is [MIT licensed](./LICENSE.txt). The [ESLint License](./ESLint.license) is included with this repository as well. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5322
5
23