ESLint
The pluggable linting utility for JavaScript and JSX.
What create-faster adds
Script added to each app's package.json:
lint—eslint .
Each app gets a stack-specific eslint.config.mjs with the right plugins and ignores for its framework.
Stack configurations
| Stack | Config preset | Plugins |
|---|---|---|
| Next.js | next | eslint-plugin-react, eslint-plugin-react-hooks, @next/eslint-plugin-next |
| Expo | react-native | eslint-plugin-react, eslint-plugin-react-hooks |
| TanStack Start | react | eslint-plugin-react, eslint-plugin-react-hooks |
| Hono | server | None (Node.js globals only) |
All configs extend @eslint/js recommended + typescript-eslint recommended as a base.
Single repo
In a single-repo project, eslint.config.mjs contains inline rules with all plugins configured directly:
eslint.config.mjs # Stack-specific flat configTurborepo
In a turborepo, create-faster generates a shared @repo/eslint-config package with composable presets. Each app imports from it:
packages/eslint-config/
├── package.json # Exports all presets
├── base.js # @eslint/js + typescript-eslint
├── next.js # base + React + Next.js rules
├── react.js # base + React rules
├── react-native.js # base + React + Expo ignores
└── server.js # base + Node.js globals
apps/web/
└── eslint.config.mjs # import { nextConfig } from "@repo/eslint-config/next"
apps/api/
└── eslint.config.mjs # import { serverConfig } from "@repo/eslint-config/server"Each app's eslint.config.mjs is a one-liner that re-exports the shared preset:
import { nextConfig } from "@repo/eslint-config/next";
export default nextConfig;Each workspace package that holds source code (packages/api, packages/auth, packages/db, packages/ui, packages/eslint-config itself) has its own lint script and eslint.config.mjs, so the root lint (turbo lint) lints the packages with the apps. The config re-exports the server preset, or react for packages/ui:
import { serverConfig } from "@repo/eslint-config/server";
export default serverConfig;Lint-staged integration: With Husky, a single repo runs eslint --fix on the staged files from its root. In a turborepo the root has no ESLint config, so each app and package that lints itself has a lint-staged entry in its own package.json. lint-staged then runs eslint --fix in the directory of the closest entry, where ESLint finds that app's or package's eslint.config.mjs:
{
"lint-staged": {
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": ["eslint --fix"]
}
}
