https://github.com/totominc/eslint-config-next
An enhanced ESLint config for Next.js with Airbnb + TypeScript + Prettier + TailwindCSS support.
https://github.com/totominc/eslint-config-next
airbnb-eslint eslint eslint-config nextjs prettier prettier-eslint tailwindcss
Last synced: 7 months ago
JSON representation
An enhanced ESLint config for Next.js with Airbnb + TypeScript + Prettier + TailwindCSS support.
- Host: GitHub
- URL: https://github.com/totominc/eslint-config-next
- Owner: TotomInc
- Created: 2023-02-25T07:10:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-23T07:00:11.000Z (9 months ago)
- Last Synced: 2025-03-02T06:02:36.901Z (7 months ago)
- Topics: airbnb-eslint, eslint, eslint-config, nextjs, prettier, prettier-eslint, tailwindcss
- Language: JavaScript
- Homepage:
- Size: 850 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eslint-config-next
## Installation
```bash
npm i -D @totominc/eslint-config-next eslint
```Create `eslint.config.js` in the root of your project:
```js
import { totominc } from "@totominc/eslint-config-next";export default totominc();
```Add scripts to your `package.json`:
```json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
```Add VSCode settings to your `.vscode/settings.json`:
```json
{
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "prettier/prettier", "severity": "off", "fixable": true },
{ "rule": "style/*", "severity": "off", "fixable": true },
{ "rule": "format/*", "severity": "off", "fixable": true },
{ "rule": "*-indent", "severity": "off", "fixable": true },
{ "rule": "*-spacing", "severity": "off", "fixable": true },
{ "rule": "*-spaces", "severity": "off", "fixable": true },
{ "rule": "*-order", "severity": "off", "fixable": true },
{ "rule": "*-dangle", "severity": "off", "fixable": true },
{ "rule": "*-newline", "severity": "off", "fixable": true },
{ "rule": "*quotes", "severity": "off", "fixable": true },
{ "rule": "*semi", "severity": "off", "fixable": true }
],// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml",
"xml",
"gql",
"graphql",
"astro",
"svelte",
"css",
"less",
"scss",
"pcss",
"postcss"
]
}
```