@01taylop/eslint-plugin-wyze 中文文档教程

发布于 3年前 浏览 20 项目主页 更新于 3年前

eslint-plugin-wyze

构建状态npmdevDependencies

我个人的 ESLint 规则。

Installation

eslint 上有一个peerDependencies

$ npm i --save-dev eslint-plugin-wyze eslint

Usage

package.json

{
  // ...
  "eslintConfig": {
    "plugins": [
      "wyze"
    ]
  }
}

.eslintrc

{
  "plugins": [
    "wyze"
  ]
}

Supported Rules

Recommended Config

我们支持规则的推荐配置。

Enable

{
  "extends": "plugin:wyze/recommended",
  "plugins": [
    "wyze"
  ]
}

Rules

{
  "rules": {
    "wyze/func-call-arg-spacing": "error",
    "wyze/func-params-spacing": "error",
    "wyze/max-file-length": "error",
    "wyze/newline-after-export": "error",
    "wyze/sort-destructuring-keys": "error",
    "wyze/sort-imports": "error",
    "wyze/space-around-conditional": "error"
  }
}

Change Log

完整变更日志

v3.4.0 (2018-07-11)

  • [409135348d] - Fix sort-imports auto-fix with TypeScript parser (#24) (Justin Anastos)
  • [ef1fb7b259] - Add support for default values (#21) (Jakub Rożek)
  • [aea583cbd3] - Update code to reflect new lint rules (Neil Kistner)
  • [8281a343f7] - Upgrade dependencies and remove prelint command (Neil Kistner)
  • [18ec073bf2] - Drop support for Node 4 (Neil Kistner)

License

MIT © Neil Kistner

eslint-plugin-wyze

Build StatusnpmdevDependencies

My personal ESLint rules.

Installation

There is a peerDependencies on eslint.

$ npm i --save-dev eslint-plugin-wyze eslint

Usage

package.json

{
  // ...
  "eslintConfig": {
    "plugins": [
      "wyze"
    ]
  }
}

.eslintrc

{
  "plugins": [
    "wyze"
  ]
}

Supported Rules

Recommended Config

We support a recommended config for the rules.

Enable

{
  "extends": "plugin:wyze/recommended",
  "plugins": [
    "wyze"
  ]
}

Rules

{
  "rules": {
    "wyze/func-call-arg-spacing": "error",
    "wyze/func-params-spacing": "error",
    "wyze/max-file-length": "error",
    "wyze/newline-after-export": "error",
    "wyze/sort-destructuring-keys": "error",
    "wyze/sort-imports": "error",
    "wyze/space-around-conditional": "error"
  }
}

Change Log

Full Change Log

v3.4.0 (2018-07-11)

  • [409135348d] - Fix sort-imports auto-fix with TypeScript parser (#24) (Justin Anastos)
  • [ef1fb7b259] - Add support for default values (#21) (Jakub Rożek)
  • [aea583cbd3] - Update code to reflect new lint rules (Neil Kistner)
  • [8281a343f7] - Upgrade dependencies and remove prelint command (Neil Kistner)
  • [18ec073bf2] - Drop support for Node 4 (Neil Kistner)

License

MIT © Neil Kistner

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文