@alex-grover/eslint-config
v0.0.12
Published
A shareable ESLint configuration.
Readme
@alex-grover/eslint-config
A shareable ESLint configuration.
Installation
bun install --dev eslint @alex-grover/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-import eslint-import-resolver-typescript eslint-plugin-unused-importsUsage
Add the following scripts to your package.json:
{
"lint": "eslint --cache --cache-location node_modules/.cache",
"check:lint": "bun run lint .",
"fix:lint": "bun run check:lint --fix"
}Add the following entry to your eslint.config.ts:
import config from '@alex-grover/eslint-config'
export default configUsage with Next.js
Next.js' default ESLint config uses eslint-plugin-import, which conflicts with this config. To merge the configs:
import config from '@alex-grover/eslint-config'
export default defineConfig([
// ...
...config.map((entry) =>
entry.plugins
? {
...entry,
plugins: Object.fromEntries(
Object.entries(entry.plugins).filter(([name]) => name !== 'import'),
),
}
: entry,
),
])