@brutalway/lint-utils 0.2.0 → 0.2.1

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 (2) hide show
  1. package/dist/oklab.js +3 -3
  2. package/package.json +30 -10
package/dist/oklab.js CHANGED
@@ -1,4 +1,4 @@
1
- // src/shared/lib/fromRgb.ts
1
+ // src/shared/oklab/lib/fromRgb.ts
2
2
  function toLinear(channel) {
3
3
  return channel <= .04045 ? channel / 12.92 : ((channel + .055) / 1.055) ** 2.4;
4
4
  }
@@ -22,7 +22,7 @@ function fromRgb(red, green, blue) {
22
22
  b: .0259040371 * l + .7827717662 * m - .808675766 * s
23
23
  };
24
24
  }
25
- // src/shared/lib/fromHex.ts
25
+ // src/shared/oklab/lib/fromHex.ts
26
26
  function fromHex(hex) {
27
27
  const short = hex.length <= 5;
28
28
  const [red, green, blue] = [
@@ -37,7 +37,7 @@ function fromHex(hex) {
37
37
  ].some(Number.isNaN)) return;
38
38
  return fromRgb(red, green, blue);
39
39
  }
40
- // src/shared/lib/fromRgbChannels.ts
40
+ // src/shared/oklab/lib/fromRgbChannels.ts
41
41
  function scale(channel, raw) {
42
42
  return raw?.endsWith("%") === true ? channel : channel / 255;
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brutalway/lint-utils",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Helpers shared by the @brutalway lint configs and plugins: export listing, file base name, oxlint rule and fixture testers, oklab colors and color token reading.",
5
5
  "keywords": [
6
6
  "oxlint",
@@ -43,10 +43,12 @@
43
43
  "typecheck": "tsc -p .",
44
44
  "lint": "oxlint --type-aware src oxlint.config.ts tsdown.config.ts",
45
45
  "deps": "depcruise --output-type err-long src",
46
- "tree": "check-tree src --root-entries",
46
+ "tree": "check-tree src",
47
47
  "duplicates": "jscpd src",
48
- "check": "npm run typecheck && npm run lint && npm run deps && npm run tree && npm run duplicates",
49
- "test": "node --test 'src/**/*.test.ts'"
48
+ "check": "prettier --check . && npm run typecheck && npm run lint && npm run deps && npm run tree && npm run duplicates && npm run unused",
49
+ "test": "node --test 'src/**/*.test.ts'",
50
+ "format": "prettier --write .",
51
+ "unused": "knip"
50
52
  },
51
53
  "dependencies": {
52
54
  "@oxlint/plugins": "^1.91.0"
@@ -55,16 +57,34 @@
55
57
  "oxlint": "^1.91.0"
56
58
  },
57
59
  "devDependencies": {
58
- "@brutalway/check-tree": "0.5.1",
59
- "@brutalway/dependency-cruiser-config": "0.5.0",
60
+ "@brutalway/check-tree": "0.10.0",
61
+ "@brutalway/dependency-cruiser-config": "0.10.0",
60
62
  "@brutalway/oxlint-config-node": "0.2.1",
61
63
  "@brutalway/oxlint-config-node-test": "0.1.0",
64
+ "@brutalway/oxlint-config-typescript": "0.10.0",
65
+ "@brutalway/prettier-config": "0.3.0",
62
66
  "@brutalway/tsconfig": "0.4.0",
67
+ "@swc/core": "1.16.22",
68
+ "@types/node": "26.6.6",
63
69
  "dependency-cruiser": "18.7.2",
64
- "jscpd": "5.4.2",
65
- "oxlint": "1.91.0",
66
- "oxlint-tsgolint": "7.0.2005",
67
- "tsdown": "0.23.5",
70
+ "jscpd": "5.4.3",
71
+ "knip": "6.44.2",
72
+ "oxlint": "1.92.0",
73
+ "oxlint-tsgolint": "7.0.2006",
74
+ "prettier": "3.9.10",
75
+ "tsdown": "0.23.7",
68
76
  "typescript": "7.0.2"
77
+ },
78
+ "prettier": "@brutalway/prettier-config",
79
+ "check-tree": {
80
+ "rootEntries": true
81
+ },
82
+ "allowScripts": {
83
+ "@swc/core": false
84
+ },
85
+ "overrides": {
86
+ "eslint-plugin-no-comments": {
87
+ "minimatch": "^11.0.1"
88
+ }
69
89
  }
70
90
  }