oxlint 0.3.5 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,70 +42,10 @@ The Oxidation Compiler is creating a suite of high-performance tools for JavaScr
42
42
 
43
43
  This is the linter for oxc.
44
44
 
45
+ See [usage instructions](https://oxc-project.github.io/docs/guide/usage/linter.html).
46
+
45
47
  Run
46
48
 
47
49
  * `npx --yes oxlint@latest` in your JavaScript / TypeScript codebase and see it complete in milliseconds. No configurations are required.
48
- * `npx oxlint@latest --help` for usage instructions.
50
+ * `npx oxlint@latest --help` for quick usage instructions.
49
51
  * `npx oxlint@latest --rules` for the list of rules.
50
-
51
-
52
- ### Usage Instructions
53
-
54
- `npx oxlint@latest --help`:
55
-
56
- ```
57
- Usage: oxlint [-A=NAME | -D=NAME]... [--fix] [-c=<./eslintrc.json>] [PATH]...
58
-
59
- Allowing / Denying Multiple Lints
60
- For example `-D correctness -A no-debugger` or `-A all -D no-debugger`.
61
- The default category is "-D correctness".
62
- Use "--rules" for rule names.
63
- Use "--help --help" for rule categories.
64
- -A, --allow=NAME Allow the rule or category (suppress the lint)
65
- -D, --deny=NAME Deny the rule or category (emit an error)
66
-
67
- Enable Plugins
68
- --import-plugin Enable the experimental import plugin and detect ESM problems. It is
69
- recommended to use along side with the `--tsconfig` option.
70
- --jsdoc-plugin Enable the experimental jsdoc plugin and detect JSDoc problems
71
- --jest-plugin Enable the Jest plugin and detect test problems
72
- --jsx-a11y-plugin Enable the JSX-a11y plugin and detect accessibility problems
73
- --nextjs-plugin Enable the Next.js plugin and detect Next.js problems
74
- --react-perf-plugin Enable the React performance plugin and detect rendering performance
75
- problems
76
-
77
- Fix Problems
78
- --fix Fix as many issues as possible. Only unfixed issues are reported in
79
- the output
80
-
81
- Ignore Files
82
- --ignore-path=PATH Specify the file to use as your .eslintignore
83
- --ignore-pattern=PAT Specify patterns of files to ignore (in addition to those in
84
- .eslintignore)
85
- --no-ignore Disables excluding of files from .eslintignore files, --ignore-path
86
- flags and --ignore-pattern flags
87
-
88
- Handle Warnings
89
- --quiet Disable reporting on warnings, only errors are reported
90
- --deny-warnings Ensure warnings produce a non-zero exit code
91
- --max-warnings=INT Specify a warning threshold, which can be used to force exit with an
92
- error status if there are too many warning-level rule violations in
93
- your project
94
-
95
- Output
96
- -f, --format=ARG Use a specific output format (default, json, checkstyle, unix)
97
-
98
- Miscellaneous
99
- --threads=INT Number of threads to use. Set to 1 for using only 1 CPU core
100
-
101
- Available positional items:
102
- PATH Single file, single path or list of paths
103
-
104
- Available options:
105
- --rules list all the rules that are currently registered
106
- -c, --config=<./eslintrc.json> ESLint configuration file (experimental)
107
- --tsconfig=<./tsconfig.json> TypeScript `tsconfig.json` path for reading path alias and
108
- project references for import plugin
109
- -h, --help Prints help information
110
- -V, --version Prints version information
111
- ```
@@ -0,0 +1,267 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "OxlintConfig",
4
+ "description": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json`\n\n::: danger NOTE\n\nOnly the `.json` format is supported.\n\n:::\n\nExample\n\n```json\n // oxlintrc.json\n {\n // Comments are supported.\n \"env\": {\n \"browser\": true\n },\n \"globals\": {\n \"foo\": \"readonly\",\n },\n \"settings\": {\n },\n \"rules\": {\n \"eqeqeq\": \"warn\",\n },\n }\n```",
5
+ "type": "object",
6
+ "properties": {
7
+ "env": {
8
+ "$ref": "#/definitions/OxlintEnv"
9
+ },
10
+ "globals": {
11
+ "$ref": "#/definitions/OxlintGlobals"
12
+ },
13
+ "rules": {
14
+ "description": "See [Oxlint Rules](./rules)",
15
+ "allOf": [
16
+ {
17
+ "$ref": "#/definitions/OxlintRules"
18
+ }
19
+ ]
20
+ },
21
+ "settings": {
22
+ "$ref": "#/definitions/OxlintSettings"
23
+ }
24
+ },
25
+ "definitions": {
26
+ "CustomComponent": {
27
+ "anyOf": [
28
+ {
29
+ "type": "string"
30
+ },
31
+ {
32
+ "type": "object",
33
+ "required": [
34
+ "attribute",
35
+ "name"
36
+ ],
37
+ "properties": {
38
+ "attribute": {
39
+ "type": "string"
40
+ },
41
+ "name": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ },
46
+ {
47
+ "type": "object",
48
+ "required": [
49
+ "attributes",
50
+ "name"
51
+ ],
52
+ "properties": {
53
+ "attributes": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "string"
57
+ }
58
+ },
59
+ "name": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ }
64
+ ]
65
+ },
66
+ "DummyRule": {
67
+ "anyOf": [
68
+ {
69
+ "type": "integer",
70
+ "format": "uint",
71
+ "minimum": 0.0
72
+ },
73
+ {
74
+ "type": "string"
75
+ },
76
+ {
77
+ "type": "array",
78
+ "items": true
79
+ }
80
+ ]
81
+ },
82
+ "GlobalValue": {
83
+ "type": "string",
84
+ "enum": [
85
+ "readonly",
86
+ "writeable",
87
+ "off"
88
+ ]
89
+ },
90
+ "JSDocPluginSettings": {
91
+ "type": "object",
92
+ "properties": {
93
+ "augmentsExtendsReplacesDocs": {
94
+ "description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
95
+ "default": false,
96
+ "type": "boolean"
97
+ },
98
+ "exemptDestructuredRootsFromChecks": {
99
+ "description": "Only for `require-param-type` and `require-param-description` rule",
100
+ "default": false,
101
+ "type": "boolean"
102
+ },
103
+ "ignoreInternal": {
104
+ "description": "For all rules but NOT apply to `empty-tags` rule",
105
+ "default": false,
106
+ "type": "boolean"
107
+ },
108
+ "ignorePrivate": {
109
+ "description": "For all rules but NOT apply to `check-access` and `empty-tags` rule",
110
+ "default": false,
111
+ "type": "boolean"
112
+ },
113
+ "ignoreReplacesDocs": {
114
+ "description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
115
+ "default": true,
116
+ "type": "boolean"
117
+ },
118
+ "implementsReplacesDocs": {
119
+ "description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
120
+ "default": false,
121
+ "type": "boolean"
122
+ },
123
+ "overrideReplacesDocs": {
124
+ "description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
125
+ "default": true,
126
+ "type": "boolean"
127
+ },
128
+ "tagNamePreference": {
129
+ "type": "object",
130
+ "additionalProperties": {
131
+ "$ref": "#/definitions/TagNamePreference"
132
+ }
133
+ }
134
+ }
135
+ },
136
+ "JSXA11yPluginSettings": {
137
+ "type": "object",
138
+ "properties": {
139
+ "components": {
140
+ "default": {},
141
+ "type": "object",
142
+ "additionalProperties": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ "polymorphicPropName": {
147
+ "type": [
148
+ "string",
149
+ "null"
150
+ ]
151
+ }
152
+ }
153
+ },
154
+ "NextPluginSettings": {
155
+ "type": "object",
156
+ "properties": {
157
+ "rootDir": {
158
+ "$ref": "#/definitions/OneOrMany_for_String"
159
+ }
160
+ }
161
+ },
162
+ "OneOrMany_for_String": {
163
+ "anyOf": [
164
+ {
165
+ "type": "string"
166
+ },
167
+ {
168
+ "type": "array",
169
+ "items": {
170
+ "type": "string"
171
+ }
172
+ }
173
+ ]
174
+ },
175
+ "OxlintEnv": {
176
+ "description": "Predefine global variables.",
177
+ "type": "object",
178
+ "additionalProperties": {
179
+ "type": "boolean"
180
+ }
181
+ },
182
+ "OxlintGlobals": {
183
+ "description": "Add or remove global variables.",
184
+ "type": "object",
185
+ "additionalProperties": {
186
+ "$ref": "#/definitions/GlobalValue"
187
+ }
188
+ },
189
+ "OxlintRules": {
190
+ "type": "object",
191
+ "additionalProperties": {
192
+ "$ref": "#/definitions/DummyRule"
193
+ }
194
+ },
195
+ "OxlintSettings": {
196
+ "description": "Shared settings for plugins",
197
+ "type": "object",
198
+ "properties": {
199
+ "jsdoc": {
200
+ "$ref": "#/definitions/JSDocPluginSettings"
201
+ },
202
+ "jsx-a11y": {
203
+ "$ref": "#/definitions/JSXA11yPluginSettings"
204
+ },
205
+ "next": {
206
+ "$ref": "#/definitions/NextPluginSettings"
207
+ },
208
+ "react": {
209
+ "$ref": "#/definitions/ReactPluginSettings"
210
+ }
211
+ }
212
+ },
213
+ "ReactPluginSettings": {
214
+ "type": "object",
215
+ "properties": {
216
+ "formComponents": {
217
+ "type": "array",
218
+ "items": {
219
+ "$ref": "#/definitions/CustomComponent"
220
+ }
221
+ },
222
+ "linkComponents": {
223
+ "type": "array",
224
+ "items": {
225
+ "$ref": "#/definitions/CustomComponent"
226
+ }
227
+ }
228
+ }
229
+ },
230
+ "TagNamePreference": {
231
+ "anyOf": [
232
+ {
233
+ "type": "string"
234
+ },
235
+ {
236
+ "type": "object",
237
+ "required": [
238
+ "message",
239
+ "replacement"
240
+ ],
241
+ "properties": {
242
+ "message": {
243
+ "type": "string"
244
+ },
245
+ "replacement": {
246
+ "type": "string"
247
+ }
248
+ }
249
+ },
250
+ {
251
+ "type": "object",
252
+ "required": [
253
+ "message"
254
+ ],
255
+ "properties": {
256
+ "message": {
257
+ "type": "string"
258
+ }
259
+ }
260
+ },
261
+ {
262
+ "type": "boolean"
263
+ }
264
+ ]
265
+ }
266
+ }
267
+ }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"oxlint","version":"0.3.5","description":"Linter for the JavaScript Oxidation Compiler","keywords":[],"author":"Boshen and oxc contributors","license":"MIT","homepage":"https://oxc-project.github.io","bugs":"https://github.com/oxc-project/oxc/issues","repository":{"type":"git","url":"https://github.com/oxc-project/oxc","directory":"npm/oxlint"},"bin":"bin/oxlint","funding":{"url":"https://github.com/sponsors/Boshen"},"engines":{"node":">=14.*"},"files":["bin/oxlint","README.md"],"optionalDependencies":{"@oxlint/win32-x64":"0.3.5","@oxlint/win32-arm64":"0.3.5","@oxlint/linux-x64-gnu":"0.3.5","@oxlint/linux-arm64-gnu":"0.3.5","@oxlint/linux-x64-musl":"0.3.5","@oxlint/linux-arm64-musl":"0.3.5","@oxlint/darwin-x64":"0.3.5","@oxlint/darwin-arm64":"0.3.5"}}
1
+ {"name":"oxlint","version":"0.4.1","description":"Linter for the JavaScript Oxidation Compiler","keywords":[],"author":"Boshen and oxc contributors","license":"MIT","homepage":"https://oxc-project.github.io","bugs":"https://github.com/oxc-project/oxc/issues","repository":{"type":"git","url":"https://github.com/oxc-project/oxc","directory":"npm/oxlint"},"bin":"bin/oxlint","funding":{"url":"https://github.com/sponsors/Boshen"},"engines":{"node":">=14.*"},"files":["bin/oxlint","configuration_schema.json","README.md"],"optionalDependencies":{"@oxlint/win32-x64":"0.4.1","@oxlint/win32-arm64":"0.4.1","@oxlint/linux-x64-gnu":"0.4.1","@oxlint/linux-arm64-gnu":"0.4.1","@oxlint/linux-x64-musl":"0.4.1","@oxlint/linux-arm64-musl":"0.4.1","@oxlint/darwin-x64":"0.4.1","@oxlint/darwin-arm64":"0.4.1"}}