Skip to content
Merged
Changes from all commits
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
14 changes: 12 additions & 2 deletions apps/oxlint/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
fix: boolean;
// Run Oxlint single-threaded. Default: `false`.
singleThread: boolean;
// Run Oxlint/ESLint in a specific working directory.
// If provided, `cwd` is relative to the fixture's directory.
// Default: `null`.
cwd: string | null;
};
}

Expand All @@ -38,6 +42,7 @@
eslint: false,
fix: false,
singleThread: false,
cwd: null,
};

/**
Expand Down Expand Up @@ -78,6 +83,9 @@
"`oxlint`, `eslint`, `fix`, and `singleThread` properties in `options.json` must be booleans",
);
}
if (options.cwd !== null && typeof options.cwd !== "string") {
throw new TypeError("`cwd` property in `options.json` must be a string or null");
}

fixtures.push({ name, dirPath, options });
}
Expand Down Expand Up @@ -107,7 +115,7 @@
*/
export async function testFixtureWithCommand(options: TestFixtureOptions): Promise<void> {
const { expect = defaultExpect } = options;
const { name: fixtureName, dirPath } = options.fixture,
const { name: fixtureName, dirPath, options: fixtureOptions } = options.fixture,
pathPrefixLen = dirPath.length + 1;

// Read all the files in fixture's directory
Expand All @@ -127,8 +135,10 @@
);

// Run command
const cwd = fixtureOptions.cwd === null ? dirPath : pathJoin(dirPath, fixtureOptions.cwd);

let { stdout, stderr, exitCode } = await execa(options.command, options.args, {
cwd: dirPath,
cwd,
reject: false,
});

Expand Down Expand Up @@ -163,7 +173,7 @@
}
}

await expect(snapshot).toMatchFileSnapshot(snapshotPath);

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: context_wrapping

Error: Snapshot `oxlint CLI > fixture: context_wrapping 1` mismatched - Expected + Received @@ -1,72 +1,14 @@ # Exit code 1 # stdout ``` - x wrapped-context(wrapped-rule): wrapped 1: filename: <fixture>/files/index.js - ,-[files/index.js:1:1] - 1 | console.log("Hello, world!"); - : ^ - `---- - - x wrapped-context(wrapped-rule): wrapped 1: id: wrapped-context/wrapped-rule - ,-[files/index.js:1:1] - 1 | console.log("Hello, world!"); - : ^ - `---- - - x wrapped-context(wrapped-rule): wrapped 1: source text: "console.log(\"Hello, world!\");\n" - ,-[files/index.js:1:1] - 1 | console.log("Hello, world!"); - : ^ - `---- - - x wrapped-context(wrapped-rule2): wrapped 2: filename: <fixture>/files/index.js - ,-[files/index.js:1:1] - 1 | console.log("Hello, world!"); - : ^ - `---- - - x wrapped-context(wrapped-rule2): wrapped 2: id: wrapped-context/wrapped-rule2 - ,-[files/index.js:1:1] - 1 | console.log("Hello, world!"); - : ^ - `---- - - x wrapped-context(wrapped-rule2): wrapped 2: source text: "console.log(\"Hello, world!\");\n" - ,-[files/index.js:1:1] + Failed to parse oxlint configuration file. + + x Failed to load JS plugin: ./plugin.ts - 1 | console.log("Hello, world!"); - : ^ - `---- - - x wrapped-context(wrapped-rule): wrapped 1: Identifier: 'console' - ,-[files/index.js:1:1] - 1 | console.log("Hello, world!"); - : ^^^^^^^ - `---- - - x wrapped-context(wrapped-rule2): wrapped 2: Identifier: 'console' - ,-[files/index.js:1:1] - 1 | console.log("Hello, world!"); - : ^^^^^^^ - `---- - - x wrapped-context(wrapped-rule): wrapped 1: Identifier: 'log' - ,-[files/index.js:1:9] - 1 | console.log("Hello, world!"); - : ^^^ - `---- - - x wrapped-context(wrapped-rule2): wrapped 2: Identifier: 'log' - ,-[files/index.js:1:9] - 1 | console.log("Hello, world!"); - : ^^^ - `---- - - Found 0 warnings and 10 errors. - Finished in Xms on 1 file with 2 rules using X threads. + | Error: Plugin url must belong to a workspace ``` # stderr ``` WARNING: JS plugins are experimental and not subject to semver. ❯ testFixtureWithCommand test/utils.ts:176:3 ❯ runFixture test/e2e.test.ts:46:3

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: context_properties

