Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Exclude no-import-prefix rule, specify @std/csv version and fix forma…
…tting
  • Loading branch information
tichopad committed Sep 20, 2025
commit 6f2a25f47d6f91bf89fa8d43f5c73e28e44f09dc
3 changes: 2 additions & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"rules": {
"exclude": [
"no-explicit-any",
"camelcase"
"camelcase",
"no-import-prefix"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've run into linter issues with the existing code using inline imports. This rule got added to the default ruleset in Deno 2.5.

My assumption is the project's okay with inline imports, so I decided to exclude the rule instead. Let me know if I should rather refactor inline imports instead.

]
}
},
Expand Down
3 changes: 2 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/test_runner/get_test_runner_code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export function getTestRunnerCode(options: {
// ensure compatibility with esm ("type": "module")
writer.writeLine(`import { createRequire } from 'module';`);
writer.writeLine(`const require = createRequire(import.meta.url);`);
writer.writeLine(`const __dirname = new URL(".", import.meta.url).pathname;`);
writer.writeLine(
`const __dirname = new URL(".", import.meta.url).pathname;`,
);
}

writer.writeLine(`const pc = require("picocolors");`)
Expand Down
2 changes: 1 addition & 1 deletion tests/jsr_project/mod.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. MIT license.

import { parse } from "jsr:@std/csv/parse";
import { parse } from "jsr:@std/csv@1.0.6/parse";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a version specifier to fix a linter error. The version used is based on the latest @std/csv version specified in deno.lock.

import { assertEquals } from "jsr:@std/[email protected]/assert-equals";
import * as fs from "node:fs";

Expand Down
Loading