0.0.6 • Published 10 months ago

eslint-plugin-siss v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

eslint-plugin-siss

Do not download,仅供个人及所在团队项目

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-siss:

$ npm install eslint-plugin-siss --save-dev

Usage

Add siss/remove-console to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["siss"]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "siss/remove-log": process.env.NODE_ENV === "production" ? "error" : "off"
    }
}

Supported Rules

以下支持 cross-env NODE_ENV=production

  • /{}(对象)排序,支持 annotation
  • import/export 排序
  • 移除声明未使用的 var 和 import
  • vue 生命周期钩子排序
  • vueElement attributes 排序
  • 通用 vue3-essential
  • 通用 eslint:recommended
  • 通用 @vue/eslint-config-typescript
  • 通用 @vue/eslint-config-prettier
  • 华为 js 规则排序
  • 自定义相关