added eslint-plugin

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-17 22:55:41 +01:00
parent 1e84c75dc9
commit 179d301518
7 changed files with 222 additions and 1 deletions
+40
View File
@@ -0,0 +1,40 @@
# @backstage/eslint-plugin
A collection of ESLint rules useful to Backstage projects.
## Usage
This ESLint plugin is part of the default lint configuration provided by the [Backstage CLI](https://www.npmjs.com/package/@backstage/cli), so you generally do not need to install it manually.
If you do wish to install this plugin manually, start by adding it as a development dependency to your project:
```sh
yarn add --dev @backstage/eslint-plugin
```
Then add it to your ESLint configuration:
```js
extends: [
'plugin:@backstage/recommended',
],
```
Alternatively, if you want to install in individual rules manually:
```js
plugins: [
'@backstage',
],
rules: {
'@backstage/no-forbidden-package-imports': 'error',
}
```
## Rules
The following rules are provided by this plugin:
| Rule | Description |
| ----------------------------------------- | ------------------------------------------------------------------------------- |
| `@backstage/no-forbidden-package-imports` | Disallow internal monorepo imports from package subpaths that are not exported. |