https://github.com/exodusmovement/eslint-plugin-export-default
https://github.com/exodusmovement/eslint-plugin-export-default
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/exodusmovement/eslint-plugin-export-default
- Owner: ExodusMovement
- License: mit
- Created: 2022-04-29T14:03:56.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-02T19:18:46.000Z (almost 2 years ago)
- Last Synced: 2025-02-15T00:42:06.378Z (over 1 year ago)
- Language: JavaScript
- Size: 26.4 KB
- Stars: 0
- Watchers: 15
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @exodus/eslint-plugin-export-default
checks if default export is last line in the file
## Installation
You'll first need to install [ESLint](https://eslint.org/):
```sh
npm i eslint --save-dev
```
Next, install `@exodus/eslint-plugin-export-default`:
```sh
yarn add -D @exodus/eslint-plugin-export-default
```
## Usage
Add `@exodus/eslint-plugin-export-default` to the plugins section of your `eslint.config.js` configuration file.
```js
{
"plugins": [
"export-default": "@exodus/eslint-plugin-export-default"
]
}
```
Then configure the rules you want to use under the rules section.
```js
{
"rules": {
"@exodus/export-default/last": "error",
"@exodus/export-default/named": "error"
}
}
```