@kk-forge/oxlint-config 1.0.0 → 1.1.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.
Files changed (3) hide show
  1. package/README.md +6 -10
  2. package/base.json +2 -1
  3. package/package.json +13 -6
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # @kk-forge/oxlint-config
2
2
 
3
- The oxlint rules KK Forge's TypeScript packages lint with.
3
+ Shared oxlint configs for KK Forge's TypeScript packages.
4
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`.
5
+ - `base.json`: the `correctness` category plus the bug-catching rules it lacks and `no-console`, type-aware, warnings fail. A package turns `no-console` off for its logger file.
6
+ - `solid.json`: eslint-plugin-solid's recommended rules.
7
7
 
8
8
  ## Use
9
9
 
@@ -11,7 +11,7 @@ The oxlint rules KK Forge's TypeScript packages lint with.
11
11
  npm install -D @kk-forge/oxlint-config oxlint oxlint-tsgolint
12
12
  ```
13
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:
14
+ A Solid package also installs `eslint-plugin-solid`. oxlint resolves `extends` from the config's folder, so give the path:
15
15
 
16
16
  ```json
17
17
  {
@@ -19,12 +19,8 @@ A Solid package also installs `eslint-plugin-solid`. `.oxlintrc.json` takes the
19
19
  }
20
20
  ```
21
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.
22
+ A package's own rules go below `extends` and win.
27
23
 
28
24
  ## Release
29
25
 
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.
26
+ Raise `version` in package.json and merge to main. CI publishes to npm once the `production` environment approves.
package/base.json CHANGED
@@ -24,6 +24,7 @@
24
24
  "unicorn/require-post-message-target-origin": "error",
25
25
  "unicorn/no-accessor-recursion": "error",
26
26
  "unicorn/no-array-fill-with-reference-type": "error",
27
- "typescript/no-unsafe-enum-comparison": "error"
27
+ "typescript/no-unsafe-enum-comparison": "error",
28
+ "no-console": "error"
28
29
  }
29
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kk-forge/oxlint-config",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "The oxlint rules KK Forge's TypeScript packages lint with",
5
5
  "license": "MIT",
6
6
  "author": "KK Forge",
@@ -16,8 +16,20 @@
16
16
  "access": "public"
17
17
  },
18
18
  "scripts": {
19
+ "lint": "npm run lint:oxlint && npm run lint:format",
20
+ "lint:fix": "npm run lint:oxlint:fix && npm run lint:format:fix",
21
+ "lint:oxlint": "oxlint test/configs.test.mjs",
22
+ "lint:oxlint:fix": "oxlint --fix test/configs.test.mjs",
23
+ "lint:format": "oxfmt --check .",
24
+ "lint:format:fix": "oxfmt .",
19
25
  "test": "node --test"
20
26
  },
27
+ "devDependencies": {
28
+ "eslint-plugin-solid": "^0.19.0",
29
+ "oxfmt": "^0.78.0",
30
+ "oxlint": "^1.93.0",
31
+ "oxlint-tsgolint": "^7.0.2006"
32
+ },
21
33
  "peerDependencies": {
22
34
  "eslint-plugin-solid": "^0.18.0 || ^0.19.0",
23
35
  "oxlint": "^1.88.0",
@@ -27,10 +39,5 @@
27
39
  "eslint-plugin-solid": {
28
40
  "optional": true
29
41
  }
30
- },
31
- "devDependencies": {
32
- "eslint-plugin-solid": "^0.19.0",
33
- "oxlint": "^1.93.0",
34
- "oxlint-tsgolint": "^7.0.2006"
35
42
  }
36
43
  }