Skip to content

Commit edcb7ba

Browse files
committed
disable useTemplate rule
1 parent 7a50011 commit edcb7ba

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

biome.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"enabled": true,
1111
"rules": {
1212
"recommended": true,
13+
"style": {
14+
"useTemplate": "off"
15+
},
1316
"nursery": {
1417
"noCommonJs": "error"
1518
},

cli/rescript/format.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,11 @@ export async function main(argv, rescript_exe, bsc_exe) {
198198
process.exit(2);
199199
}
200200
if (isSupportedStd(use_stdin)) {
201+
const randomHex = crypto.randomBytes(8).toString("hex");
202+
const basename = path.basename(use_stdin);
201203
const filename = path.join(
202204
os.tmpdir(),
203-
`rescript_${crypto.randomBytes(8).toString("hex")}${path.parse(use_stdin).base}`,
205+
`rescript_${randomHex}${basename}`,
204206
);
205207
(async () => {
206208
const content = await readStdin();

tests/build_tests/super_errors/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function postProcessErrorOutput(output) {
2727
result = result.trimEnd();
2828
result = result.replace(
2929
/(?:[A-Z]:)?[\\/][^ ]+?tests[\\/]build_tests[\\/]super_errors[\\/]([^:]+)/g,
30-
(_match, path, _offset, _string) => `/.../${path.replace("\\", "/")}`,
30+
(_match, path, _offset, _string) => "/.../" + path.replace("\\", "/"),
3131
);
3232
return normalizeNewlines(result);
3333
}

0 commit comments

Comments
 (0)