eslint-plugin-arco-mobile
v1.0.4
Published
custom eslint plugin for arco mobile
Downloads
143
Readme
eslint-plugin-arco-mobile
custom eslint plugin for arco mobile
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-arco-mobile
:
npm install eslint-plugin-arco-mobile --save-dev
Usage
Add arco-mobile
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"arco-mobile"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"arco-mobile/rule-name": 2
}
}
Configurations
| | Name |
| :- | :------------ |
| ✅ | recommended
|
Rules
💼 Configurations enabled in.
✅ Set in the recommended
configuration.
🔧 Automatically fixable by the --fix
CLI option.
| Name | Description | 💼 | 🔧 | | :----------------------------------------------------------- | :------------------------------------------------------------------------------------------ | :- | :- | | dep-comp-import-name | the name of the attached subcomponent when imported must be equal to the name when exported | ✅ | | | export-props-ref | component's props and ref should be exported in the entry file | ✅ | | | import-deps-less | necessary less files should be imported in the style entry file | ✅ | 🔧 | | no-less-import | do not import less files in component's logical ts files | ✅ | | | promise-with-polyfill | Promise needs to be imported from es6-promise | ✅ | 🔧 |