eslint-plugin-woke icon indicating copy to clipboard operation
eslint-plugin-woke copied to clipboard

Support comments

Open ariesclark opened this issue 2 years ago • 2 comments

This plugin doesn't support comment contents, can we add another rule or add it to the existing one?

ariesclark avatar Apr 12 '22 07:04 ariesclark

Comments should be supported already. https://github.com/amwmedia/eslint-plugin-woke/blob/master/lib/index.js#L95-L105

amwmedia avatar Apr 12 '22 12:04 amwmedia

Not all comments seem to get recognized.

Reproducible example:

.eslintrc.json

{
  "plugins": ["woke"],
  "rules": {
    "woke/all": "error"
  }
}

index.js

// Comment #1

// his

package.json

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "lint": "eslint .",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "eslint": "8.14.0",
    "eslint-plugin-woke": "1.0.1"
  }
}

Result: No error

$ pnpm run lint

> [email protected] lint /home/dev/projects/test
> eslint .

christoph-pflueger avatar Apr 25 '22 18:04 christoph-pflueger