🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@hao360/eslint-plugin-cube

Package Overview
Dependencies
Maintainers
8
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hao360/eslint-plugin-cube

cube rule validation plugin

latest
npmnpm
Version
0.2.0
Version published
Weekly downloads
18
12.5%
Maintainers
8
Weekly downloads
 
Created
Source

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

Keywords

cube

FAQs

Package last updated on 07 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts