@genesislcap/oxlint-config 14.436.0-FUI-2489.8 → 14.443.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/.oxlintrc.json +5 -8
- package/README.md +20 -5
- package/package.json +8 -10
package/.oxlintrc.json
CHANGED
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
"eslint-plugin-unused-imports",
|
|
5
5
|
{
|
|
6
6
|
"name": "import-es",
|
|
7
|
-
"specifier": "eslint-plugin-import
|
|
8
|
-
}
|
|
9
|
-
"eslint-plugin-perfectionist"
|
|
7
|
+
"specifier": "eslint-plugin-import"
|
|
8
|
+
}
|
|
10
9
|
],
|
|
11
10
|
"env": {
|
|
12
11
|
"builtin": true,
|
|
@@ -80,13 +79,11 @@
|
|
|
80
79
|
"import-es/no-duplicates": "warn",
|
|
81
80
|
"import-es/no-self-import": "error",
|
|
82
81
|
"import-es/no-useless-path-segments": "warn",
|
|
83
|
-
"import-es/order":
|
|
84
|
-
"perfectionist/sort-imports": [
|
|
82
|
+
"import-es/order": [
|
|
85
83
|
"warn",
|
|
86
84
|
{
|
|
87
|
-
"
|
|
88
|
-
"order": "asc",
|
|
89
|
-
"newlinesBetween": 0
|
|
85
|
+
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
|
|
86
|
+
"alphabetize": { "order": "asc", "caseInsensitive": true }
|
|
90
87
|
}
|
|
91
88
|
],
|
|
92
89
|
"no-magic-numbers": [
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Published **Oxlint** rules for Genesis Foundation UI. It is the lint analogue of
|
|
|
6
6
|
|
|
7
7
|
- Ships **[`.oxlintrc.json`](./.oxlintrc.json)** — the only file you should edit for Oxlint rule changes in this product line.
|
|
8
8
|
- Keeps rule **intent** aligned with `@genesislcap/eslint-config` and the monorepo root [`eslint.config.mjs`](../../../../eslint.config.mjs) (ESLint-only overrides stay in ESLint).
|
|
9
|
-
- **Does not format code.** Formatting is **Oxfmt**
|
|
9
|
+
- **Does not format code.** Formatting is **Oxfmt** — config lives in the root **`.oxfmtrc.json`** (copy it to your app, no extra package needed).
|
|
10
10
|
|
|
11
11
|
## How it runs in the monorepo
|
|
12
12
|
|
|
@@ -16,7 +16,9 @@ Published **Oxlint** rules for Genesis Foundation UI. It is the lint analogue of
|
|
|
16
16
|
|
|
17
17
|
## Import rules and ESLint
|
|
18
18
|
|
|
19
|
-
Oxlint loads
|
|
19
|
+
Oxlint loads **`eslint-plugin-import`** as a **[JS plugin](https://oxc.rs/docs/guide/usage/linter/js-plugins.html)** under the alias **`import-es`** (avoids clashing with Oxlint’s built-in `import` plugin). In this config, `import-es` covers **`newline-after-import`**, **`no-self-import`**, **`no-useless-path-segments`** (warn), and **`no-duplicates`** (warn).
|
|
20
|
+
|
|
21
|
+
**Import ordering** is handled by **`import-es/order`** with the same groups and `alphabetize` config as `@genesislcap/eslint-config`, so both linters enforce identical ordering. `import-es/first` is disabled (redundant with `import-es/order`).
|
|
20
22
|
|
|
21
23
|
**`import/no-extraneous-dependencies`** is intentionally **not** run in Oxlint here (noisy with per-package `package.json` in a large monorepo). Use **ESLint** for that.
|
|
22
24
|
|
|
@@ -30,7 +32,17 @@ JS plugins are **alpha** in Oxlint; **type-aware** TypeScript rules still requir
|
|
|
30
32
|
|
|
31
33
|
**In this repository:** change rules only in **this package’s** [`.oxlintrc.json`](./.oxlintrc.json). Keep the root stub in sync with the `extends` pattern below.
|
|
32
34
|
|
|
33
|
-
**Downstream:**
|
|
35
|
+
**Downstream:** installing `@genesislcap/oxlint-config` automatically brings in `oxlint`, `oxfmt`, and the required ESLint plugins as bundled dependencies — no separate installs needed. At your app root, add:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@genesislcap/oxlint-config": "latest"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then create `.oxlintrc.json`:
|
|
34
46
|
|
|
35
47
|
```json
|
|
36
48
|
{
|
|
@@ -39,13 +51,16 @@ JS plugins are **alpha** in Oxlint; **type-aware** TypeScript rules still requir
|
|
|
39
51
|
}
|
|
40
52
|
```
|
|
41
53
|
|
|
54
|
+
And copy [`.oxfmtrc.json`](https://github.com/genesislcap/foundation-ui/blob/master/.oxfmtrc.json) from the `foundation-ui` repo for Oxfmt config (no extra package needed).
|
|
55
|
+
|
|
42
56
|
If you run Oxlint only from a **subfolder** of a monorepo, ensure a `.oxlintrc.json` in that folder can resolve the shared config (for example by extending a path or package that exists from that directory).
|
|
43
57
|
|
|
44
|
-
##
|
|
58
|
+
## Bundled dependencies
|
|
45
59
|
|
|
46
|
-
|
|
60
|
+
Shipped as `dependencies` in [`package.json`](./package.json) so they install automatically:
|
|
47
61
|
|
|
48
62
|
- `oxlint`
|
|
63
|
+
- `oxfmt`
|
|
49
64
|
- `eslint-import-resolver-typescript`
|
|
50
65
|
- `eslint-plugin-import`
|
|
51
66
|
- `eslint-plugin-unused-imports`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/oxlint-config",
|
|
3
3
|
"description": "Oxlint rules derived from @genesislcap/eslint-config and eslint.config.mjs",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.443.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=22.0.0"
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"README.md",
|
|
13
13
|
"license.txt"
|
|
14
14
|
],
|
|
15
|
-
"
|
|
15
|
+
"dependencies": {
|
|
16
16
|
"eslint-import-resolver-typescript": "^3.5.5",
|
|
17
|
-
"eslint-plugin-import
|
|
18
|
-
"eslint-plugin-perfectionist": "^5.0.0",
|
|
17
|
+
"eslint-plugin-import": "^2.27.5",
|
|
19
18
|
"eslint-plugin-unused-imports": "^4.0.0",
|
|
20
|
-
"
|
|
19
|
+
"oxfmt": "^0.44.0",
|
|
20
|
+
"oxlint": "^1.59.0"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -28,10 +28,8 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"lint": "genx lint",
|
|
32
|
-
"lint:fix": "genx lint --fix"
|
|
33
|
-
"lint:ox": "genx lint -l ox",
|
|
34
|
-
"lint:ox:fix": "genx lint -l ox --fix"
|
|
31
|
+
"lint": "genx lint -l ox",
|
|
32
|
+
"lint:fix": "genx lint -l ox --fix"
|
|
35
33
|
},
|
|
36
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "057cb7a0d06f339094c8634a413e4a6e1aa95659"
|
|
37
35
|
}
|