feat(PLATENG-897): Upgrade eslint-config to 4.0.0 with native flat config#49
Merged
ryanmcafee merged 6 commits intomainfrom Feb 12, 2026
Conversation
…nfig Migrate from FlatCompat bridge to native ESLint 9 flat config API provided by @jupiterone/eslint-config@4.0.0. Remove @eslint/eslintrc dependency. Fix unsafe type patterns flagged by stricter type-checked lint rules. Implements PLATENG-897
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
import.meta.dirname is only available in Node 20.11+/21.2+. The CI runs on Node 18.x where it is undefined, causing ESLint to fail with "tsconfigRootDir is required". Fall back to dirname(fileURLToPath(import.meta.url)) when import.meta.dirname is not available.
Remove duplicate readJsonFile function and type definitions from check-tsconfig.ts in favor of shared readJsonFileForCli and types from src/. Enable useUnknownInCatchVariables in the base tsconfig so the compiler enforces unknown catch variables project-wide, removing the need for explicit `: unknown` annotations.
tokio-on-jupiter
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements PLATENG-897
Update
@jupiterone/typescript-toolsto use@jupiterone/eslint-config@4.0.0which provides native ESLint 9 flat config support, eliminating the need for the FlatCompat bridge and removing the@eslint/eslintrcdependency.Changes
@jupiterone/eslint-configfrom^3.0.0to^4.0.0@eslint/eslintrcdependency (no longer needed)eslint.config.mjsto usecreateConfig()from@jupiterone/eslint-config/flatinstead ofFlatCompatbridgecatchblocks,JSON.parsereturns) to comply withrecommendedTypeCheckedrules now enabled by the new configreadJsonFileForCligeneric for type-safe JSON parsingreadJsonFileincheck-tsconfig.ts— now uses sharedreadJsonFileForClifromsrc/PackageManifestandPackageInfotypes incheck-tsconfig.ts— now imports fromsrc/types.tspackageObjtopackageManifestincheck-tsconfig.tsto align with shared typeuseUnknownInCatchVariables: truein base tsconfig, removing redundant explicit: unknowncatch annotations project-wideWhy
Consumer projects currently get vulnerable
eslint@8.xinstalled due to sub-dependencies fromeslint-config@3.0.0which relied on older@typescript-eslint/*@6.xpackages. This upgrade eliminates those transitive dependencies.Validation Results
Test Plan
npm run buildpassestsc --noEmitpassesnpm run lintpassesnpm auditshows 0 vulnerabilities in consumer projects