Skip to content

nextjs

Next.js apps: the framework and hooks rules, and server code that never reaches the client. A Semgrep rule refuses ignoreBuildErrors and ignoreDuringBuilds in next.config. It requires typescript, react, react-dom. The JavaScript and TypeScript guide explains the setup.

Check Stage Level What it does
nextjs/tsc push recommended Has Next.js write its types, then type-checks the app with the strict compiler options.

gspot selects it in a scope with dependencies next.

Lint rules Files Why
gspot/no-trivial-files **/{page,layout,template,default,loading,error,not-found,global-error,route,middleware,proxy}.{js,jsx,ts,tsx} Next.js discovers route files by name, so each file can hold one export in its own folder.
Rule file Installed when
.gspot/configurations/framework/nextjs/rules/NEXTJS.md Always
Tool Version
next Any, install it yourself
@next/eslint-plugin-next 16.3.8

gspot writes .gspot/configurations/framework/nextjs/semgrep.yml.