@rachelallyson/eslint-config-nextjs
v0.2.0
Published
Shareable ESLint 9 flat config for Next.js + TypeScript projects — bundles React, JSX a11y, import sorting, GraphQL, and Prettier rules.
Readme
@rachelallyson/eslint-config-nextjs
Shareable ESLint 9 flat config for Next.js + TypeScript projects. It bundles a curated set of plugins so you get consistent linting and formatting across projects from a single dependency.
What's included
- Base — recommended ESLint rules plus a complexity limit
- TypeScript —
typescript-eslinttype-checked + stylistic rules - Imports —
eslint-plugin-import,simple-import-sort,unused-imports, and sorted destructure/object keys - React —
eslint-plugin-react,eslint-plugin-jsx-a11y, and@next/eslint-plugin-next - GraphQL —
@graphql-eslint/eslint-plugin - Prettier —
eslint-config-prettier+eslint-plugin-prettierso formatting runs through ESLint
Installation
npm install --save-dev @rachelallyson/eslint-config-nextjs eslinteslint is a peer dependency (^9.17.0); all plugin dependencies are bundled.
Usage
Create an eslint.config.mjs at your project root:
import nextConfig from "@rachelallyson/eslint-config-nextjs";
export default nextConfig;The default export is a flat-config array, so you can extend it with your own overrides:
import nextConfig from "@rachelallyson/eslint-config-nextjs";
export default [
...nextConfig,
{
rules: {
// your project-specific overrides
},
},
];Then lint:
npx eslint .Requirements
- ESLint
^9.17.0(flat config) - Node.js 20+
License
ISC © Rachel Allyson
