chore(deps): migrate to ESLint 9 with flat config#17108
chore(deps): migrate to ESLint 9 with flat config#17108
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ac73379 to
6f3f154
Compare
| @@ -0,0 +1,63 @@ | |||
| const {FlatCompat} = require('@eslint/eslintrc'); | |||
| const js = require('@eslint/js'); | |||
| const nextPlugin = require('@next/eslint-plugin-next'); | |||
There was a problem hiding this comment.
Transitive dependency required directly may break under strict resolution
Medium Severity
eslint.config.js directly requires @next/eslint-plugin-next, but this package is not a direct devDependency — it's only installed transitively through eslint-config-next. Meanwhile, eslint-config-next itself is no longer referenced anywhere in the ESLint config (the old .eslintrc.js used plugin:@next/next/recommended; the new config uses nextPlugin directly). This creates a fragile setup: if someone removes the seemingly-unused eslint-config-next from package.json, eslint.config.js will fail at require time. The globals package is similarly an unused direct dependency. Adding @next/eslint-plugin-next as a direct devDependency and removing eslint-config-next and globals would clarify the actual dependency graph.
Additional Locations (1)
46b5dc5 to
46744b4
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
46744b4 to
fc7b3f3
Compare
- Update ESLint from v8 to v9.26.0
- Convert .eslintrc.js to eslint.config.js (flat config)
- Update @typescript-eslint/* to v8.32.1
- Update eslint-config-next to v16.0.0
- Add @eslint/js and @eslint/eslintrc for FlatCompat
- Add globals package for environment globals
Breaking changes from eslint-config-sentry-docs handled via overrides:
- Disable deprecated @typescript-eslint/ban-types (replaced with new rules)
- Disable incompatible no-lookahead-lookbehind-regexp rule
- Enable replacement rules: no-empty-object-type, no-unsafe-function-type, no-wrapper-object-types
Code fixes:
- Replace 'catch (e)' with 'catch' for unused error variables
- Remove deprecated eslint-env comments
- Fix {} type usage with proper Record<string, unknown> or unknown
- Remove unused eslint-disable comments
Resolves security alerts for minimatch, flatted, and ajv by using
ESLint 9's native globbing instead of minimatch.
fc7b3f3 to
e31d3f4
Compare


Summary
.eslintrc.jsto flat config (eslint.config.js)minimatchto resolve security vulnerabilitiesSecurity Impact
This PR resolves all 3 remaining high-severity Dependabot alerts by adding a pnpm override for
minimatch@^9.0.0:Changes
Dependencies
pnpm Overrides
minimatch:^9.0.0- Forces all transitive dependencies to use non-vulnerable minimatch v9Configuration
.eslintrc.js,.eslintignoreeslint.config.js(flat config format)FlatCompatto wrapeslint-config-sentry-docs(still in legacy format)@next/eslint-plugin-nextdirectly to avoid plugin conflicts with sentry-docs configCode Fixes
catch (e)withcatchwhere error is unused (cleaner syntax)/* eslint-env node */comments (not supported in flat config){}type usage →Record<string, unknown>orunknownScenario(type-only usage)PlatformDataRules Overrides
Since
eslint-config-sentry-docshasn't been updated for ESLint 9 yet, we override:@typescript-eslint/ban-types→ replaced with:@typescript-eslint/no-empty-object-type@typescript-eslint/no-unsafe-function-type@typescript-eslint/no-wrapper-object-typesno-lookahead-lookbehind-regexp(plugin schema incompatible with ESLint 9)Testing
pnpm lint:eslint- passes (only pre-existing warnings)pnpm lint:ts- passespnpm test:ci- all 149 tests pass