chore: remove next lint command#2679
Conversation
🦋 Changeset detectedLatest commit: 2d67b9d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CATALYST-1561
9a298fa to
2d67b9d
Compare
| "build:analyze": "ANALYZE=true npm run build", | ||
| "start": "next start", | ||
| "lint": "next lint", | ||
| "prelint": "next typegen", |
There was a problem hiding this comment.
The next lint command essentially ran this before linting, so I opted to have this be a pre* hook to the lint task.
There was a problem hiding this comment.
This runs automatically because it has the pre prefix?
There was a problem hiding this comment.
Yeah, it should be documented here: https://docs.npmjs.com/cli/v8/using-npm/scripts#pre--post-scripts
| "build:analyze": "ANALYZE=true npm run build", | ||
| "start": "next start", | ||
| "lint": "next lint", | ||
| "prelint": "next typegen", |
There was a problem hiding this comment.
This runs automatically because it has the pre prefix?
What/Why?
This PR updates the
lintcommand in thecorepackage to use theeslintCLI directly instead ofnext lint. With Next.js 16 deprecatingnext lint, this change proactively migrates away from the deprecated command to minimize future migration impact.Key changes:
lintscript incore/package.jsonto runeslint . --ext .js,.jsx,.ts,.tsxinstead ofnext lintprelintscript that runsnext typegento ensure TypeScript definitions are generated before linting.eslintignorefile to explicitly define ignored paths (dependencies, build outputs, generated files, test outputs, cache)ignorePatternsfrom.eslintrc.cjssince ignore patterns are now managed in.eslintignoreThis change maintains the same linting behavior while using the more direct ESLint CLI approach, which is the recommended pattern going forward.
Testing
npm run lintfrom thecoredirectory to verify linting works correctlypnpm lintfrom the root directory to ensure the monorepo-level lint command still functionsprelinthookMigration
For developers working on feature branches:
No action required. The
lintcommand works the same way - you can continue usingnpm run lintorpnpm lintas before. The implementation has changed but the interface remains identical.If you've customized ignore patterns:
If you have custom ignore patterns in your local
.eslintrc.cjs, you may need to move them to the new.eslintignorefile instead, as we've consolidated ignore patterns there for better clarity and maintainability.This pull request description was generated with the assistance of AI. Portions of the code and/or implementation ideas in this PR may also have been created or influenced by AI tools.