@hao360/eslint-plugin-cube

0.2.0 • Public • Published

eslint-plugin-cube

The cube rule validation plugin of eslint.

配置

module.exports = {
  plugins: [
    "@hao360/eslint-plugin-cube"
  ],
  rules: {
    '@hao360/cube/no-cube-globals',
    '@hao360/cube/no-cube-tags',
    '@hao360/cube/no-cube-attributes',
    '@hao360/cube/no-cube-eval',
    '@hao360/cube/no-cube-dynamic'
  }
}

自定义规则

命名约定:

  • 如果你的规则是禁止什么,加前缀 no-,比如 no-eval 禁用 eval(),no-debugger禁用debugger
  • 如果你规则是强制包含什么,使用一个简短的名称,不带特殊的前缀。
  • 在单词之间使用连字符

规则说明在docs/rules目录。

说明

当使用html标签规则时,需要配置parser为eslint-html-parser

测试

npm run test

Readme

Keywords

Package Sidebar

Install

npm i @hao360/eslint-plugin-cube

Weekly Downloads

8

Version

0.2.0

License

ISC

Unpacked Size

48.8 kB

Total Files

10

Last publish

Collaborators

  • ntt360
  • ivershuo
  • handoing
  • stun
  • zhaoyan86
  • liuyan_12
  • zeldajay