2.0.5 • Published 3 years ago

eslint-plugin-path-validator v2.0.5

Weekly downloads
92
License
ISC
Repository
-
Last release
3 years ago

eslint-plugin-path-validator

vue 路由规范

实现

规范路由文件的 path 中禁止出现驼峰和_,统一使用连字符 -

安装

首先需要安装 ESLint:

$ npm i eslint --save-dev

接下来,安装 eslint-plugin-path-validator:

$ npm install eslint-plugin-path-validator --save-dev

使用

将“eslint-plugin-path-validator”添加到“.eslintrc”配置文件的 overrides 部分。您可以省略eslint-plugin-前缀:

{
  "overrides": [
    {
      // 指定目录使用自定义规则校验,路径采用glob格式
      "files": ["**/src/router/modules/*.js"],
      // 自定义插件
      "plugins": ["path-validator"],
      // 规则
      "rules": {
        "path-validator/vue-router": 2
      }
    }
  ]
}
0.0.1

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.0

3 years ago

1.3.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago