mirror of
https://github.com/foomo/eslint-plugin.git
synced 2026-12-04 02:41:48 +00:00
0abb26df8a82d95398b073eb3cdaeaddaf4aa3e2
Bumps the npm_and_yarn group with 1 update in the / directory: [braces](https://github.com/micromatch/braces). Updates `braces` from 3.0.2 to 3.0.3 - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-version: 3.0.3 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
@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
Languages
JavaScript
100%