Skip to content

Commit 58555ae

Browse files
committed
chore: deno fmt
1 parent 9ea0d78 commit 58555ae

File tree

8 files changed

+23
-19
lines changed

8 files changed

+23
-19
lines changed

src/files/dwi.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { parseBvalBvec } from './dwi.ts'
44

55
Deno.test('Test bval/bvec parsing', async (t) => {
66
await t.step('Load 3 bvals', async () => {
7-
const bvals = parseBvalBvec('0 1 2 \n') // Typically ends with " \n"
7+
const bvals = parseBvalBvec('0 1 2 \n') // Typically ends with " \n"
88
assertEquals(bvals, [['0', '1', '2']])
99
})
1010
await t.step('Load 3 bvals - missing newline', async () => {
@@ -32,4 +32,3 @@ Deno.test('Test bval/bvec parsing', async (t) => {
3232
assertEquals(bvecs, [['0', '1', '2'], ['0', '1', '2'], ['0', '1', '2']])
3333
})
3434
})
35-

src/issues/datasetIssues.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { nonSchemaIssues } from './list.ts'
2-
import type { Issue, Severity, IssueDefinition, IssueFile } from '../types/issues.ts'
3-
export type { Issue, Severity, IssueDefinition, IssueFile }
2+
import type { Issue, IssueDefinition, IssueFile, Severity } from '../types/issues.ts'
3+
export type { Issue, IssueDefinition, IssueFile, Severity }
44

55
// Code is deprecated, return something unusual but JSON serializable
66
const CODE_DEPRECATED = Number.MIN_SAFE_INTEGER

src/issues/list.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,13 @@ export const bidsIssues: IssueDefinitionRecord = {
168168
},
169169
CITATION_CFF_VALIDATION_ERROR: {
170170
severity: 'error',
171-
reason:
172-
"The file does not pass validation using the citation.cff standard's schema." +
173-
'https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md'
171+
reason: "The file does not pass validation using the citation.cff standard's schema." +
172+
'https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md',
174173
},
175174
FILE_READ: {
176175
severity: 'error',
177-
reason: 'We were unable to read this file.'
178-
}
176+
reason: 'We were unable to read this file.',
177+
},
179178
}
180179

181180
const hedIssues: IssueDefinitionRecord = {

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export async function main(): Promise<ValidationResult> {
2828
// Run the schema based validator
2929
const schemaResult = await validate(tree, options, config)
3030

31-
let output_string = ""
31+
let output_string = ''
3232
if (options.json) {
33-
output_string = resultToJSONStr(schemaResult)
33+
output_string = resultToJSONStr(schemaResult)
3434
} else {
3535
output_string = consoleFormat(schemaResult, {
3636
verbose: options.verbose ? options.verbose : false,
@@ -41,7 +41,7 @@ export async function main(): Promise<ValidationResult> {
4141
if (globalThis.Deno) {
4242
Deno.writeTextFileSync(options.outfile, output_string)
4343
} else {
44-
console.error("Output to file only supported in Deno runtime")
44+
console.error('Output to file only supported in Deno runtime')
4545
console.log(output_string)
4646
}
4747
} else {

src/schema/associations.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ export async function buildAssociations(
163163
try {
164164
file = walkBack(source, inherit, extensions, suffix).next().value
165165
} catch (error) {
166-
if (error && typeof error === 'object' && 'code' in error && error.code === 'MULTIPLE_INHERITABLE_FILES') {
166+
if (
167+
error && typeof error === 'object' && 'code' in error &&
168+
error.code === 'MULTIPLE_INHERITABLE_FILES'
169+
) {
167170
// @ts-expect-error
168171
issues.add(error)
169172
break

src/schema/context.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@ export class BIDSContext implements Context {
184184
try {
185185
sidecars = [...walkBack(this.file)]
186186
} catch (error) {
187-
if (error && typeof error === 'object' && 'code' in error && error.code === 'MULTIPLE_INHERITABLE_FILES') {
187+
if (
188+
error && typeof error === 'object' && 'code' in error &&
189+
error.code === 'MULTIPLE_INHERITABLE_FILES'
190+
) {
188191
// @ts-expect-error
189192
this.dataset.issues.add(error)
190193
} else {

src/setup/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export type ValidatorOptions = {
3232
}
3333

3434
const modalityType = new EnumType<string>(
35-
Object.keys(schema.rules.modalities)
35+
Object.keys(schema.rules.modalities),
3636
)
3737

3838
/** Extendable Cliffy Command with built in BIDS validator options */

src/version.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ export async function getVersion(): Promise<string> {
3434
async function getLocalVersion(path: string): Promise<string> {
3535
// safe.directory setting so we could still operate from another user
3636
try {
37-
const command = new Deno.Command("git", {
37+
const command = new Deno.Command('git', {
3838
args: ['-C', path, '-c', 'safe.directory=*', 'describe', '--tags', '--always'],
3939
})
40-
const { success, stdout } = await command.output();
40+
const { success, stdout } = await command.output()
4141
const description = new TextDecoder().decode(stdout).trim()
4242
return description
43-
} catch(err) {
44-
return ""
43+
} catch (err) {
44+
return ''
4545
}
4646
}
4747

0 commit comments

Comments
 (0)