https://github.com/obusk/eslint-config-next
A strict configuration for using Next.js and Tailwind
https://github.com/obusk/eslint-config-next
eslint eslintconfig next tailwind
Last synced: 8 months ago
JSON representation
A strict configuration for using Next.js and Tailwind
- Host: GitHub
- URL: https://github.com/obusk/eslint-config-next
- Owner: oBusk
- Created: 2024-03-01T00:06:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T21:11:03.000Z (over 1 year ago)
- Last Synced: 2024-10-27T23:51:02.179Z (over 1 year ago)
- Topics: eslint, eslintconfig, next, tailwind
- Language: JavaScript
- Homepage:
- Size: 904 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @obusk/eslint-config-next
> A strict configuration for using Next.js and Tailwind
## Installation
```bash
npm install --save-dev @obusk/eslint-config-next
```
## Usage
### ESLint Flat Config
This package exports a flat config by default. Add the following to your `eslint.config.js`:
```js
import obuskNext from "@obusk/eslint-config-next";
export default [...obuskNext];
```
### Ignored Files
This config automatically respects your project's `.gitignore`.
How it works:
- At load time it walks upward from `process.cwd()` until it finds the nearest `package.json` (your project root).
- If a `.gitignore` exists in that root, those patterns are fed to ESLint via `includeIgnoreFile`.
- If no `.gitignore` is found, nothing breaks—ESLint just proceeds without extra ignore patterns.
This means you can run `eslint` from a subdirectory (e.g. `packages/api`) and it will still resolve the root `.gitignore` of the repository—mirroring how tools like ESLint/Jest discover project roots.