Error: Snapshot `oxlint CLI > fixture: context_properties 1` mismatched - Expected + Received @@ -1,56 +1,14 @@ # Exit code 1 # stdout ``` - x context-plugin(log-context): - | this === rule: true - | id: context-plugin/log-context - | filename: <fixture>/files/1.js - | getFilename(): <fixture>/files/1.js - | physicalFilename: <fixture>/files/1.js - | getPhysicalFilename(): <fixture>/files/1.js - | cwd: <fixture> - | getCwd(): <fixture> - | parserPath: undefined - ,-[files/1.js:1:1] - 1 | let x; - : ^ - `---- - - x context-plugin(log-context): - | this === undefined: true - ,-[files/1.js:1:1] - 1 | let x; - : ^^^^^^ - `---- - - x context-plugin(log-context): - | this === rule: true - | id: context-plugin/log-context - | filename: <fixture>/files/2.js - | getFilename(): <fixture>/files/2.js - | physicalFilename: <fixture>/files/2.js - | getPhysicalFilename(): <fixture>/files/2.js - | cwd: <fixture> - | getCwd(): <fixture> - | parserPath: undefined - ,-[files/2.js:1:1] - 1 | let y; - : ^ - `---- - - x context-plugin(log-context): - | this === undefined: true - ,-[files/2.js:1:1] - 1 | let y; - : ^^^^^^ - `---- - - Found 0 warnings and 4 errors. - Finished in Xms on 2 files with 1 rules using X threads. + Failed to parse oxlint configuration file. + + x Failed to load JS plugin: ./plugin.ts + | Error: Plugin url must belong to a workspace ``` # stderr ``` WARNING: JS plugins are experimental and not subject to semver. ❯ testFixtureWithCommand test/utils.ts:176:3 ❯ runFixture test/e2e.test.ts:46:3

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: comments

