Skip to content

Commit 4bf4bdb

Browse files
committed
chore: nitpick
1 parent d7a28b9 commit 4bf4bdb

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

tests/__snapshots__/fixtures.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class User;attr_accessor :name;end
405405
\`;
406406
407407
// Ruby - Comment \`/* ruby */\` test (with formatting issues)
408-
/* ruby */ \`
408+
const tagTest2 = /* ruby */ \`
409409
def add(a,b) a+b end
410410
\`;
411411
"
@@ -599,7 +599,7 @@ const tagTest = yaml\`
599599
\`;
600600
601601
// YAML - Comment \`/* yaml */\` test (with formatting issues)
602-
/* yaml */ \` server:
602+
const commentTest = /* yaml */ \` server:
603603
host: localhost
604604
port: 3000 \`;
605605
"

tests/fixtures.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ function loadLanguageOptions(languageDir: string): LanguageOptions {
2121
try {
2222
const content = readFileSync(configPath, "utf-8");
2323
return JSON.parse(content);
24-
} catch {
24+
} catch (error) {
25+
console.warn(`Failed to load language options from ${configPath}:`, error);
2526
return {};
2627
}
2728
}
@@ -55,7 +56,8 @@ function parsePrettierOptions(content: string): Record<string, unknown> {
5556
if (match?.[1]) {
5657
try {
5758
return JSON.parse(match[1]);
58-
} catch {
59+
} catch (error) {
60+
console.warn(`Failed to parse @prettier options: ${optionsLine}`, error);
5961
return {};
6062
}
6163
}

tests/fixtures/ruby/basic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ class User;attr_accessor :name;end
55
`;
66

77
// Ruby - Comment `/* ruby */` test (with formatting issues)
8-
/* ruby */ `
8+
const tagTest2 = /* ruby */ `
99
def add(a,b) a+b end
1010
`;

tests/fixtures/yaml/basic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: John
66
`;
77

88
// YAML - Comment `/* yaml */` test (with formatting issues)
9-
/* yaml */ `
9+
const commentTest = /* yaml */ `
1010
server:
1111
host: localhost
1212
port: 3000

0 commit comments

Comments
 (0)