Skip to content

Commit adf2231

Browse files
committed
chore: lint fix
1 parent 5020c50 commit adf2231

File tree

10 files changed

+342
-322
lines changed

10 files changed

+342
-322
lines changed

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dist/
2+
node_modules/
3+
coverage/
4+
templates/
5+
reports/
6+
community-reports/
7+
.github/
8+
.exlintrc.js
9+
README.md
10+
docs/

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"tabWidth": 2,
6+
"useTabs": false,
7+
"printWidth": 80,
8+
"bracketSpacing": true,
9+
"arrowParens": "avoid"
10+
}

eslint.config.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// @ts-check
2-
import eslint from "@eslint/js";
3-
import tseslint from "typescript-eslint";
2+
import eslint from '@eslint/js'
3+
import tseslint from 'typescript-eslint'
44

55
export default tseslint.config(
66
eslint.configs.recommended,
77
...tseslint.configs.recommended,
88
{
9-
ignores: ["node_modules", "ctrf", "dist"],
9+
ignores: ['node_modules', 'ctrf', 'dist'],
1010
},
1111
{
1212
rules: {
13-
"@typescript-eslint/no-explicit-any": "warn",
13+
'@typescript-eslint/no-explicit-any': 'warn',
1414
},
15-
},
16-
);
15+
}
16+
)

src/cli.ts

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
11
#!/usr/bin/env node
22

3-
import yargs from "yargs";
4-
import { hideBin } from "yargs/helpers";
5-
import { convertJUnitToCTRFReport } from "./convert.js";
3+
import yargs from 'yargs'
4+
import { hideBin } from 'yargs/helpers'
5+
import { convertJUnitToCTRFReport } from './convert.js'
66

77
void yargs(hideBin(process.argv))
8-
.usage("Usage: $0 <junit.xml> [options]")
8+
.usage('Usage: $0 <junit.xml> [options]')
99
.command(
10-
"$0 <pattern>",
11-
"Convert JUnit XML report(s) to CTRF",
12-
(yargs) => {
10+
'$0 <pattern>',
11+
'Convert JUnit XML report(s) to CTRF',
12+
yargs => {
1313
return yargs
14-
.positional("pattern", {
14+
.positional('pattern', {
1515
describe:
1616
'Glob pattern to match JUnit XML files (e.g., "test-results/**/*.xml")',
17-
type: "string",
17+
type: 'string',
1818
demandOption: true,
1919
})
20-
.option("output", {
21-
alias: "o",
22-
type: "string",
23-
default: "ctrf/ctrf-report.json",
24-
description: "Output directory and filename for the CTRF report",
20+
.option('output', {
21+
alias: 'o',
22+
type: 'string',
23+
default: 'ctrf/ctrf-report.json',
24+
description: 'Output directory and filename for the CTRF report',
2525
})
26-
.option("tool", {
27-
alias: "t",
28-
type: "string",
29-
description: "Tool name",
26+
.option('tool', {
27+
alias: 't',
28+
type: 'string',
29+
description: 'Tool name',
3030
})
31-
.option("env", {
32-
alias: "e",
33-
type: "array",
34-
description: "Environment properties",
31+
.option('env', {
32+
alias: 'e',
33+
type: 'array',
34+
description: 'Environment properties',
3535
})
36-
.option("use-suite-name", {
37-
alias: "u",
38-
type: "boolean",
36+
.option('use-suite-name', {
37+
alias: 'u',
38+
type: 'boolean',
3939
default: true,
40-
description: "Use suite name in the test name",
41-
});
40+
description: 'Use suite name in the test name',
41+
})
4242
},
43-
async (argv) => {
43+
async argv => {
4444
try {
45-
const { pattern, output, tool, env, useSuiteName } = argv;
45+
const { pattern, output, tool, env, useSuiteName } = argv
4646
await convertJUnitToCTRFReport(pattern as string, {
4747
outputPath: output as string,
4848
toolName: tool as string,
4949
envProps: env as string[],
5050
useSuiteName: useSuiteName as boolean,
5151
log: true,
52-
});
53-
console.log("Conversion completed successfully.");
52+
})
53+
console.log('Conversion completed successfully.')
5454
} catch (error: unknown) {
55-
const message = error instanceof Error ? error.message : String(error);
56-
console.error("Error:", message);
55+
const message = error instanceof Error ? error.message : String(error)
56+
console.error('Error:', message)
5757
}
58-
},
58+
}
5959
)
60-
.help().argv;
60+
.help().argv

0 commit comments

Comments
 (0)