|
1 | | -[1]> oxlint # should reject non-LSP usage |
| 1 | +[1]> node ../node_modules/vite-plus/bin/oxlint # should reject non-LSP usage |
2 | 2 | This oxlint wrapper is for IDE extension use only (--lsp mode). |
3 | 3 | To lint your code, run: vp lint |
4 | 4 |
|
5 | | -[1]> oxlint --help # should reject non-LSP usage |
| 5 | +[1]> node ../node_modules/vite-plus/bin/oxlint --help # should reject non-LSP usage |
6 | 6 | This oxlint wrapper is for IDE extension use only (--lsp mode). |
7 | 7 | To lint your code, run: vp lint |
| 8 | + |
| 9 | +> node ../node_modules/vite-plus/bin/oxlint --lsp --help # should exercise import path |
| 10 | +Usage: [-c=<./.oxlintrc.json>] [PATH]... |
| 11 | + |
| 12 | +Basic Configuration |
| 13 | + -c, --config=<./.oxlintrc.json> Oxlint configuration file |
| 14 | + * `.json` and `.jsonc` config files are supported in all runtimes |
| 15 | + * JavaScript/TypeScript config files are experimental and require |
| 16 | + running via Node.js |
| 17 | + * you can use comments in configuration files. |
| 18 | + * tries to be compatible with ESLint v8's format |
| 19 | + --tsconfig=<./tsconfig.json> TypeScript `tsconfig.json` path for reading path alias and |
| 20 | + project references for import plugin. If not provided, will look for |
| 21 | + `tsconfig.json` in the current working directory. |
| 22 | + --init Initialize oxlint configuration with default values |
| 23 | + |
| 24 | +Allowing / Denying Multiple Lints |
| 25 | + Accumulate rules and categories from left to right on the command-line. |
| 26 | + For example `-D correctness -A no-debugger` or `-A all -D no-debugger`. |
| 27 | + The categories are: |
| 28 | + * `correctness` - Code that is outright wrong or useless (default) |
| 29 | + * `suspicious` - Code that is most likely wrong or useless |
| 30 | + * `pedantic` - Lints which are rather strict or have occasional false positives |
| 31 | + * `perf` - Code that could be written in a more performant way |
| 32 | + * `style` - Code that should be written in a more idiomatic way |
| 33 | + * `restriction` - Lints which prevent the use of language and library features |
| 34 | + * `nursery` - New lints that are still under development |
| 35 | + * `all` - All categories listed above except `nursery`. Does not enable plugins |
| 36 | + automatically. |
| 37 | + -A, --allow=NAME Allow the rule or category (suppress the lint) |
| 38 | + -W, --warn=NAME Deny the rule or category (emit a warning) |
| 39 | + -D, --deny=NAME Deny the rule or category (emit an error) |
| 40 | + |
| 41 | +Enable/Disable Plugins |
| 42 | + --disable-unicorn-plugin Disable unicorn plugin, which is turned on by default |
| 43 | + --disable-oxc-plugin Disable oxc unique rules, which is turned on by default |
| 44 | + --disable-typescript-plugin Disable TypeScript plugin, which is turned on by default |
| 45 | + --import-plugin Enable import plugin and detect ESM problems. It should be used with |
| 46 | + the `--tsconfig` flag if your project has a tsconfig with a name other |
| 47 | + than `tsconfig.json`. |
| 48 | + --react-plugin Enable react plugin, which is turned off by default |
| 49 | + --jsdoc-plugin Enable jsdoc plugin and detect JSDoc problems |
| 50 | + --jest-plugin Enable the Jest plugin and detect test problems |
| 51 | + --vitest-plugin Enable the Vitest plugin and detect test problems |
| 52 | + --jsx-a11y-plugin Enable the JSX-a11y plugin and detect accessibility problems |
| 53 | + --nextjs-plugin Enable the Next.js plugin and detect Next.js problems |
| 54 | + --react-perf-plugin Enable the React performance plugin and detect rendering performance |
| 55 | + problems |
| 56 | + --promise-plugin Enable the promise plugin and detect promise usage problems |
| 57 | + --node-plugin Enable the node plugin and detect node usage problems |
| 58 | + --vue-plugin Enable the vue plugin and detect vue usage problems |
| 59 | + |
| 60 | +Fix Problems |
| 61 | + --fix Fix as many issues as possible. Only unfixed issues are reported in |
| 62 | + the output. |
| 63 | + --fix-suggestions Apply auto-fixable suggestions. May change program behavior. |
| 64 | + --fix-dangerously Apply dangerous fixes and suggestions |
| 65 | + |
| 66 | +Ignore Files |
| 67 | + --ignore-path=PATH Specify the file to use as your `.eslintignore` |
| 68 | + --ignore-pattern=PAT Specify patterns of files to ignore (in addition to those in |
| 69 | + `.eslintignore`) |
| 70 | + --no-ignore Disable excluding files from `.eslintignore` files, --ignore-path |
| 71 | + flags and --ignore-pattern flags |
| 72 | + |
| 73 | +Handle Warnings |
| 74 | + --quiet Disable reporting on warnings, only errors are reported |
| 75 | + --deny-warnings Ensure warnings produce a non-zero exit code |
| 76 | + --max-warnings=INT Specify a warning threshold, which can be used to force exit with an |
| 77 | + error status if there are too many warning-level rule violations in |
| 78 | + your project |
| 79 | + |
| 80 | +Output |
| 81 | + -f, --format=ARG Use a specific output format. Possible values: `checkstyle`, |
| 82 | + `default`, `github`, `gitlab`, `json`, `junit`, `stylish`, `unix` |
| 83 | + |
| 84 | +Miscellaneous |
| 85 | + --silent Do not display any diagnostics |
| 86 | + --threads=INT Number of threads to use. Set to 1 for using only 1 CPU core. |
| 87 | + --print-config This option outputs the configuration to be used. When present, no |
| 88 | + linting is performed and only config-related options are valid. |
| 89 | + |
| 90 | +Inline Configuration Comments |
| 91 | + --report-unused-disable-directives Report directive comments like `// oxlint-disable-line`, |
| 92 | + when no errors would have been reported on that line anyway |
| 93 | + --report-unused-disable-directives-severity=SEVERITY Same as |
| 94 | + `--report-unused-disable-directives`, but allows you to specify the |
| 95 | + severity level of the reported errors. Only one of these two options |
| 96 | + can be used at a time. |
| 97 | + |
| 98 | +Available positional items: |
| 99 | + PATH Single file, single path or list of paths |
| 100 | + |
| 101 | +Available options: |
| 102 | + --rules List all the rules that are currently registered |
| 103 | + --lsp Start the language server |
| 104 | + --disable-nested-config Disable the automatic loading of nested configuration files |
| 105 | + --type-aware Enable rules that require type information |
| 106 | + --type-check Enable experimental type checking (includes TypeScript compiler |
| 107 | + diagnostics) |
| 108 | + -h, --help Prints help information |
| 109 | + -V, --version Prints version information |
| 110 | + |
0 commit comments