0.1.0 • Published 3 years ago
eslint-plugin-zerod v0.1.0
eslint-plugin-zerod
安装
除了本包,你需要同时安装 ESlint
$ npm install eslint-plugin-zerod eslint --save-dev
使用
引入插件
// .eslintrc.js
module.exports = {
plugin: ["zerod"],
rules: {
"zerod/no-secret-info": "error"
}
}
使用 presets
// .eslintrc.js
module.exports = {
// 包含通用规则
// https://github.com/zerodbaba/f2e-spec/tree/main/packages/eslint-plugin-zerod/src/configs/recommended.js
extends: "plugin:zerod/recommended"
}
支持的规则
no-broad-semantic-versioning
不要指定宽泛的版本范围no-http-url
使用 HTTPS 协议头的 URL,而不是 HTTPno-js-in-ts-project
不要在 TS 项目中使用 JSno-secret-info
不要在代码中直接设置password
token
andsecret
信息
0.1.0
3 years ago