@qntx/oxlint 1.0.0
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/LICENSE +21 -0
- package/README.md +86 -0
- package/dist/index.d.mts +1024 -0
- package/dist/index.mjs +1056 -0
- package/package.json +67 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 QuantX
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# @qntx/oxlint
|
|
2
|
+
|
|
3
|
+
Shareable [Oxlint](https://oxc.rs/docs/guide/usage/linter.html) config for Vite+ apps and TypeScript libraries.
|
|
4
|
+
|
|
5
|
+
Clippy-mapped strictness: type safety and correctness fail the build (`any`, `!`, unsafe, floating promises, React Compiler). Tests relax like `allow-unwrap-in-tests`. Formatting is [`@qntx/oxfmt`](https://www.npmjs.com/package/@qntx/oxfmt), not lint.
|
|
6
|
+
|
|
7
|
+
Requires **oxlint 1.82.0**. Vite+ 0.3.1 nests 1.81.0; this repo overrides that. Vite+ consumers who do not override still run 1.81.0 (1.82 added no new rule ids).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun add -d @qntx/oxlint @qntx/oxfmt
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Do **not** add `oxlint` or `oxlint-tsgolint` to a Vite+ app. `vp lint` already nests them.
|
|
16
|
+
|
|
17
|
+
## Recipes
|
|
18
|
+
|
|
19
|
+
### Vite+ React
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { defineConfig } from "vite-plus";
|
|
23
|
+
import { react } from "@qntx/oxlint";
|
|
24
|
+
import { fmt } from "@qntx/oxfmt";
|
|
25
|
+
|
|
26
|
+
export default defineConfig({
|
|
27
|
+
lint: react,
|
|
28
|
+
fmt,
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`react` already includes the core TypeScript/ESLint/Vitest table plus native `react` / `jsx-a11y` / `react-perf`.
|
|
33
|
+
|
|
34
|
+
### TypeScript library
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { defineConfig } from "vite-plus";
|
|
38
|
+
import { config } from "@qntx/oxlint";
|
|
39
|
+
import { fmt } from "@qntx/oxfmt";
|
|
40
|
+
|
|
41
|
+
export default defineConfig({
|
|
42
|
+
lint: config,
|
|
43
|
+
fmt,
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`config` does not enable React plugins.
|
|
48
|
+
|
|
49
|
+
### Overrides
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { defineConfig } from "vite-plus";
|
|
53
|
+
import { config, merge } from "@qntx/oxlint";
|
|
54
|
+
import { fmt } from "@qntx/oxfmt";
|
|
55
|
+
|
|
56
|
+
export default defineConfig({
|
|
57
|
+
lint: merge(config, { rules: { "eslint/no-console": "off" } }),
|
|
58
|
+
fmt: { ...fmt, printWidth: 120 },
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Drop default ignore patterns with `{ ignorePatterns: undefined }`. Replace them with `{ ignorePatterns: [] }` then set a new list.
|
|
63
|
+
|
|
64
|
+
### CLI
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
export { config as default } from "@qntx/oxlint";
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Vite+ projects should put lint in `vite.config.ts`, not `oxlint.config.ts`.
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
MIT © [QuantX](https://qntx.org)
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
<div align="center">
|
|
79
|
+
|
|
80
|
+
A **[QuantX](https://qntx.org)** open-source project.
|
|
81
|
+
|
|
82
|
+
<a href="https://qntx.org"><img alt="QuantX" width="369" src="https://raw.githubusercontent.com/qntx/.github/main/profile/qntx.svg" /></a>
|
|
83
|
+
|
|
84
|
+
Code is law. We write both.
|
|
85
|
+
|
|
86
|
+
</div>
|