Skip to content

Commit

Permalink
fmt: add trailing commas
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Mar 2, 2024
1 parent 4bd261f commit dfe7848
Show file tree
Hide file tree
Showing 127 changed files with 414 additions and 414 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci/getTestJobs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ async function getTestJobs() {
jobName: 'Unit Tests',
jobCmd: 'pnpm run test:units',
jobTestFiles: specFiles,
jobSetups: [{ os: 'ubuntu-latest', node_version: '18' }]
jobSetups: [{ os: 'ubuntu-latest', node_version: '18' }],
},
// Typecheck `.ts` files
{
jobName: 'TypeScript',
jobCmd: 'pnpm run test:types',
jobSetups: [{ os: 'ubuntu-latest', node_version: '18' }]
jobSetups: [{ os: 'ubuntu-latest', node_version: '18' }],
},
// E2e tests
...(await crawlE2eJobs(testFiles))
...(await crawlE2eJobs(testFiles)),
]

assertTestFilesCoverage(testFiles, jobs)
Expand Down Expand Up @@ -91,15 +91,15 @@ async function crawlE2eJobs(testFiles) {
assert(typeof node_version === 'string')
jobSetups.push({
os,
node_version
node_version,
})
})

jobs.push({
jobName,
jobTestFiles: [],
jobSetups,
jobCmd: 'pnpm run test:e2e'
jobCmd: 'pnpm run test:e2e',
})
})
}
Expand All @@ -121,7 +121,7 @@ async function crawlE2eJobs(testFiles) {
const jobTestFiles = testFiles.filter((f) => f.startsWith(dir))
assert(
jobTestFiles.length > 0,
`No test files found in \`${dir}\` (for \`${testJobFile}\`). Test files: \n${JSON.stringify(testFiles, null, 2)}`
`No test files found in \`${dir}\` (for \`${testJobFile}\`). Test files: \n${JSON.stringify(testFiles, null, 2)}`,
)

const job = jobs.find((job) => job.jobName == jobName)
Expand All @@ -146,7 +146,7 @@ async function crawlE2eJobs(testFiles) {
jobName: 'E2E Tests',
jobCmd: 'pnpm run test:e2e',
jobTestFiles: [],
jobSetups: [{ os: 'ubuntu-latest', node_version: '18' }]
jobSetups: [{ os: 'ubuntu-latest', node_version: '18' }],
}
jobs.push(job)
}
Expand Down Expand Up @@ -194,7 +194,7 @@ async function getMatrix() {
jobName: jobName + getSetupName(setup),
TEST_FILES: (jobTestFiles ?? []).join(' '),
TEST_INSPECT,
...setup
...setup,
})
})
})
Expand All @@ -208,11 +208,11 @@ function assertTestFilesCoverage(testFiles, jobs) {
const jobsFound = jobs.filter((job) => job.jobTestFiles?.includes(testFile))
assert(
jobsFound.length > 0,
`Test file ${testFile} isn't included in any job. Jobs: \n${JSON.stringify(jobs, null, 2)}`
`Test file ${testFile} isn't included in any job. Jobs: \n${JSON.stringify(jobs, null, 2)}`,
)
assert(
jobsFound.length <= 1,
`Test ${testFile} is multiple categories: ${jobsFound.map((j) => '`' + j.jobName + '`').join(' ')}.`
`Test ${testFile} is multiple categories: ${jobsFound.map((j) => '`' + j.jobName + '`').join(' ')}.`,
)
})
}
Expand Down Expand Up @@ -254,7 +254,7 @@ function getInspectFile() {
}
assert(
inspectFiles.length === 1,
'There cannot be only one `focus` file but found multiple: ' + inspectFiles.join(' ')
'There cannot be only one `focus` file but found multiple: ' + inspectFiles.join(' '),
)
return inspectFiles[0]
}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ semi: false
tabWidth: 2
singleQuote: true
printWidth: 120
trailingComma: none
trailingComma: all
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"semicolons": "asNeeded",
"lineWidth": 120,
"quoteStyle": "single",
"trailingComma": "none"
"trailingComma": "all"
}
},
"linter": {
Expand Down
4 changes: 2 additions & 2 deletions docs/.testRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ function testRun(cmd: 'pnpm run dev' | 'pnpm run preview') {
body: getWidths(document.body),
page: getWidths(document.querySelector('#page-view')),
left: getWidths(document.querySelector('#navigation-wrapper')),
right: getWidths(document.querySelector('#page-wrapper'))
right: getWidths(document.querySelector('#page-wrapper')),
}
function getWidths(elem: Element | null): Widths {
if (!elem) throw new Error('Elem missing')
return {
clientWidth: elem.clientWidth,
scrollWidth: elem.scrollWidth
scrollWidth: elem.scrollWidth,
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion docs/NavHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function HeaderTitle({ fontSize, marginLeft }: { fontSize: string; marginLeft: n
style={{
fontSize,
marginLeft,
fontWeight: 600
fontWeight: 600,
}}
>
Telefunc
Expand Down
2 changes: 1 addition & 1 deletion docs/components/MostlyMutations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react'

function MostlyMutations({
toolName,
builtInMechanism
builtInMechanism,
}: {
toolName: JSX.Element | string
builtInMechanism?: string
Expand Down
2 changes: 1 addition & 1 deletion docs/docpress.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export default {
tagline: 'Remote Functions. Instead of API.',
twitterHandle: '@brillout',
websiteUrl: 'https://telefunc.com',
algolia: null
algolia: null,
} satisfies Config
Loading

0 comments on commit dfe7848

Please sign in to comment.