eslint-plugin-oneos

0.0.2 • Public • Published

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 地址的字符串

Package Sidebar

Install

npm i eslint-plugin-oneos

Weekly Downloads

0

Version

0.0.2

License

ISC

Unpacked Size

9.01 kB

Total Files

11

Last publish

Collaborators

  • junlinguo11