@foomo/eslint-plugin
v0.1.2
Published
eslint utility rules for monorepo project setup
Downloads
273
Readme
@foomo/eslint-plugin
eslint utility rules to effectively handle monorepo setups
Installation
You'll first need to install ESLint:
yarn add -D eslint
Next, install @foomo/eslint-plugin
:
yarn add -D @foomo/eslint-plugin
Usage
Add @foomo/eslint-plugin
to the plugins section of your .eslintrc
configuration file:
{
"plugins": ["@foomo/eslint-plugin"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@foomo/no-package-imports": ["error", {
"options": [
{ "invalidPrefix": "packages", "invalidSuffix": "src", "monorepoRoot": "@organization" },
{ "invalidPrefix": "packages", "invalidSuffix": "src", "template": "@organization/$1/custom-prefix/$2" }
]
}]
}
}
Supported Rules
- no-package-imports: fixes forbidden import paths