@teacss/linter 0.10.15 → 1.0.0-rc.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  An [oxlint](https://oxc.rs/docs/guide/usage/linter.html) plugin that limits which TeaCSS classes a project may write. It reads class strings from `.js`, `.jsx`, `.ts` and `.tsx` files, asks the Rust engine (`@teacss/engine`) what each class is, and reports the ones your policy does not allow. The policy lives in `.oxlintrc.json`; component code does not change.
4
4
 
5
- Install it with oxlint as development dependencies: `npm install --save-dev @teacss/linter oxlint@1.94`. It needs Node.js 26 or later and oxlint 1.94.x. The oxlint API for JavaScript plugins is in alpha, so the supported oxlint range is exactly the tested one. ESLint is not supported. The plugin is tested on macOS; it has not been run on Linux or Windows.
5
+ Install it with oxlint as development dependencies: `npm install --save-dev @teacss/linter oxlint@1.95`. It needs Node.js 26 or later and oxlint 1.95.x. The oxlint API for JavaScript plugins is in alpha, so the supported oxlint range is exactly the tested one, and this package is a preview: its rule names and options are not covered by TeaCSS's stability promise and may change in any release. ESLint is not supported. Its tests pass on macOS and on Linux (glibc and musl); it has not been run on Windows.
6
6
 
7
7
  ## Setup
8
8
 
@@ -425,7 +425,7 @@ None of these entries matches a class with a condition as a whole, so the condit
425
425
  | --- | --- | --- |
426
426
  | `btn` | One of `btn--primary`, `btn--outline`, `btn--neutral`, `btn--minimal`, `btn--general`, `btn--success`, `btn--warning`, `btn--failure`, whatever their conditions. | "Choose one variant from the catalogue." (`presets.md`) |
427
427
  | `surface-*` | One of the six surface shortcuts, whatever their conditions. | "Choose one surface before merging classes; `cn` does not resolve different surface names." (`presets.md`) |
428
- | `outlined` | Not with a surface shortcut, `toolbar`, `tab-list`, `sheet`, `tooltip-content`, `modal` or `mockup-code`, whatever their conditions. | "Do not add `outlined` to a `surface-*` shortcut or to a component that paints its own border" (`presets.md`) |
428
+ | `outlined` | Not with a surface shortcut, `toolbar`, `tab-list`, `sheet`, `tooltip-content`, `modal`, `mockup-code`, a field (`input`, `textarea`, `select`, `input-shell`, `join-text`, `otp-input`, `otp-slot`, `file-input`, `color-input`), a checkable control (`checkbox`, `radio`, `toggle`), `badge` or `pagination-link`, whatever their conditions. | "Do not add `outlined` to a `surface-*` shortcut or to a component that paints its own border" (`presets.md`) |
429
429
  | `ring` | One of the six rings for the same condition. | "Pick one ring per variant" (`presets.md`) |
430
430
  | `dropdown-panel` | One of `dropdown-panel--popover` and `dropdown-panel--floating`, whatever their conditions. | "Choose one, on `dropdown-panel`, never on `dropdown-content`." (`presets.md`) |
431
431
  | `dropdown-content` | Denies `dropdown-panel--*`. | The same sentence. |
package/dist/preset.js CHANGED
@@ -43,7 +43,34 @@ const restyle = {
43
43
  { pattern: "surface-*", exclusive: [any("surface-panel", "surface-sunken", "surface-tooltip", "surface-menu", "surface-dialog", "surface-fullscreen")] },
44
44
  {
45
45
  pattern: "outlined",
46
- exclusive: ["surface-panel", "surface-sunken", "surface-tooltip", "surface-menu", "surface-dialog", "surface-fullscreen", "toolbar", "tab-list", "sheet", "tooltip-content", "modal", "mockup-code"].map((surface) => any("outlined", surface)),
46
+ exclusive: [
47
+ "surface-panel",
48
+ "surface-sunken",
49
+ "surface-tooltip",
50
+ "surface-menu",
51
+ "surface-dialog",
52
+ "surface-fullscreen",
53
+ "toolbar",
54
+ "tab-list",
55
+ "sheet",
56
+ "tooltip-content",
57
+ "modal",
58
+ "mockup-code",
59
+ "input",
60
+ "textarea",
61
+ "select",
62
+ "input-shell",
63
+ "join-text",
64
+ "otp-input",
65
+ "otp-slot",
66
+ "file-input",
67
+ "color-input",
68
+ "checkbox",
69
+ "radio",
70
+ "toggle",
71
+ "badge",
72
+ "pagination-link",
73
+ ].map((surface) => any("outlined", surface)),
47
74
  },
48
75
  { pattern: "ring", exclusive: [["ring", "ring-flat", "ring-inset", "ring-solid", "ring-shadow", "ring-shadow-flat"]] },
49
76
  { pattern: "dropdown-panel", exclusive: [any("dropdown-panel--popover", "dropdown-panel--floating")] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teacss/linter",
3
- "version": "0.10.15",
3
+ "version": "1.0.0-rc.0",
4
4
  "description": "oxlint plugin for TeaCSS: limits which classes a project may write",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,15 +33,15 @@
33
33
  "node": ">=26"
34
34
  },
35
35
  "dependencies": {
36
- "@teacss/engine": "0.10.15"
36
+ "@teacss/engine": "1.0.0-rc.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "oxlint": "1.94.x"
39
+ "oxlint": "1.95.x"
40
40
  },
41
41
  "devDependencies": {
42
- "@types/node": "^22.20.5",
43
- "oxlint": "1.94.0",
44
- "typescript": "^5.9.3"
42
+ "@types/node": "^26.6.11",
43
+ "oxlint": "1.95.0",
44
+ "typescript": "^7.0.2"
45
45
  },
46
46
  "scripts": {
47
47
  "build:ts": "node -e \"for (const d of ['build','dist']) require('fs').rmSync(d,{recursive:true,force:true})\" && tsc -p tsconfig.json && tsc -p tsconfig.test.json",