{"_id":"@candlelight-ds/eslint-plugin","_rev":"2-03372f9b817f823e6af89d9e7087cd32","name":"@candlelight-ds/eslint-plugin","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@candlelight-ds/eslint-plugin","version":"0.1.0","keywords":["eslint","eslintplugin","eslint-plugin","design-system","candlelight"],"license":"MIT","_id":"@candlelight-ds/eslint-plugin@0.1.0","maintainers":[{"name":"tommygeoco","email":"tomgeoco@gmail.com"}],"homepage":"https://github.com/tommygeoco/candlelight#readme","bugs":{"url":"https://github.com/tommygeoco/candlelight/issues"},"dist":{"shasum":"3287f10b2eba0b281f510a762bf4ca92bb2feb87","tarball":"https://registry.npmjs.org/@candlelight-ds/eslint-plugin/-/eslint-plugin-0.1.0.tgz","fileCount":4,"integrity":"sha512-DDmK80kVaypb7mZj/vZpKDY1PIt3mh0dJJ7yx6FJ6kHSZPDyTNNFUxXpVvacyCB/PpFwLf4rkXn02OSgozJhyg==","signatures":[{"sig":"MEYCIQCK4ZxPJPjU7JSqy2i9XiBbaCbG13VYOW480qzukEkE2wIhAIcNscR5pOExmeReawxrhnG272GLv+eQ7iZ9gYFHh2dW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14346},"main":"./index.mjs","type":"module","exports":{".":"./index.mjs","./package.json":"./package.json"},"gitHead":"2db0eafc58b3517323c399f778cf589478fbf162","scripts":{"test":"node --test"},"_npmUser":{"name":"tommygeoco","email":"tomgeoco@gmail.com"},"repository":{"url":"git+https://github.com/tommygeoco/candlelight.git","type":"git","directory":"packages/eslint-plugin"},"_npmVersion":"11.17.0","description":"Candlelight's governance as code — the spec's Appendix-D lint guards as a shareable ESLint flat-config plugin: token discipline, the gradient ban, wrapped primitives, one overlay engine, no bare keydown listeners.","directories":{},"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9"},"peerDependencies":{"eslint":">=9"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin_0.1.0_1783840829052_0.3419301300516322","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@candlelight-ds/eslint-plugin","version":"0.2.0","description":"Candlelight's governance as code — the spec's Appendix-D lint guards as a shareable ESLint flat-config plugin: token discipline, the gradient ban, wrapped primitives, one overlay engine, no bare keydown listeners.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/tommygeoco/candlelight.git","directory":"packages/eslint-plugin"},"keywords":["eslint","eslintplugin","eslint-plugin","design-system","candlelight"],"publishConfig":{"access":"public"},"type":"module","main":"./index.mjs","exports":{".":"./index.mjs","./package.json":"./package.json"},"peerDependencies":{"eslint":">=9"},"devDependencies":{"eslint":"^9"},"scripts":{"test":"node --test"},"gitHead":"fed40079fe6fb88ef56d593285a7c407593e07be","_id":"@candlelight-ds/eslint-plugin@0.2.0","bugs":{"url":"https://github.com/tommygeoco/candlelight/issues"},"homepage":"https://github.com/tommygeoco/candlelight#readme","_nodeVersion":"26.4.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-iMci0RMM8C2TeEUR3NNZb89lG0xcXXNh3m7SRmyJw94T+TTdYYRpgrP0rrEQC2BcQzs1InVE/s2NidWp6pRPwA==","shasum":"124265d70b8231a973e3793fee2d2a7fb33dfe85","tarball":"https://registry.npmjs.org/@candlelight-ds/eslint-plugin/-/eslint-plugin-0.2.0.tgz","fileCount":4,"unpackedSize":15568,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDea4pNwBBSwTwI3EPRo8TM79HRkrbgiDls9DlDaFUOsgIgXDcPIpxyQOQaLb9PDbT1KiEMorno5oijhaLjPuzulRA="}]},"_npmUser":{"name":"tommygeoco","email":"tomgeoco@gmail.com"},"directories":{},"maintainers":[{"name":"tommygeoco","email":"tomgeoco@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin_0.2.0_1783844050154_0.3421824602227377"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-12T07:20:28.887Z","modified":"2026-07-12T08:14:10.423Z","0.1.0":"2026-07-12T07:20:29.182Z","0.2.0":"2026-07-12T08:14:10.289Z"},"bugs":{"url":"https://github.com/tommygeoco/candlelight/issues"},"license":"MIT","homepage":"https://github.com/tommygeoco/candlelight#readme","keywords":["eslint","eslintplugin","eslint-plugin","design-system","candlelight"],"repository":{"type":"git","url":"git+https://github.com/tommygeoco/candlelight.git","directory":"packages/eslint-plugin"},"description":"Candlelight's governance as code — the spec's Appendix-D lint guards as a shareable ESLint flat-config plugin: token discipline, the gradient ban, wrapped primitives, one overlay engine, no bare keydown listeners.","maintainers":[{"name":"tommygeoco","email":"tomgeoco@gmail.com"}],"readme":"# @candlelight-ds/eslint-plugin\n\n[Candlelight](https://github.com/tommygeoco/candlelight)'s governance as\ncode — the spec's Appendix-D guards as an ESLint flat-config plugin. The\nsystem polices itself: drift is a build error, not a review comment\n(spec §11).\n\n## Install\n\n```bash\npnpm add -D @candlelight-ds/eslint-plugin\n```\n\n```js\n// eslint.config.mjs\nimport candlelight from \"@candlelight-ds/eslint-plugin\";\n\nexport default [\n  // …your framework configs…\n  ...candlelight.configs.recommended,\n];\n```\n\n## What it guards\n\n| Guard | Law |\n|---|---|\n| No `white/*` alphas, `bg-black`, `neutral-*` grays in `className` | The ink ladder and fill ramp are the only paints (§2.2, §2.4) |\n| No gradients — utilities, literals, or template strings | Place reads through accents and words (§2.1) |\n| No `title=` on DOM elements | Wrap the control in `ui/Tooltip` (§4) |\n| No primitive-library imports outside `ui/` | Radix (or equivalent) is wrapped (§4) |\n| No `fixed inset-0` outside `ui/` | One overlay engine — Overlay/Sheet only (§8) |\n| No bare `window`/`document` `keydown` listeners | Surfaces declare bindings through the surface-keyboard hook (§5) |\n| No arbitrary `rounded-[…]`, `z-[…]`, `text-[Npx]`, `tracking-[…]`, `duration-[…]` | The scales are closed sets with names — rounded-cap/sm/md/lg, the z ladder, the type scale, the motion budget (§2.5–§2.7) |\n\n## Custom layout\n\n```js\nimport { candlelightGuards } from \"@candlelight-ds/eslint-plugin\";\n\nexport default [\n  ...candlelightGuards({\n    files: [\"src/**/*.{ts,tsx}\"],\n    uiFiles: [\"src/ui/**\"],\n    primitives: \"@radix-ui/*\",\n  }),\n];\n```\n\n## The two gotchas this plugin exists to absorb\n\n1. **Flat-config replacement.** A later config block configuring\n   `no-restricted-syntax` REPLACES the earlier block's selectors wholesale\n   for files both match — it never merges. Every block this plugin emits\n   carries the full union of the selectors its files need. If you add your\n   own `no-restricted-syntax` block for the same files, spread the exported\n   groups (`tokenDiscipline`, `gradientBan`, `titleBan`, `floatingShellBan`)\n   into it, or your block will silently erase the guards.\n\n2. **esquery slash escaping.** Regex literals in selectors terminate at the\n   first `/` even when backslash-escaped — `\\/` crashes ESLint at startup.\n   Slashes are matched with the `/` regex escape instead (written\n   `\\\\u002F` inside a JS string). Copy the exported selectors rather than\n   re-deriving them.\n\nBoth are covered by the package's tests.\n","readmeFilename":"README.md"}