Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-formatter-comment

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-formatter-comment - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

LICENSE.txt

2

index.js

@@ -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.
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