Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/viodotcom/eslint-plugin-no-package-self-import
An ESLint plugin for finding packages that import themselves
https://github.com/viodotcom/eslint-plugin-no-package-self-import
Last synced: about 2 months ago
JSON representation
An ESLint plugin for finding packages that import themselves
- Host: GitHub
- URL: https://github.com/viodotcom/eslint-plugin-no-package-self-import
- Owner: viodotcom
- License: mit
- Created: 2024-09-05T12:25:46.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-06T11:55:42.000Z (4 months ago)
- Last Synced: 2024-10-06T20:34:58.332Z (3 months ago)
- Language: JavaScript
- Size: 39.1 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# eslint-plugin-no-package-self-import
An ESLint plugin for finding instances of a package importing from itself
## Installation
You'll first need to install [ESLint](https://eslint.org/):
```sh
npm i eslint --save-dev
```Next, install `eslint-plugin-no-package-self-import`:
```sh
npm install eslint-plugin-no-package-self-import --save-dev
```## Usage
Add `no-package-self-import` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"plugins": [
"no-package-self-import"
]
}
```Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"no-package-self-import/rule-name": "warn"
}
}
```Or use the recommended configuration:
```json
{
"extends": [
"plugin:no-package-self-import/recommended"
]
}
```## Configurations
| | Name |
| :- | :------------ |
| ✅ | `recommended` |## Rules
💼 Configurations enabled in.\
✅ Set in the `recommended` configuration.| Name | Description | 💼 |
| :------------------------------------------------------------- | :--------------------------------------- | :- |
| [no-package-self-import](docs/rules/no-package-self-import.md) | Disallow importing from the same package | ✅ |