1.0.15 • Published 2 months ago

moises-eslint-plugin v1.0.15

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

moises-eslint-plugin

安装

除了本包,你需要同时安装 ESlint

$ npm install moises-eslint-plugin eslint --save-dev

使用

引入插件

// .eslintrc.js
module.exports = {
  plugin: ['moises-eslint-config'],
  rules: {
    'moises-eslint-plugin/no-secret-info': 'error',
  },
};

使用 presets

// .eslintrc.js
module.exports = {
  extends: 'moises-plugin:eslint-plugin/recommended',
};

支持的规则

  • no-broad-semantic-versioning 不要指定宽泛的版本范围
  • no-http-url 使用 HTTPS 协议头的 URL,而不是 HTTP
  • no-js-in-ts-project 不要在 TS 项目中使用 JS
  • no-secret-info 不要在代码中直接设置 password token and secret 信息
1.0.15

2 months ago