0.1.21 • Published 2 years ago
eslint-plugin-v1 v0.1.21
eslint-plugin-v1
Plugin for r-news project
Installation
You'll first need to install ESLint:
npm i eslint --save-devNext, install eslint-plugin-v1:
npm install eslint-plugin-v1 --save-devUsage
Add v1 to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"v1"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"v1/rule-name": 2
}
}Rules
🔧 Automatically fixable by the --fix CLI option.
| Name | Description | 🔧 |
|---|---|---|
| layer-imports | A layer can only import underlying layers (shared, entities, features, widgets, pages, app) | |
| module-relative-path-checker | Within one slice, all paths must be relative | 🔧 |
| public-api-imports | Absolute import is only allowed from the Public API (index.ts) | 🔧 |