Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: oxc-project/oxc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a99da348d978d592bb83f1ade038b4efefd8d785
Choose a base ref
..
head repository: oxc-project/oxc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 631301a23d7701aca0d9dfae8f1f08387775c016
Choose a head ref
Showing with 8 additions and 2 deletions.
  1. +2 −2 apps/oxlint/src/command/lint.rs
  2. +3 −0 tasks/website/src/linter/snapshots/cli.snap
  3. +3 −0 tasks/website/src/linter/snapshots/cli_terminal.snap
4 changes: 2 additions & 2 deletions apps/oxlint/src/command/lint.rs
Original file line number Diff line number Diff line change
@@ -70,8 +70,8 @@ pub struct BasicOptions {
pub tsconfig: Option<PathBuf>,

/// The working directory where oxlint should be executed
/// defaults to `env::current_dir()`
#[bpaf(long("working-dir"), hide_usage)]
/// appends the path to the current work directory
#[bpaf(long("working-dir"), argument("./package/sub-package"), hide_usage)]
pub working_dir: Option<PathBuf>,
}

3 changes: 3 additions & 0 deletions tasks/website/src/linter/snapshots/cli.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: tasks/website/src/linter/cli.rs
expression: snapshot
snapshot_kind: text
---
## Usage
**`oxlint`** \[**`-c`**=_`<./oxlintrc.json>`_\] \[_`PATH`_\]...
@@ -12,6 +13,8 @@ expression: snapshot
* tries to be compatible with the ESLint v8's format
- **` --tsconfig`**=_`<./tsconfig.json>`_ &mdash;
TypeScript `tsconfig.json` path for reading path alias and project references for import plugin
- **` --working-dir`**=_`<./package/sub-package>`_ &mdash;
The working directory where oxlint should be executed appends the path to the current work directory



3 changes: 3 additions & 0 deletions tasks/website/src/linter/snapshots/cli_terminal.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: tasks/website/src/linter/cli.rs
expression: snapshot
snapshot_kind: text
---
Usage: [-c=<./oxlintrc.json>] [PATH]...

@@ -10,6 +11,8 @@ Basic Configuration
* tries to be compatible with the ESLint v8's format
--tsconfig=<./tsconfig.json> TypeScript `tsconfig.json` path for reading path alias and
project references for import plugin
--working-dir=<./package/sub-package> The working directory where oxlint should be executed
appends the path to the current work directory

Allowing / Denying Multiple Lints
Accumulate rules and categories from left to right on the command-line.