Next.js App with ESLint, Prettier, and Docker
Create a production-ready Next.js project with linting, formatting, and Docker support using only supported tinkerise scaffolders and enhancements.
Prerequisites
Section titled “Prerequisites”- Node.js 20.11+
tinkeriseinstalled (npm i -g tinkerise)- Docker Desktop or Docker Engine
Step 1: Scaffold the application
Section titled “Step 1: Scaffold the application”tinkerise web next docs-next-app --typescript --tailwind --eslintcd docs-next-appExpected output includes a generated Next.js app with TypeScript and Tailwind files.
Step 2: Add formatting and container enhancements
Section titled “Step 2: Add formatting and container enhancements”tinkerise add prettier dockerThis applies enhancement modules on top of the generated app.
Step 3: Install and run checks
Section titled “Step 3: Install and run checks”npm installnpm run lintExpected result: ESLint passes with no errors for a fresh scaffold.
Step 4: Build and run the Docker image
Section titled “Step 4: Build and run the Docker image”docker build -t docs-next-app .docker run --rm -p 3000:3000 docs-next-appOpen http://localhost:3000 and verify the app renders.
Expected generated artifacts
Section titled “Expected generated artifacts”package.jsonscripts from Next.js scaffoldprettierconfig artifacts from enhancementDockerfileand.dockerignorefrom Docker enhancement
Next steps
Section titled “Next steps”- Add CI checks with
tinkerise add ci. - Add commit quality gates with
tinkerise add husky commitlint. - Review framework details in the Next.js guide.