0.0.6 • Published 8 years ago
eslint-plugin-ascp v0.0.6
eslint-plugin-ascp
适用于中台的eslint插件
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devinstall eslint-plugin-react and eslint-plugin-import
Next, install @alife/eslint-plugin-ascp:
$ npm install @alife/eslint-plugin-ascp --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-ascp globally.
Usage
Add ascp to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"extends": [
"plugin:ascp/recommended"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"ascp/rule-name": 2
}
}Supported Rules
此插件集成了 eslint-config-ali/react,详细请参考 eslint-config-ali
而 eslint-config-ali/react 是针对eslint-plugin-react的一些rule的定制。
此插件独有的rules:
- comp-extend-purecomp
- no-direct-style-object
rule的详细说明参考源码目录doc.