diff --git a/eslint.config.mjs b/eslint.config.mjs index 6706b48b92..8c4f1150dd 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -34,6 +34,11 @@ export default defineConfig( // React config reactPlugin.configs.flat.recommended, + // Prettier config must be placed here to disable formatting rules from the + // base configs above, while allowing our custom rules below to take + // precedence. + prettierConfig, + // Custom configuration for all files { files: ['**/*.js', '**/*.mjs', '**/*.cjs', '**/*.ts', '**/*.tsx'], @@ -311,8 +316,5 @@ export default defineConfig( ...globals.jest, }, }, - }, - - // Prettier config (must be last to override other formatting rules) - prettierConfig + } ); diff --git a/scripts/lib/dev-server.mjs b/scripts/lib/dev-server.mjs index d813bdfc6a..39f86bc4b3 100644 --- a/scripts/lib/dev-server.mjs +++ b/scripts/lib/dev-server.mjs @@ -128,7 +128,9 @@ export async function startDevServer(buildConfig, options = {}) { // Graceful shutdown let isShuttingDown = false; process.on('SIGINT', async () => { - if (isShuttingDown) return; + if (isShuttingDown) { + return; + } isShuttingDown = true; console.log('\nShutting down...'); diff --git a/scripts/lib/esbuild-plugins.mjs b/scripts/lib/esbuild-plugins.mjs index 40d62d0741..c3cd6eac3b 100644 --- a/scripts/lib/esbuild-plugins.mjs +++ b/scripts/lib/esbuild-plugins.mjs @@ -24,7 +24,9 @@ export function circularDependencyPlugin() { setup(build) { build.initialOptions.metafile = true; build.onEnd((result) => { - if (!result.metafile?.inputs) return; + if (!result.metafile?.inputs) { + return; + } const { inputs } = result.metafile; const recursionStack = new Set(); diff --git a/src/components/stack-chart/Canvas.tsx b/src/components/stack-chart/Canvas.tsx index a30950153b..71bd684ab2 100644 --- a/src/components/stack-chart/Canvas.tsx +++ b/src/components/stack-chart/Canvas.tsx @@ -665,7 +665,9 @@ class StackChartCanvasImpl extends React.PureComponent { }; _onDoubleClickStack = (hoveredItem: HoveredStackTiming | null) => { - if (!hoveredItem) return; + if (!hoveredItem) { + return; + } const result = this._getCallNodeIndexOrMarkerIndexFromHoveredItem(hoveredItem); diff --git a/src/test/store/symbolication.test.ts b/src/test/store/symbolication.test.ts index 40c47f71ed..17226e2450 100644 --- a/src/test/store/symbolication.test.ts +++ b/src/test/store/symbolication.test.ts @@ -259,7 +259,9 @@ describe('doSymbolicateProfile', function () { // Helper function to get filename from source index const getFileName = (funcIndex: number): string | null => { const sourceIndex = funcTable.source[funcIndex]; - if (sourceIndex === null) return null; + if (sourceIndex === null) { + return null; + } const urlIndex = sources.filename[sourceIndex]; return stringTable.getString(urlIndex); };