eslint-plugin-yan
v1.0.5
Published
自定义eslint插件
Readme
eslint-plugin-encode
安装
除了本包,你需要同时安装 ESlint
pnpm install eslint-plugin-yan eslint -D使用
引入插件
// .eslintrc.js
module.exports = {
plugin: ['eslint-plugin-yan'],
rules: {
'eslint-plugin-yan/no-secret-info': 'error',
},
};使用 presets
// .eslintrc.js
module.exports = {
extends: 'plugin:eslint-plugin-yan/recommended',
};支持的规则
no-broad-semantic-versioning不要指定宽泛的版本范围no-http-url使用 HTTPS 协议头的 URL,而不是 HTTPno-js-in-ts-project不要在 TS 项目中使用 JSno-secret-info不要在代码中直接设置passwordtokenandsecret信息