Error: Snapshot `oxlint CLI > fixture: comments 1` mismatched - Expected + Received @@ -1,464 +1,14 @@ # Exit code 1 # stdout ``` - x test-comments(test-comments): VariableDeclaration(topLevelVariable1): - | getCommentsBefore: 0 comments - | getCommentsInside: 0 comments - | getCommentsAfter: 1 comment - | [0] Line: " Line comment 1" at [29, 46] - | commentsExistBetween(id, init): false - ,-[files/comments.js:1:1] - 1 | const topLevelVariable1 = 1; - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 2 | // Line comment 1 - `---- - - x test-comments(test-comments): getAllComments: 12 comments - | [0] Line: " Line comment 1" at [29, 46] - | [1] Block: " Block comment 1 " at [76, 97] - | [2] Block: "*\n * JSDoc comment\n " at [99, 123] - | [3] Line: " Line comment 2" at [163, 180] - | [4] Block: " Block comment 2 " at [183, 204] - | [5] Block: "*\n * JSDoc comment 2\n " at [256, 286] - | [6] Line: " Line comment 3" at [321, 338] - | [7] Line: " Line comment 4" at [405, 422] - | [8] Block: " Block comment 3 " at [426, 447] - | [9] Block: " Block comment 4 " at [474, 495] - | [10] Line: " Line comment 5" at [559, 576] - | [11] Line: " Line comment 6" at [577, 594] - ,-[files/comments.js:1:1] - 1 | ,-> const topLevelVariable1 = 1; - 2 | | // Line comment 1 - 3 | | const topLevelVariable2 = 2; /* Block comment 1 */ - 4 | | - 5 | | /** - 6 | | * JSDoc comment - 7 | | */ - 8 | | export function topLevelFunction() { - 9 | | // Line comment 2 - 10 | | /* Block comment 2 */ - 11 | | let functionScopedVariable = topLevelVariable; - 12 | | /** - 13 | | * JSDoc comment 2 - 14 | | */ - 15 | | function nestedFunction() { - 16 | | // Line comment 3 - 17 | | return functionScopedVariable; - 18 | | } - 19 | | return nestedFunction(); // Line comment 4 - 20 | | } - 21 | | - 22 | | /* Block comment 3 */ - 23 | | const topLevelVariable3 = /* Block comment 4 */ 3; - 24 | | - 25 | | const topLevelVariable4 = 4; - 26 | | const topLevelVariable5 = 5; - 27 | | - 28 | | // Line comment 5 - 29 | | // Line comment 6 - 30 | | - 31 | | const topLevelVariable6 = 6; - 32 | `-> const topLevelVariable7 = 7; - `---- - - x test-comments(test-comments): VariableDeclaration(topLevelVariable2): - | getCommentsBefore: 1 comment - | [0] Line: " Line comment 1" at [29, 46] - | getCommentsInside: 0 comments - | getCommentsAfter: 2 comments - | [0] Block: " Block comment 1 " at [76, 97] - | [1] Block: "*\n * JSDoc comment\n " at [99, 123] - | commentsExistBetween(id, init): false - ,-[files/comments.js:3:1] - 2 | // Line comment 1 - 3 | const topLevelVariable2 = 2; /* Block comment 1 */ - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 4 | - `---- - - x test-comments(test-comments): commentsExistBetween(topLevelVariable2, topLevelFunction): true - ,-[files/comments.js:3:1] - 2 | // Line comment 1 - 3 | const topLevelVariable2 = 2; /* Block comment 1 */ - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 4 | - `---- - - x test-comments(test-comments): commentsExistBetween(topLevelFunction, topLevelVariable2): false - ,-[files/comments.js:8:8] - 7 | */ - 8 | ,-> export function topLevelFunction() { - 9 | | // Line comment 2 - 10 | | /* Block comment 2 */ - 11 | | let functionScopedVariable = topLevelVariable; - 12 | | /** - 13 | | * JSDoc comment 2 - 14 | | */ - 15 | | function nestedFunction() { - 16 | | // Line comment 3 - 17 | | return functionScopedVariable; - 18 | | } - 19 | | return nestedFunction(); // Line comment 4 - 20 | `-> } - 21 | - `---- - - x test-comments(test-comments): FunctionDeclaration(topLevelFunction): - | getCommentsBefore: 0 comments - | getCommentsInside: 5 comments - | [0] Line: " Line comment 2" at [163, 180] - | [1] Block: " Block comment 2 " at [183, 204] - | [2] Block: "*\n * JSDoc comment 2\n " at [

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: cfg

Error: Snapshot `oxlint CLI > fixture: cfg 1` mismatched - Expected + Received @@ -1,29 +1,14 @@ # Exit code 1 # stdout ``` - x cfg-plugin(cfg): Visited nodes: - | * onCodePathStart Program - | * onCodePathSegmentStart Program - | * onCodePathSegmentEnd Literal - | * onCodePathSegmentStart Literal - | * onCodePathSegmentEnd BlockStatement - | * onCodePathSegmentStart BlockStatement - | * onCodePathSegmentLoop WhileStatement - | * onCodePathSegmentEnd WhileStatement - | * onUnreachableCodePathSegmentStart WhileStatement - | * onUnreachableCodePathSegmentEnd Program - | * onCodePathEnd Program - ,-[files/index.js:1:1] - 1 | while (true) {} - : ^^^^^^^^^^^^^^^^ - `---- - - Found 0 warnings and 1 error. - Finished in Xms on 1 file with 2 rules using X threads. + Failed to parse oxlint configuration file. + + x Failed to load JS plugin: ./plugin.ts + | Error: Plugin url must belong to a workspace ``` # stderr ``` WARNING: JS plugins are experimental and not subject to semver. ❯ testFixtureWithCommand test/utils.ts:176:3 ❯ runFixture test/e2e.test.ts:46:3

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: bom

