eslint-plugin-smarts
v0.0.3
Published
SISS eslint 规则集(仅团队内部调用)
Downloads
4
Readme
eslint-plugin-smarts
Do not download,仅供个人及所在团队项目
Installation
You'll first need to install ESLint:
$ pnpm i eslint --save-dev
$ pnpm i prettier --save-dev
Next, install eslint-plugin-smarts
:
$ pnpm install eslint-plugin-smarts --save-dev
Usage
Add smarts/remove-console
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["smarts"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"smarts/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 规则排序
- 自定义相关