eslint-plugin-course-test-plugin
v0.0.7
Published
test plugin
Maintainers
Readme
eslint-plugin-course-test-plugin
ESLint path checker plugin
Installation
You'll first need to install ESLint:
npm i eslint --save-devNext, install eslint-plugin-course-test-plugin:
npm install eslint-plugin-course-test-plugin --save-devUsage
Add course-test-plugin to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"course-test-plugin"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"course-test-plugin/path-checker": "error",
"course-test-plugin/public-api-imports": "error"
}
}Folders that will be checked by default
path-checker - entities, features, shared, widgets, pages
public-api-imports - entities, features, widgets, pages
Custom
Also, you can configure the rules more dynamically.
- Add aliases
- Add custom folders name for checking only these folders.
{
"rules": {
"course-test-plugin/path-checker": [
"error",
{
"alias": "@"
},
[
"pages",
"modules",
"components",
"...otherFolders"
]
],
"course-test-plugin/public-api-imports": [
"error",
{
"alias": "@"
},
[
"pages",
"modules",
"components",
"...otherFolders"
]
]
}
}Rules
🔧 Automatically fixable by the --fix CLI option.
| Name | Description | 🔧 | | :----------------------------------------------------- | :--------------------------------- | :- | | path-checker | Architecture relative path checker | | | public-api-imports | Check correct using of public api | 🔧 |