Error: Snapshot `oxlint CLI > fixture: bom 1` mismatched - Expected + Received @@ -1,142 +1,14 @@ # Exit code 1 # stdout ``` - x bom-plugin(bom): Debugger statement at 0-9 - ,-[files/bom.js:1:4] - 1 | debugger; - : ^^^^^^^^^ - 2 | debugger; - `---- - - x bom-plugin(bom): - | hasBOM: true - | sourceText: "debugger;\ndebugger;\ndebugger;" - | Program span: 0-29 - ,-[files/bom.js:1:4] - 1 | ,-> debugger; - 2 | | debugger; - 3 | `-> debugger; - `---- - - x bom-plugin(bom): Debugger statement at 10-19 - ,-[files/bom.js:2:1] - 1 | debugger; - 2 | debugger; - : ^^^^^^^^^ - 3 | debugger; - `---- - - x bom-plugin(bom): Debugger statement at 20-29 - ,-[files/bom.js:3:1] - 2 | debugger; - 3 | debugger; - : ^^^^^^^^^ - `---- - - x bom-plugin(bom): Debugger statement at 0-9 - ,-[files/bom_unicode.js:1:4] - 1 | debugger; - : ^^^^^^^^^ - 2 | // 😀🤪😆😎🤮 - `---- - - x bom-plugin(bom): - | hasBOM: true - | sourceText: "debugger;\n// 😀🤪😆😎🤮\ndebugger;\ndebugger;" - | Program span: 0-43 - ,-[files/bom_unicode.js:1:4] - 1 | ,-> debugger; - 2 | | // 😀🤪😆😎🤮 - 3 | | debugger; - 4 | `-> debugger; - `---- - - x bom-plugin(bom): Debugger statement at 24-33 - ,-[files/bom_unicode.js:3:1] - 2 | // 😀🤪😆😎🤮 - 3 | debugger; - : ^^^^^^^^^ - 4 | debugger; - `---- - - x bom-plugin(bom): Debugger statement at 34-43 - ,-[files/bom_unicode.js:4:1] - 3 | debugger; - 4 | debugger; - : ^^^^^^^^^ - `---- - - x bom-plugin(bom): Debugger statement at 0-9 - ,-[files/no_bom.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - 2 | debugger; - `---- - - x bom-plugin(bom): - | hasBOM: false - | sourceText: "debugger;\ndebugger;\ndebugger;" - | Program span: 0-29 - ,-[files/no_bom.js:1:1] - 1 | ,-> debugger; - 2 | | debugger; - 3 | `-> debugger; - `---- - - x bom-plugin(bom): Debugger statement at 10-19 - ,-[files/no_bom.js:2:1] - 1 | debugger; - 2 | debugger; - : ^^^^^^^^^ - 3 | debugger; - `---- - - x bom-plugin(bom): Debugger statement at 20-29 - ,-[files/no_bom.js:3:1] + Failed to parse oxlint configuration file. + + x Failed to load JS plugin: ./plugin.ts - 2 | debugger; - 3 | debugger; - : ^^^^^^^^^ - `---- - - x bom-plugin(bom): Debugger statement at 0-9 - ,-[files/no_bom_unicode.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - 2 | // 😀🤪😆😎🤮 - `---- - - x bom-plugin(bom): - | hasBOM: false - | sourceText: "debugger;\n// 😀🤪😆😎🤮\ndebugger;\ndebugger;" - | Program span: 0-43 - ,-[files/no_bom_unicode.js:1:1] - 1 | ,-> debugger; - 2 | | // 😀🤪😆😎🤮 - 3 | | debugger; - 4 | `-> debugger; - `---- - - x bom-plugin(bom): Debugger statement at 24-33 - ,-[files/no_bom_unicode.js:3:1] - 2 | // 😀🤪😆😎🤮 - 3 | debugger; - : ^^^^^^^^^ - 4 | debugger; - `---- - - x bom-plugin(bom): Debugger statement at 34-43 - ,-[files/no_bom_unicode.js:4:1] - 3 | debugger; - 4 | debugger; - : ^^^^^^^^^ - `---- - - Found 0 warnings and 16 errors. - Finished in Xms on 4 files with 1 rules using X threads. + | Error: Plugin url must belong to a workspace ``` # stderr ``` WARNING: JS plugins are experimental and not subject to semver. ❯ testFixtureWithCommand test/utils.ts:176:3 ❯ runFixture test/e2e.test.ts:46:3

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: basic_warn_severity

