0.0.2 • Published 4 years ago

eslint-plugin-oneos v0.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

eslint-plugin-oneos

OneOS 平台组定制 ESlint rule

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-oneos:

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

Usage

Add oneos to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["oneos"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "oneos/no-hardcoded-url-param": 2,
    "oneos/no-ip-string": 1
  }
}

Supported Rules

  • no-hardcoded-url-param 禁止包含 ip 地址的字符串作为函数参数传入
  • no-ip-string 限制使用包含 ip 地址的字符串