0.0.1 • Published 4 years ago
eslint-plugin-tokopedia-lite v0.0.1
eslint-plugin-loadable-component
ESLint rules for tokopedia web services.
Installation
You'll first need to install ESLint:
pnpm install eslint --save-devNext, install eslint-plugin-tokopedia-lite:
pnpm install eslint-plugin-tokopedia-lite --save-devUsage
Note: This plugin doesn't have "recommended" rule set at the moment. We are currently still considering of the right rules to be the recommended default set. Please make sure to enable rules based on your needs.
To get started, add tokopedia-lite to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["tokopedia-lite"]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"tokopedia-lite/no-workspace-url-deps": "error",
"tokopedia-lite/no-window-checking": "warn",
"tokopedia-lite/no-var-expression-dynamic-import": "error"
}
}Rules
| Name | Type | Docs |
|---|---|---|
| no-workspace-url-deps | Possible Error | Link |
| no-window-checking | Possible Error | Link |
| no-var-expression-dynamic-import | Possible Error | Link |
| no-invalid-loadable-specifier | Possible Error | Link |
| no-empty-leading-comment-dynamic-import | Best Practice | Link |
| jest-no-identical-title | Best Practice | TBD |
| jest-no-duplicate-hooks | Best Practice | Link |
Disabling Rule
You can disable certain rule by using ESLint directive syntax (marked with #) to hint ESLint to disable in specific line or entire file. You can find a list of ESLint directives here.
# eslint-disable-next-line no-window-checking
if (window) {
...
}0.0.1
4 years ago