Error: Snapshot `oxlint CLI > fixture: basic_warn_severity 1` mismatched - Expected + Received @@ -1,25 +1,14 @@ # Exit code - 0 + 1 # stdout ``` - ! basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/index.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/index.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - Found 2 warnings and 0 errors. - Finished in Xms on 1 file with 2 rules using X threads. + Failed to parse oxlint configuration file. + + x Failed to load JS plugin: ./plugin.ts + | Error: Plugin url must belong to a workspace ``` # stderr ``` WARNING: JS plugins are experimental and not subject to semver. ❯ testFixtureWithCommand test/utils.ts:176:3 ❯ runFixture test/e2e.test.ts:46:3

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: basic_no_errors

Error: Snapshot `oxlint CLI > fixture: basic_no_errors 1` mismatched - Expected + Received @@ -1,12 +1,14 @@ # Exit code - 0 + 1 # stdout ``` - Found 0 warnings and 0 errors. - Finished in Xms on 1 file with 1 rules using X threads. + Failed to parse oxlint configuration file. + + x Failed to load JS plugin: ./plugin.ts + | Error: Plugin url must belong to a workspace ``` # stderr ``` WARNING: JS plugins are experimental and not subject to semver. ❯ testFixtureWithCommand test/utils.ts:176:3 ❯ runFixture test/e2e.test.ts:46:3

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: basic_multiple_rules

Error: Snapshot `oxlint CLI > fixture: basic_multiple_rules 1` mismatched - Expected + Received @@ -1,41 +1,14 @@ # Exit code 1 # stdout ``` - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/index.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - 2 | - `---- - - x basic-custom-plugin(no-debugger-2): Unexpected Debugger Statement - ,-[files/index.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - 2 | - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/index.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - 2 | - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-identifiers-named-foo): Unexpected Identifier named foo - ,-[files/index.js:3:1] + Failed to parse oxlint configuration file. + + x Failed to load JS plugin: ./plugin.ts - 2 | - 3 | foo; - : ^^^ - `---- - - Found 1 warning and 3 errors. - Finished in Xms on 1 file with 4 rules using X threads. + | Error: Plugin url must belong to a workspace ``` # stderr ``` WARNING: JS plugins are experimental and not subject to semver. ❯ testFixtureWithCommand test/utils.ts:176:3 ❯ runFixture test/e2e.test.ts:46:3

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: basic_many_files

Error: Snapshot `oxlint CLI > fixture: basic_many_files 1` mismatched - Expected + Received @@ -1,272 +1,14 @@ # Exit code 1 # stdout ``` - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/01.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/01.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/02.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/02.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/03.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/03.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/04.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/04.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/05.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/05.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/06.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/06.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/07.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/07.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/08.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/08.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/09.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/09.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/10.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/10.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/11.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/11.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/12.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/12.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/13.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - -

Check failure on line 176 in apps/oxlint/test/utils.ts

View workflow job for this annotation

GitHub Actions / Test NAPI (windows)

test/e2e.test.ts > oxlint CLI > fixture: basic

Error: Snapshot `oxlint CLI > fixture: basic 1` mismatched - Expected + Received @@ -1,25 +1,14 @@ # Exit code 1 # stdout ``` - x basic-custom-plugin(no-debugger): Unexpected Debugger Statement - ,-[files/index.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - - ! eslint(no-debugger): `debugger` statement is not allowed - ,-[files/index.js:1:1] - 1 | debugger; - : ^^^^^^^^^ - `---- - help: Remove the debugger statement - - Found 1 warning and 1 error. - Finished in Xms on 1 file with 92 rules using X threads. + Failed to parse oxlint configuration file. + + x Failed to load JS plugin: ./plugin.ts + | Error: Plugin url must belong to a workspace ``` # stderr ``` WARNING: JS plugins are experimental and not subject to semver. ❯ testFixtureWithCommand test/utils.ts:176:3 ❯ runFixture test/e2e.test.ts:46:3
}

// Regexp to match paths in output.
Expand Down
Loading