Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion apps/oxlint/src/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ impl CliRunner {
if external_plugin_store.is_empty() {
external_linter = None;
} else {
#[cfg(not(any(test, feature = "force_test_reporter")))]
#[expect(clippy::print_stderr)]
{
eprintln!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@
Found 1 warning and 1 error.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,9 @@
Found 20 warnings and 20 errors.
Finished in Xms on 20 files using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@
Found 2 warnings and 3 errors.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@
Found 2 warnings and 0 errors.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
4 changes: 4 additions & 0 deletions apps/oxlint/test/fixtures/built_in_errors/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
Found 0 warnings and 1 error.
Finished in Xms on 1 file using X threads.
```

# stderr
```
```
4 changes: 4 additions & 0 deletions apps/oxlint/test/fixtures/built_in_no_errors/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
Found 0 warnings and 0 errors.
Finished in Xms on 1 file using X threads.
```

# stderr
```
```
6 changes: 6 additions & 0 deletions apps/oxlint/test/fixtures/context_properties/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@
Found 0 warnings and 6 errors.
Finished in Xms on 2 files using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
6 changes: 6 additions & 0 deletions apps/oxlint/test/fixtures/createOnce/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,9 @@
Found 0 warnings and 42 errors.
Finished in Xms on 2 files using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@
Found 0 warnings and 5 errors.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ Failed to parse configuration file.
| Error: whoops!
| at <root>/apps/oxlint/test/fixtures/custom_plugin_import_error/plugin.js:1:7
```

# stderr
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@
Found 0 warnings and 1 error.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@
Found 0 warnings and 1 error.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ Failed to parse configuration file.
| Error: Whoops!
| at Object.createOnce (<root>/apps/oxlint/test/fixtures/custom_plugin_lint_createOnce_error/plugin.js:8:15)
```

# stderr
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@
Found 0 warnings and 1 error.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@
Found 0 warnings and 1 error.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@
Found 0 warnings and 1 error.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ Failed to parse configuration file.

x Rule 'unknown-rule' not found in plugin 'basic-custom-plugin'
```

# stderr
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@
Found 1 warning and 1 error.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ Failed to build configuration.

x Rule 'missing' not found in plugin 'basic-custom-plugin'
```

# stderr
```
```
4 changes: 4 additions & 0 deletions apps/oxlint/test/fixtures/definePlugin/eslint.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ filename: files/2.js define-plugin-plugin

✖ 35 problems (35 errors, 0 warnings)
```

# stderr
```
```
6 changes: 6 additions & 0 deletions apps/oxlint/test/fixtures/definePlugin/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,9 @@
Found 0 warnings and 35 errors.
Finished in Xms on 2 files using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ filename: files/2.js define-plugin-and-ru

✖ 35 problems (35 errors, 0 warnings)
```

# stderr
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,9 @@
Found 0 warnings and 35 errors.
Finished in Xms on 2 files using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
4 changes: 4 additions & 0 deletions apps/oxlint/test/fixtures/defineRule/eslint.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ filename: files/2.js define-rule-plugin/c

✖ 35 problems (35 errors, 0 warnings)
```

# stderr
```
```
6 changes: 6 additions & 0 deletions apps/oxlint/test/fixtures/defineRule/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,9 @@
Found 0 warnings and 35 errors.
Finished in Xms on 2 files using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
6 changes: 6 additions & 0 deletions apps/oxlint/test/fixtures/estree/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@
Found 0 warnings and 1 error.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
6 changes: 6 additions & 0 deletions apps/oxlint/test/fixtures/fixes/fixes_disabled.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ Found 0 warnings and 12 errors.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```

# Code after
```
debugger;
Expand Down
6 changes: 6 additions & 0 deletions apps/oxlint/test/fixtures/fixes/fixes_enabled.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ Found 0 warnings and 0 errors.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```

# Code after
```

Expand Down
6 changes: 6 additions & 0 deletions apps/oxlint/test/fixtures/load_paths/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@
Found 1 warning and 6 errors.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ Failed to parse configuration file.
x Failed to load JS plugin: ./plugin.js
| Cannot find module './plugin.js'
```

# stderr
```
```
6 changes: 6 additions & 0 deletions apps/oxlint/test/fixtures/utf16_offsets/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,9 @@
Found 3 warnings and 3 errors.
Finished in Xms on 1 file using X threads.
```

# stderr
```
WARNING: JS plugins are experimental and not subject to semver.
Breaking changes are possible while JS plugins support is under development.
```
6 changes: 4 additions & 2 deletions apps/oxlint/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ interface TestFixtureOptions {
export async function testFixtureWithCommand(options: TestFixtureOptions): Promise<void> {
const fixtureDirPath = pathJoin(FIXTURES_DIR_PATH, options.fixtureName);

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

const snapshotPath = pathJoin(fixtureDirPath, `${options.snapshotName}.snap.md`);

stdout = normalizeStdout(stdout);
stderr = normalizeStdout(stderr);
let snapshot = `# Exit code\n${exitCode}\n\n` +
`# stdout\n\`\`\`\n${stdout}\`\`\`\n`;
`# stdout\n\`\`\`\n${stdout}\`\`\`\n\n` +
`# stderr\n\`\`\`\n${stderr}\`\`\`\n`;

if (options.getExtraSnapshotData) {
const extraSnapshots = await options.getExtraSnapshotData(fixtureDirPath);
Expand Down
Loading