feat: add oxlint with correctness defaults (#22682)

This commit is contained in:
Kit Langton
2026-04-15 20:45:19 -04:00
committed by GitHub
parent a554fad232
commit 3d6f90cb53
57 changed files with 165 additions and 122 deletions

View File

@@ -48,7 +48,7 @@ describe("plugin.loader.shared", () => {
file,
[
"export default async () => {",
` await Bun.write(${JSON.stringify(mark)}, \"called\")`,
` await Bun.write(${JSON.stringify(mark)}, "called")`,
" return {}",
"}",
"",
@@ -78,8 +78,8 @@ describe("plugin.loader.shared", () => {
file,
[
"const run = async () => {",
` const text = await Bun.file(${JSON.stringify(mark)}).text().catch(() => \"\")`,
` await Bun.write(${JSON.stringify(mark)}, text + \"1\")`,
` const text = await Bun.file(${JSON.stringify(mark)}).text().catch(() => "")`,
` await Bun.write(${JSON.stringify(mark)}, text + "1")`,
" return {}",
"}",
"export default run",
@@ -715,7 +715,7 @@ describe("plugin.loader.shared", () => {
"const plugin = {",
' id: "demo.object",',
" server: async () => {",
` await Bun.write(${JSON.stringify(mark)}, \"called\")`,
` await Bun.write(${JSON.stringify(mark)}, "called")`,
" return {}",
" },",
"}",
@@ -833,7 +833,7 @@ export default {
"export default {",
' id: "demo.pure",',
" server: async () => {",
` await Bun.write(${JSON.stringify(mark)}, \"called\")`,
` await Bun.write(${JSON.stringify(mark)}, "called")`,
" return {}",
" },",
"}",

View File

@@ -39,7 +39,7 @@ describe("plugin.workspace", () => {
' name: "plug",',
' description: "plugin workspace adaptor",',
" configure(input) {",
` return { ...input, name: \"plug\", branch: \"plug/main\", directory: ${JSON.stringify(space)} }`,
` return { ...input, name: "plug", branch: "plug/main", directory: ${JSON.stringify(space)} }`,
" },",
" async create(input) {",
` await Bun.write(${JSON.stringify(mark)}, JSON.stringify(input))`,