Package Exports
- @iceworks/eslint-plugin-best-practices
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@iceworks/eslint-plugin-best-practices) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@iceworks/eslint-plugin-best-practices
Iceworks doctor best practices eslint plugin.
Installation
Install esLint, @ice/spec and @iceworks/eslint-plugin-best-practices:
$ npm install --save-dev eslint @ice/spec @iceworks/eslint-plugin-best-practicesUsage
Add best-practices to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"@iceworks/best-practices"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"@iceworks/best-practices/rule-name": 2
}
}Or you can only use extends to set default rules config.
{
"extends": ["plugin:@iceworks/best-practices/recommended"]
};Supported Rules
deps-no-ice-scriptsIt is not recommended to use ice-scripts, the new version is ice.js.deps-no-resolutionsIt is not recommended to use resolutions to lock the version.deps-no-router-libraryIt is not recommended to directly rely on routing libraries, such as react-router-dom, react-router.deps-recommend-update-raxRax version < 1.0 , recommend to update Rax.no-broad-semantic-versioningRecommended the semantic versioning include everything greater than a particular version in the same major range.no-js-in-ts-projectIt is not recommended to use js and ts files at the same time.no-lowercase-component-nameIt is not recommended to name components in lower case.no-multi-nested-pageMultiple nested pages are not recommended.recommend-functional-componentIt is not recommended to use class component.