@kk-forge/oxlint-config 0.0.0-stage → 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 +29 -2
- package/base.json +29 -0
- package/package.json +34 -4
- package/solid.json +22 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KK Forge
|
|
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
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kk-forge/oxlint-config
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The oxlint rules KK Forge's TypeScript packages lint with.
|
|
4
|
+
|
|
5
|
+
- `base.json` turns on oxlint's `correctness` category as errors. It adds the bug-catching rules the category lacks: `any`, `@ts-ignore`, non-null assertions, a `switch` that misses a case, a misused promise, a `let` that stays the same, `var` and import cycles. A few more come from the `suspicious` category, such as a loop whose condition never changes and an enum compared with a raw value. It also turns on type-aware linting and fails on a warning, so a package runs a bare `oxlint`.
|
|
6
|
+
- `solid.json`: the recommended rules of eslint-plugin-solid, for a Solid package. oxlint runs a JS plugin's rule only when the config lists it, so the file lists them. It turns off `no-unassigned-vars`, which cannot see Solid assign a `let` through a JSX `ref`.
|
|
7
|
+
|
|
8
|
+
## Use
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -D @kk-forge/oxlint-config oxlint oxlint-tsgolint
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
A Solid package also installs `eslint-plugin-solid`. `.oxlintrc.json` takes the files by path, because oxlint resolves `extends` from the config's own folder:
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"extends": ["./node_modules/@kk-forge/oxlint-config/base.json", "./node_modules/@kk-forge/oxlint-config/solid.json"]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
A package's own rules and overrides go below `extends` and win over it. Point the path at the `node_modules` that holds the package, such as `../node_modules/…` in an npm workspace.
|
|
23
|
+
|
|
24
|
+
## Development
|
|
25
|
+
|
|
26
|
+
- `mise run setup` installs the packages, and `mise run check` lints `test/fixtures` through both files and expects each rule the fixture breaks.
|
|
27
|
+
|
|
28
|
+
## Release
|
|
29
|
+
|
|
30
|
+
Raise `version` in package.json and merge to main. The Release workflow runs `release-npm.yml@v4` of kk-forge-engineering/gh-actions. It runs `check` and packs the package with `mise run pack`. Once the `production` environment's reviewer approves, it publishes to npm through Trusted Publishing and tags `v<version>` with a GitHub Release.
|
package/base.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugins": ["typescript", "unicorn", "oxc", "import"],
|
|
3
|
+
"categories": {
|
|
4
|
+
"correctness": "error"
|
|
5
|
+
},
|
|
6
|
+
"options": {
|
|
7
|
+
"typeAware": true,
|
|
8
|
+
"denyWarnings": true
|
|
9
|
+
},
|
|
10
|
+
"rules": {
|
|
11
|
+
"typescript/no-explicit-any": "error",
|
|
12
|
+
"typescript/ban-ts-comment": "error",
|
|
13
|
+
"typescript/no-non-null-assertion": "error",
|
|
14
|
+
"typescript/switch-exhaustiveness-check": "error",
|
|
15
|
+
"typescript/no-misused-promises": "error",
|
|
16
|
+
"prefer-const": ["error", { "ignoreReadBeforeAssign": true }],
|
|
17
|
+
"no-var": "error",
|
|
18
|
+
"import/no-cycle": "error",
|
|
19
|
+
"no-unmodified-loop-condition": "error",
|
|
20
|
+
"no-unexpected-multiline": "error",
|
|
21
|
+
"no-extend-native": "error",
|
|
22
|
+
"preserve-caught-error": "error",
|
|
23
|
+
"oxc/misrefactored-assign-op": "error",
|
|
24
|
+
"unicorn/require-post-message-target-origin": "error",
|
|
25
|
+
"unicorn/no-accessor-recursion": "error",
|
|
26
|
+
"unicorn/no-array-fill-with-reference-type": "error",
|
|
27
|
+
"typescript/no-unsafe-enum-comparison": "error"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kk-forge/oxlint-config",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "The oxlint rules KK Forge's TypeScript packages lint with",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "KK Forge",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/kk-forge-engineering/oxlint-config.git"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"base.json",
|
|
13
|
+
"solid.json"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "node --test"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"eslint-plugin-solid": "^0.18.0 || ^0.19.0",
|
|
23
|
+
"oxlint": "^1.88.0",
|
|
24
|
+
"oxlint-tsgolint": "^7.0.0"
|
|
25
|
+
},
|
|
26
|
+
"peerDependenciesMeta": {
|
|
27
|
+
"eslint-plugin-solid": {
|
|
28
|
+
"optional": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"eslint-plugin-solid": "^0.19.0",
|
|
33
|
+
"oxlint": "^1.93.0",
|
|
34
|
+
"oxlint-tsgolint": "^7.0.2006"
|
|
35
|
+
}
|
|
36
|
+
}
|
package/solid.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"jsPlugins": ["eslint-plugin-solid"],
|
|
3
|
+
"rules": {
|
|
4
|
+
"solid/jsx-no-duplicate-props": "error",
|
|
5
|
+
"solid/jsx-no-undef": "error",
|
|
6
|
+
"solid/jsx-uses-vars": "error",
|
|
7
|
+
"solid/no-unknown-namespaces": "error",
|
|
8
|
+
"solid/no-innerhtml": "error",
|
|
9
|
+
"solid/jsx-no-script-url": "error",
|
|
10
|
+
"solid/components-return-once": "error",
|
|
11
|
+
"solid/no-destructure": "error",
|
|
12
|
+
"solid/prefer-for": "error",
|
|
13
|
+
"solid/reactivity": "error",
|
|
14
|
+
"solid/event-handlers": "error",
|
|
15
|
+
"solid/imports": "error",
|
|
16
|
+
"solid/style-prop": "error",
|
|
17
|
+
"solid/no-react-deps": "error",
|
|
18
|
+
"solid/no-react-specific-props": "error",
|
|
19
|
+
"solid/self-closing-comp": "error",
|
|
20
|
+
"no-unassigned-vars": "off"
|
|
21
|
+
}
|
|
22
|
+
}
|