Skip to content

Commit 97d2104

Browse files
connorsheaCopilot
andauthored
docs(linter): Update comment in lint.rs about default value for tsconfig path (#15530)
It wasn't previously clear what would be done if no tsconfig path was provided, so this clarifies that. This comment will be automatically used by the CLI and documentation website: https://oxc.rs/docs/guide/usage/linter/cli.html#basic-configuration --------- Signed-off-by: Connor Shea <connor.james.shea@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 40c00cd commit 97d2104

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

apps/oxlint/src/command/lint.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ pub struct BasicOptions {
114114
#[bpaf(long, short, argument("./.oxlintrc.json"))]
115115
pub config: Option<PathBuf>,
116116

117-
/// TypeScript `tsconfig.json` path for reading path alias and project references for import plugin
117+
/// TypeScript `tsconfig.json` path for reading path alias and project references for import plugin.
118+
/// If not provided, will look for `tsconfig.json` in the current working directory.
118119
#[bpaf(argument("./tsconfig.json"), hide_usage)]
119120
pub tsconfig: Option<PathBuf>,
120121

tasks/website/src/linter/snapshots/cli.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ expression: snapshot
1414

1515
If not provided, Oxlint will look for `.oxlintrc.json` in the current working directory.
1616
- **` --tsconfig`**=_`<./tsconfig.json>`_ &mdash;
17-
TypeScript `tsconfig.json` path for reading path alias and project references for import plugin
17+
TypeScript `tsconfig.json` path for reading path alias and project references for import plugin. If not provided, will look for `tsconfig.json` in the current working directory.
1818
- **` --init`** &mdash;
1919
Initialize oxlint configuration with default values
2020

tasks/website/src/linter/snapshots/cli_terminal.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Basic Configuration
1010
* you can use comments in configuration files.
1111
* tries to be compatible with the ESLint v8's format
1212
--tsconfig=<./tsconfig.json> TypeScript `tsconfig.json` path for reading path alias and
13-
project references for import plugin
13+
project references for import plugin. If not provided, will look for
14+
`tsconfig.json` in the current working directory.
1415
--init Initialize oxlint configuration with default values
1516

1617
Allowing / Denying Multiple Lints

0 commit comments

Comments
 (0)