Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable eslint prettier rule after being accidentally disabled for 3 years #454

Merged
merged 2 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
plugins: ['prettier', '@typescript-eslint', 'react-hooks'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'prettier/prettier': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': [
'error',
Expand Down
21 changes: 4 additions & 17 deletions src/import/trace-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,7 @@ function getProfileNameByPidTid(
return profileNamesByPidTid
}

function eventListToProfile(
importableEvents: ImportableTraceEvent[],
name: string,
): Profile {
function eventListToProfile(importableEvents: ImportableTraceEvent[], name: string): Profile {
// The trace event format is hard to deal with because it specifically
// allows events to be recorded out of order, *but* event ordering is still
// important for events with the same timestamp. Because of this, rather
Expand Down Expand Up @@ -529,11 +526,7 @@ function getActiveFramesForSample(
return frames.reverse()
}

function sampleListToProfile(
contents: TraceWithSamples,
samples: Sample[],
name: string,
): Profile {
function sampleListToProfile(contents: TraceWithSamples, samples: Sample[], name: string): Profile {
const profileBuilder = new StackListProfileBuilder()

profileBuilder.setValueFormatter(new TimeFormatter('microseconds'))
Expand Down Expand Up @@ -565,10 +558,7 @@ function eventListToProfileGroup(events: TraceEvent[]): ProfileGroup {
throw new Error(`Could not find events for key: ${importableEventsForPidTid}`)
}

profilePairs.push([
profileKey,
eventListToProfile(importableEventsForPidTid, name),
])
profilePairs.push([profileKey, eventListToProfile(importableEventsForPidTid, name)])
})

// For now, we just sort processes by pid & tid.
Expand Down Expand Up @@ -603,10 +593,7 @@ function sampleListToProfileGroup(contents: TraceWithSamples): ProfileGroup {
return
}

profilePairs.push([
profileKey,
sampleListToProfile(contents, samplesForPidTid, name),
])
profilePairs.push([profileKey, sampleListToProfile(contents, samplesForPidTid, name)])
})

// For now, we just sort processes by pid & tid.
Expand Down
Loading