Skip to content

Commit b96a9e1

Browse files
authored
Release 1.33.0 (#704)
1 parent 3f087fd commit b96a9e1

File tree

636 files changed

+7590
-6230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

636 files changed

+7590
-6230
lines changed

src/docs/guide/usage/formatter/generated-cli.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,43 @@ search: false
66

77
**`oxfmt`** \[**`-c`**=_`PATH`_\] \[_`PATH`_\]...
88

9-
## Output Options
9+
## Mode Options:
1010

11-
- **`--check`** —
12-
Check mode - check if files are formatted, also show statistics
13-
- **`--list-different`** —
14-
List mode - list files that would be changed
11+
- **` --init`** —
12+
Initialize `.oxfmtrc.json` with default values
13+
- **` --migrate`**=_`SOURCE`_ —
14+
Migrate configuration to `.oxfmtrc.json` from specified source Available sources: prettier
15+
- **` --lsp`** —
16+
Start language server protocol (LSP) server
17+
- **` --stdin-filepath`**=_`PATH`_ —
18+
Specify the file name to use to infer which parser to use
19+
20+
## Output Options:
1521

16-
## Basic Options
22+
- **` --write`** —
23+
Format and write files in place (default)
24+
- **` --check`** —
25+
Check if files are formatted, also show statistics
26+
- **` --list-different`** —
27+
List files that would be changed
28+
29+
## Config Options
1730

1831
- **`-c`**, **`--config`**=_`PATH`_ —
1932
Path to the configuration file
2033

2134
## Ignore Options
2235

23-
- **`--ignore-path`**=_`PATH`_ —
36+
- **` --ignore-path`**=_`PATH`_ —
2437
Path to ignore file(s). Can be specified multiple times. If not specified, .gitignore and .prettierignore in the current directory are used.
25-
- **`--with-node-modules`** —
38+
- **` --with-node-modules`** —
2639
Format code in node_modules directory (skipped by default)
2740

28-
## Misc Options
41+
## Runtime Options
2942

30-
- **`--lsp`** —
31-
Start language server protocol (LSP) server
32-
- **`--no-error-on-unmatched-pattern`** —
43+
- **` --no-error-on-unmatched-pattern`** —
3344
Do not exit with error when pattern is unmatched
34-
- **`--threads`**=_`INT`_ —
45+
- **` --threads`**=_`INT`_ —
3546
Number of threads to use. Set to 1 for using only 1 CPU core.
3647

3748
## Available positional items:

src/docs/guide/usage/formatter/generated-config.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,42 @@
22
search: false
33
---
44

5-
# Configuration options for the formatter.
5+
# Configuration options for the Oxfmt.
66

77
Most options are the same as Prettier's options.
88
See also <https://prettier.io/docs/options>
9+
But some options are our own extensions.
910

1011
## arrowParens
1112

1213
type: `string | null`
1314

14-
Include parentheses around a sole arrow function parameter. (Default: "always")
15+
Include parentheses around a sole arrow function parameter. (Default: `"always"`)
1516

1617
## bracketSameLine
1718

1819
type: `boolean | null`
1920

20-
Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line. (Default: false)
21+
Put the `>` of a multi-line JSX element at the end of the last line
22+
instead of being alone on the next line. (Default: `false`)
2123

2224
## bracketSpacing
2325

2426
type: `boolean | null`
2527

26-
Print spaces between brackets in object literals. (Default: true)
28+
Print spaces between brackets in object literals. (Default: `true`)
2729

2830
## embeddedLanguageFormatting
2931

3032
type: `string | null`
3133

32-
Control whether formats quoted code embedded in the file. (Default: "auto")
34+
Control whether formats quoted code embedded in the file. (Default: `"auto"`)
3335

3436
## endOfLine
3537

3638
type: `string | null`
3739

38-
Which end of line characters to apply. (Default: "lf")
40+
Which end of line characters to apply. (Default: `"lf"`)
3941

4042
## experimentalSortImports
4143

@@ -93,6 +95,12 @@ type: `boolean`
9395

9496
default: `false`
9597

98+
## experimentalSortPackageJson
99+
100+
type: `boolean | null`
101+
102+
Experimental: Sort `package.json` keys. (Default: `true`)
103+
96104
## ignorePatterns
97105

98106
type: `string[]`
@@ -103,59 +111,59 @@ Ignore files matching these glob patterns. Current working directory is used as
103111

104112
type: `boolean | null`
105113

106-
Use single quotes instead of double quotes in JSX. (Default: false)
114+
Use single quotes instead of double quotes in JSX. (Default: `false`)
107115

108116
## objectWrap
109117

110118
type: `string | null`
111119

112-
How to wrap object literals when they could fit on one line or span multiple lines. (Default: "preserve")
113-
NOTE: In addition to Prettier's "preserve" and "collapse", we also support "always".
120+
How to wrap object literals when they could fit on one line or span multiple lines. (Default: `"preserve"`)
121+
NOTE: In addition to Prettier's `"preserve"` and `"collapse"`, we also support `"always"`.
114122

115123
## printWidth
116124

117125
type: `integer | null`
118126

119-
The line length that the printer will wrap on. (Default: 100)
127+
The line length that the printer will wrap on. (Default: `100`)
120128

121129
## quoteProps
122130

123131
type: `string | null`
124132

125-
Change when properties in objects are quoted. (Default: "as-needed")
133+
Change when properties in objects are quoted. (Default: `"as-needed"`)
126134

127135
## semi
128136

129137
type: `boolean | null`
130138

131-
Print semicolons at the ends of statements. (Default: true)
139+
Print semicolons at the ends of statements. (Default: `true`)
132140

133141
## singleAttributePerLine
134142

135143
type: `boolean | null`
136144

137-
Put each attribute on a new line in JSX. (Default: false)
145+
Put each attribute on a new line in JSX. (Default: `false`)
138146

139147
## singleQuote
140148

141149
type: `boolean | null`
142150

143-
Use single quotes instead of double quotes. (Default: false)
151+
Use single quotes instead of double quotes. (Default: `false`)
144152

145153
## tabWidth
146154

147155
type: `integer | null`
148156

149-
Number of spaces per indentation level. (Default: 2)
157+
Number of spaces per indentation level. (Default: `2`)
150158

151159
## trailingComma
152160

153161
type: `string | null`
154162

155-
Print trailing commas wherever possible. (Default: "all")
163+
Print trailing commas wherever possible. (Default: `"all"`)
156164

157165
## useTabs
158166

159167
type: `boolean | null`
160168

161-
Use tabs for indentation or spaces. (Default: false)
169+
Use tabs for indentation or spaces. (Default: `false`)

src/docs/guide/usage/linter/generated-cli.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ search: false
1717

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

20-
- **`--tsconfig`**=_`<./tsconfig.json>`_ &mdash;
20+
- **` --tsconfig`**=_`<./tsconfig.json>`_ &mdash;
2121
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.
22-
- **`--init`** &mdash;
22+
- **` --init`** &mdash;
2323
Initialize oxlint configuration with default values
2424

2525
## Allowing / Denying Multiple Lints
@@ -49,66 +49,66 @@ Arguments:
4949

5050
## Enable/Disable Plugins
5151

52-
- **`--disable-unicorn-plugin`** &mdash;
52+
- **` --disable-unicorn-plugin`** &mdash;
5353
Disable unicorn plugin, which is turned on by default
54-
- **`--disable-oxc-plugin`** &mdash;
54+
- **` --disable-oxc-plugin`** &mdash;
5555
Disable oxc unique rules, which is turned on by default
56-
- **`--disable-typescript-plugin`** &mdash;
56+
- **` --disable-typescript-plugin`** &mdash;
5757
Disable TypeScript plugin, which is turned on by default
58-
- **`--import-plugin`** &mdash;
58+
- **` --import-plugin`** &mdash;
5959
Enable import plugin and detect ESM problems. It is recommended to use alongside the `--tsconfig` option.
60-
- **`--react-plugin`** &mdash;
60+
- **` --react-plugin`** &mdash;
6161
Enable react plugin, which is turned off by default
62-
- **`--jsdoc-plugin`** &mdash;
62+
- **` --jsdoc-plugin`** &mdash;
6363
Enable jsdoc plugin and detect JSDoc problems
64-
- **`--jest-plugin`** &mdash;
64+
- **` --jest-plugin`** &mdash;
6565
Enable the Jest plugin and detect test problems
66-
- **`--vitest-plugin`** &mdash;
66+
- **` --vitest-plugin`** &mdash;
6767
Enable the Vitest plugin and detect test problems
68-
- **`--jsx-a11y-plugin`** &mdash;
68+
- **` --jsx-a11y-plugin`** &mdash;
6969
Enable the JSX-a11y plugin and detect accessibility problems
70-
- **`--nextjs-plugin`** &mdash;
70+
- **` --nextjs-plugin`** &mdash;
7171
Enable the Next.js plugin and detect Next.js problems
72-
- **`--react-perf-plugin`** &mdash;
72+
- **` --react-perf-plugin`** &mdash;
7373
Enable the React performance plugin and detect rendering performance problems
74-
- **`--promise-plugin`** &mdash;
74+
- **` --promise-plugin`** &mdash;
7575
Enable the promise plugin and detect promise usage problems
76-
- **`--node-plugin`** &mdash;
76+
- **` --node-plugin`** &mdash;
7777
Enable the node plugin and detect node usage problems
78-
- **`--vue-plugin`** &mdash;
78+
- **` --vue-plugin`** &mdash;
7979
Enable the vue plugin and detect vue usage problems
8080

8181
## Fix Problems
8282

83-
- **`--fix`** &mdash;
83+
- **` --fix`** &mdash;
8484
Fix as many issues as possible. Only unfixed issues are reported in the output.
85-
- **`--fix-suggestions`** &mdash;
85+
- **` --fix-suggestions`** &mdash;
8686
Apply auto-fixable suggestions. May change program behavior.
87-
- **`--fix-dangerously`** &mdash;
87+
- **` --fix-dangerously`** &mdash;
8888
Apply dangerous fixes and suggestions
8989

9090
## Ignore Files
9191

92-
- **`--ignore-path`**=_`PATH`_ &mdash;
92+
- **` --ignore-path`**=_`PATH`_ &mdash;
9393
Specify the file to use as your `.eslintignore`
94-
- **`--ignore-pattern`**=_`PAT`_ &mdash;
94+
- **` --ignore-pattern`**=_`PAT`_ &mdash;
9595
Specify patterns of files to ignore (in addition to those in `.eslintignore`)
9696

9797
The supported syntax is the same as for `.eslintignore` and `.gitignore` files. You should quote your patterns in order to avoid shell interpretation of glob patterns.
9898

99-
- **`--no-ignore`** &mdash;
99+
- **` --no-ignore`** &mdash;
100100
Disable excluding files from `.eslintignore` files, **`--ignore-path`** flags and **`--ignore-pattern`** flags
101101

102102
> [!NOTE]
103103
> `.gitignore` is only respected inside a Git repository.
104104
105105
## Handle Warnings
106106

107-
- **`--quiet`** &mdash;
107+
- **` --quiet`** &mdash;
108108
Disable reporting on warnings, only errors are reported
109-
- **`--deny-warnings`** &mdash;
109+
- **` --deny-warnings`** &mdash;
110110
Ensure warnings produce a non-zero exit code
111-
- **`--max-warnings`**=_`INT`_ &mdash;
111+
- **` --max-warnings`**=_`INT`_ &mdash;
112112
Specify a warning threshold, which can be used to force exit with an error status if there are too many warning-level rule violations in your project
113113

114114
## Output
@@ -118,18 +118,18 @@ Arguments:
118118

119119
## Miscellaneous
120120

121-
- **`--silent`** &mdash;
121+
- **` --silent`** &mdash;
122122
Do not display any diagnostics
123-
- **`--threads`**=_`INT`_ &mdash;
123+
- **` --threads`**=_`INT`_ &mdash;
124124
Number of threads to use. Set to 1 for using only 1 CPU core.
125-
- **`--print-config`** &mdash;
125+
- **` --print-config`** &mdash;
126126
This option outputs the configuration to be used. When present, no linting is performed and only config-related options are valid.
127127

128128
## Inline Configuration Comments
129129

130-
- **`--report-unused-disable-directives`** &mdash;
130+
- **` --report-unused-disable-directives`** &mdash;
131131
Report directive comments like `// oxlint-disable-line`, when no errors would have been reported on that line anyway
132-
- **`--report-unused-disable-directives-severity`**=_`SEVERITY`_ &mdash;
132+
- **` --report-unused-disable-directives-severity`**=_`SEVERITY`_ &mdash;
133133
Same as `--report-unused-disable-directives`, but allows you to specify the severity level of the reported errors. Only one of these two options can be used at a time.
134134

135135
## Available positional items:
@@ -139,15 +139,15 @@ Arguments:
139139

140140
## Available options:
141141

142-
- **`--rules`** &mdash;
142+
- **` --rules`** &mdash;
143143
List all the rules that are currently registered
144-
- **`--lsp`** &mdash;
144+
- **` --lsp`** &mdash;
145145
Start the language server
146-
- **`--disable-nested-config`** &mdash;
146+
- **` --disable-nested-config`** &mdash;
147147
Disable the automatic loading of nested configuration files
148-
- **`--type-aware`** &mdash;
148+
- **` --type-aware`** &mdash;
149149
Enable rules that require type information
150-
- **`--type-check`** &mdash;
150+
- **` --type-check`** &mdash;
151151
Enable experimental type checking (includes TypeScript compiler diagnostics)
152152
- **`-h`**, **`--help`** &mdash;
153153
Prints help information

0 commit comments

Comments
 (0)