0.0.4 • Published 3 years ago
eslint-plugin-pluginjscodecommentcheck
Licence
ISC
Version
0.0.4
Deps
1
Size
25 kB
Vulns
0
Weekly
0
eslint-plugin-pluginjscodecommentcheck
js代码注释检测工具(ts兼容)
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-pluginjscodecommentcheck:
npm install eslint-plugin-pluginjscodecommentcheck --save-dev
Usage
Add pluginjscodecommentcheck to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"pluginjscodecommentcheck"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"pluginjscodecommentcheck/rule-name": 2
}
}
Supported Rules
- rulejscodecommentcheck
- class-declaration
- export-declaration
- function-declaration
- tsenum-declaration
- tsinterface-declaration
注意
默认针对js文件生效,如需其他文件,需要在.vscode下的settings.json文件里面增加如下配置: { "eslint.validate": [ "javascript", "javascriptreact", "typescriptreact", "typescript" ] }
如需对ts兼容需要对项目安装@typescript-eslint/parser,(项目根目录执行:npm add @typescript-eslint/parser) 并在.eslintrc.js文件中添加配置:"parser": "@typescript-eslint/parser"