Skip to content

Commit 51d3840

Browse files
authored
docs(linter): update oxlint CLI help message on .oxlintrc.json config file (#13334)
- Add explicit comment that ` /// * you can use comments in configuration files.` as noted elsewhere in the repo - Update example path for `.oxlintrc.json` to include the leading `.` that the default config file expects
1 parent 6eeeb67 commit 51d3840

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

apps/oxlint/src/command/lint.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,11 @@ impl LintCommand {
107107
pub struct BasicOptions {
108108
/// Oxlint configuration file (experimental)
109109
/// * only `.json` extension is supported
110+
/// * you can use comments in configuration files.
110111
/// * tries to be compatible with the ESLint v8's format
111112
///
112113
/// If not provided, Oxlint will look for `.oxlintrc.json` in the current working directory.
113-
#[bpaf(long, short, argument("./oxlintrc.json"))]
114+
#[bpaf(long, short, argument("./.oxlintrc.json"))]
114115
pub config: Option<PathBuf>,
115116

116117
/// TypeScript `tsconfig.json` path for reading path alias and project references for import plugin

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ source: tasks/website/src/linter/cli.rs
33
expression: snapshot
44
---
55
## Usage
6-
**`oxlint`** \[**`-c`**=_`<./oxlintrc.json>`_\] \[_`PATH`_\]...
6+
**`oxlint`** \[**`-c`**=_`<./.oxlintrc.json>`_\] \[_`PATH`_\]...
77

88
## Basic Configuration
9-
- **`-c`**, **`--config`**=_`<./oxlintrc.json>`_ &mdash;
9+
- **`-c`**, **`--config`**=_`<./.oxlintrc.json>`_ &mdash;
1010
Oxlint configuration file (experimental)
1111
* only `.json` extension is supported
12+
* you can use comments in configuration files.
1213
* tries to be compatible with the ESLint v8's format
1314

1415
If not provided, Oxlint will look for `.oxlintrc.json` in the current working directory.

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
source: tasks/website/src/linter/cli.rs
33
expression: snapshot
44
---
5-
Usage: [-c=<./oxlintrc.json>] [PATH]...
5+
Usage: [-c=<./.oxlintrc.json>] [PATH]...
66

77
Basic Configuration
8-
-c, --config=<./oxlintrc.json> Oxlint configuration file (experimental)
8+
-c, --config=<./.oxlintrc.json> Oxlint configuration file (experimental)
99
* only `.json` extension is supported
10+
* you can use comments in configuration files.
1011
* tries to be compatible with the ESLint v8's format
1112
--tsconfig=<./tsconfig.json> TypeScript `tsconfig.json` path for reading path alias and
1213
project references for import plugin

0 commit comments

Comments
 (0)