https://github.com/atqq/eslint-plugin-comments-key
检查注释中是否包含指定关键词的插件
https://github.com/atqq/eslint-plugin-comments-key
Last synced: about 1 month ago
JSON representation
检查注释中是否包含指定关键词的插件
- Host: GitHub
- URL: https://github.com/atqq/eslint-plugin-comments-key
- Owner: ATQQ
- License: mit
- Created: 2020-05-20T07:25:22.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T19:17:32.000Z (about 2 years ago)
- Last Synced: 2025-04-10T01:07:50.240Z (about 1 month ago)
- Language: JavaScript
- Size: 49.8 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-plugin-comments-key
检查注释中是否包含指定关键词的插件
## Installation
You'll first need to install [ESLint](http://eslint.org):
```
$ npm i eslint --save-dev
```Next, install `eslint-plugin-comments-key`:
```
$ npm install eslint-plugin-comments-key --save-dev
```**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-comments-key` globally.
## Usage
Add `comments-key` to the plugins section of your `.eslintrc` configuration file or `package.json`. You can omit the `eslint-plugin-` prefix:
`package.json` demo
```json
"eslintConfig": {
"plugins": [
"comments-key"
],
"rules": {
"comments-key/diy":[1,{
"wordKeys":["fixme","xxx"]
}]
}
}
```After the configuration is complete, you can see the prompts when coding and building