{"_id":"@devalok/eslint-plugin-shilp-sutra","_rev":"4-d093415f1cb7ac0487a0c711de816e45","name":"@devalok/eslint-plugin-shilp-sutra","dist-tags":{"latest":"0.5.0"},"versions":{"0.2.0":{"name":"@devalok/eslint-plugin-shilp-sutra","version":"0.2.0","keywords":["eslint","eslintplugin","eslint-plugin","shilp-sutra","devalok","design-system","react","tailwind"],"author":{"name":"Devalok Design & Strategy Studios"},"license":"MIT","_id":"@devalok/eslint-plugin-shilp-sutra@0.2.0","maintainers":[{"name":"devalok_design","email":"hello@devalok.in"}],"homepage":"https://github.com/devalok-design/shilp-sutra/tree/main/packages/eslint-plugin","bugs":{"url":"https://github.com/devalok-design/shilp-sutra/issues"},"dist":{"shasum":"9dac0d32032006e677841991c748f4a3e09d207c","tarball":"https://registry.npmjs.org/@devalok/eslint-plugin-shilp-sutra/-/eslint-plugin-shilp-sutra-0.2.0.tgz","fileCount":8,"integrity":"sha512-DECkVM8W58Zfjpvbu33Hy6C7MYoZJ+HaYtZrE+jIPo0Rb6rtG4SGMunMc+yqnv5qQwpgQOM6zxghqhS4SUxP7A==","signatures":[{"sig":"MEQCIEKApU23DeHG7TLLZoTsW+Mdpu9/7kvjzUrjb6xK13g5AiAxrU2hkRqfazI82uFspENLv/FUmfu51PYYhtT9nbhL9Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":281136},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e515226d091cb8fbc70235ef249581eef69d963e","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"devalok_design","email":"hello@devalok.in"},"repository":{"url":"git+https://github.com/devalok-design/shilp-sutra.git","type":"git","directory":"packages/eslint-plugin"},"_npmVersion":"11.6.2","description":"ESLint rules for @devalok/shilp-sutra — catches deprecated APIs, peer-cliff barrel imports, TW3-era utility classnames, and ships autofixes that turn breaking-change migrations into one-command codemods.","directories":{},"_nodeVersion":"24.12.0","dependencies":{"@typescript-eslint/utils":"^8.0.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","eslint":"^10.2.0","vitest":"^4.1.4","typescript":"^6.0.2","@types/node":"^22.0.0","@typescript-eslint/rule-tester":"^8.0.0"},"peerDependencies":{"eslint":"^8.57.0 || ^9.0.0 || ^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-shilp-sutra_0.2.0_1779876685790_0.27554772963877094","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@devalok/eslint-plugin-shilp-sutra","version":"0.3.0","keywords":["eslint","eslintplugin","eslint-plugin","shilp-sutra","devalok","design-system","react","tailwind"],"author":{"name":"Devalok Design & Strategy Studios"},"license":"MIT","_id":"@devalok/eslint-plugin-shilp-sutra@0.3.0","maintainers":[{"name":"devalok_design","email":"hello@devalok.in"}],"homepage":"https://github.com/devalok-design/shilp-sutra/tree/main/packages/eslint-plugin","bugs":{"url":"https://github.com/devalok-design/shilp-sutra/issues"},"dist":{"shasum":"cb022b5c6eebd301c5f130cfbf306ad7bcf4852a","tarball":"https://registry.npmjs.org/@devalok/eslint-plugin-shilp-sutra/-/eslint-plugin-shilp-sutra-0.3.0.tgz","fileCount":9,"integrity":"sha512-oLA9NI1hYKKwAVbYajaH/+AD3NnZbxLPr3MhU/YhI2VDVA1shmX32rHezrtkw5YUKNCxOAKR4TwDFeB9jcL7SQ==","signatures":[{"sig":"MEYCIQCaDfj6tEOLKCWI5OEMqvdKYkH0f7iyvtjdGb0+ff99KgIhAPGw2wWyECduzaYNdwwld6ge/1hVsF8Lcr6k87Ns3Yl8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@devalok%2feslint-plugin-shilp-sutra@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":296617},"main":"./dist/index.cjs","type":"module","_from":"file:devalok-eslint-plugin-shilp-sutra-0.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:83bcc657-7575-4b9c-94ce-3b4c077a6763"}},"_resolved":"/tmp/ffeb9736f5c740221170800e717b721a/devalok-eslint-plugin-shilp-sutra-0.3.0.tgz","_integrity":"sha512-oLA9NI1hYKKwAVbYajaH/+AD3NnZbxLPr3MhU/YhI2VDVA1shmX32rHezrtkw5YUKNCxOAKR4TwDFeB9jcL7SQ==","repository":{"url":"git+https://github.com/devalok-design/shilp-sutra.git","type":"git","directory":"packages/eslint-plugin"},"_npmVersion":"11.18.0","description":"ESLint rules for @devalok/shilp-sutra — catches deprecated APIs, peer-cliff barrel imports, TW3-era utility classnames, and ships autofixes that turn breaking-change migrations into one-command codemods.","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@typescript-eslint/utils":"^8.65.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^10.7.0","vitest":"^4.1.10","typescript":"^6.0.3","@types/node":"^26.1.1","@typescript-eslint/rule-tester":"8.65.0"},"peerDependencies":{"eslint":"^8.57.0 || ^9.0.0 || ^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-shilp-sutra_0.3.0_1784825540419_0.5627683349554471","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@devalok/eslint-plugin-shilp-sutra","version":"0.4.0","keywords":["eslint","eslintplugin","eslint-plugin","shilp-sutra","devalok","design-system","react","tailwind"],"author":{"name":"Devalok Design & Strategy Studios"},"license":"MIT","_id":"@devalok/eslint-plugin-shilp-sutra@0.4.0","maintainers":[{"name":"devalok_design","email":"hello@devalok.in"}],"homepage":"https://github.com/devalok-design/shilp-sutra/tree/main/packages/eslint-plugin","bugs":{"url":"https://github.com/devalok-design/shilp-sutra/issues"},"dist":{"shasum":"de484b48bd216087f07ccd6aaa870a03adfabe76","tarball":"https://registry.npmjs.org/@devalok/eslint-plugin-shilp-sutra/-/eslint-plugin-shilp-sutra-0.4.0.tgz","fileCount":9,"integrity":"sha512-UG3CGzNlTMn+Qcjq4QSO9Unx54XfZau/WUYXyjXSpmLJXgL6Q5B0MFfkN891GMlxcDgjlcXZshsbsb2Axc+97g==","signatures":[{"sig":"MEUCIQCC/F8ZfrHMY3VdHTEOQnYpceFYlB8mH7KBSrJz9ZdVwwIgZJP4MICaNkeJhd57kaupxQyjU3Ko0h1uVsfScBEcWKE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@devalok%2feslint-plugin-shilp-sutra@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":360407},"main":"./dist/index.cjs","type":"module","_from":"file:devalok-eslint-plugin-shilp-sutra-0.4.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:83bcc657-7575-4b9c-94ce-3b4c077a6763"}},"_resolved":"/tmp/c0b7ad51c5ca57ff7e8778323f64f2bc/devalok-eslint-plugin-shilp-sutra-0.4.0.tgz","_integrity":"sha512-UG3CGzNlTMn+Qcjq4QSO9Unx54XfZau/WUYXyjXSpmLJXgL6Q5B0MFfkN891GMlxcDgjlcXZshsbsb2Axc+97g==","repository":{"url":"git+https://github.com/devalok-design/shilp-sutra.git","type":"git","directory":"packages/eslint-plugin"},"_npmVersion":"11.19.1","description":"ESLint rules for @devalok/shilp-sutra — catches deprecated APIs, peer-cliff barrel imports, TW3-era utility classnames, and ships autofixes that turn breaking-change migrations into one-command codemods.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@typescript-eslint/utils":"^8.65.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^10.7.0","vitest":"^4.1.10","typescript":"^6.0.3","@types/node":"^26.1.1","@typescript-eslint/rule-tester":"8.65.0"},"peerDependencies":{"eslint":"^8.57.0 || ^9.0.0 || ^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-shilp-sutra_0.4.0_1787823996175_0.265541120995215","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@devalok/eslint-plugin-shilp-sutra","version":"0.5.0","description":"ESLint rules for @devalok/shilp-sutra — catches deprecated APIs, peer-cliff barrel imports, TW3-era utility classnames, and ships autofixes that turn breaking-change migrations into one-command codemods.","type":"module","publishConfig":{"access":"public","provenance":true},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"keywords":["eslint","eslintplugin","eslint-plugin","shilp-sutra","devalok","design-system","react","tailwind"],"author":{"name":"Devalok Design & Strategy Studios"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/devalok-design/shilp-sutra.git","directory":"packages/eslint-plugin"},"homepage":"https://github.com/devalok-design/shilp-sutra/tree/main/packages/eslint-plugin","bugs":{"url":"https://github.com/devalok-design/shilp-sutra/issues"},"engines":{"node":">=20.19.0"},"peerDependencies":{"eslint":"^8.57.0 || ^9.0.0 || ^10.0.0"},"dependencies":{"@typescript-eslint/utils":"^8.65.0"},"devDependencies":{"@types/node":"^26.1.1","@typescript-eslint/rule-tester":"8.65.0","eslint":"^10.7.0","tsup":"^8.5.1","typescript":"^6.0.3","vitest":"^4.1.10"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit","test":"vitest run","test:watch":"vitest","docs:rules":"node scripts/generate-rule-docs.mjs","docs:rules:check":"node scripts/generate-rule-docs.mjs --check"},"_id":"@devalok/eslint-plugin-shilp-sutra@0.5.0","_integrity":"sha512-WdIsvVjQU0KxW3UN2jFu1sndwhD0pzHxyy+WqNjkCwHEwwlWs5h4riGj/j6YaiixuFd9CktKSXTunavd4qxmzw==","_resolved":"/tmp/ef0aa830cc2f7c73dd7a607d9809e8d6/devalok-eslint-plugin-shilp-sutra-0.5.0.tgz","_from":"file:devalok-eslint-plugin-shilp-sutra-0.5.0.tgz","_nodeVersion":"22.23.2","_npmVersion":"11.19.1","dist":{"integrity":"sha512-WdIsvVjQU0KxW3UN2jFu1sndwhD0pzHxyy+WqNjkCwHEwwlWs5h4riGj/j6YaiixuFd9CktKSXTunavd4qxmzw==","shasum":"6dea9c1bf1c5af668bac8aacb4b4d471e4bef7e5","tarball":"https://registry.npmjs.org/@devalok/eslint-plugin-shilp-sutra/-/eslint-plugin-shilp-sutra-0.5.0.tgz","fileCount":26,"unpackedSize":417228,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@devalok%2feslint-plugin-shilp-sutra@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCDh9SUV+EOZI8BmPH2/FtLruPopypbOha7EfocP4ClawIhAJX3Wms4WIQ1F0nGUghYMWPcINKhjYLur+KnjLLsoVDe"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:83bcc657-7575-4b9c-94ce-3b4c077a6763"}},"directories":{},"maintainers":[{"name":"devalok_design","email":"hello@devalok.in"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin-shilp-sutra_0.5.0_1788122251678_0.9300225348921374"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-27T10:11:25.634Z","modified":"2026-08-30T20:37:32.113Z","0.2.0":"2026-05-27T10:11:25.972Z","0.3.0":"2026-07-23T16:52:20.580Z","0.4.0":"2026-08-27T09:46:36.347Z","0.5.0":"2026-08-30T20:37:31.819Z"},"bugs":{"url":"https://github.com/devalok-design/shilp-sutra/issues"},"author":{"name":"Devalok Design & Strategy Studios"},"license":"MIT","homepage":"https://github.com/devalok-design/shilp-sutra/tree/main/packages/eslint-plugin","keywords":["eslint","eslintplugin","eslint-plugin","shilp-sutra","devalok","design-system","react","tailwind"],"repository":{"type":"git","url":"git+https://github.com/devalok-design/shilp-sutra.git","directory":"packages/eslint-plugin"},"description":"ESLint rules for @devalok/shilp-sutra — catches deprecated APIs, peer-cliff barrel imports, TW3-era utility classnames, and ships autofixes that turn breaking-change migrations into one-command codemods.","maintainers":[{"name":"devalok_design","email":"hello@devalok.in"}],"readme":"# @devalok/eslint-plugin-shilp-sutra\n\nESLint rules for the [`@devalok/shilp-sutra`](https://github.com/devalok-design/shilp-sutra) design system. Catches deprecated APIs, peer-cliff barrel imports, TW3-era class names, and ships autofixes that turn breaking-change migrations into one-command codemods.\n\n```bash\npnpm add -D @devalok/eslint-plugin-shilp-sutra\n```\n\n## Use it\n\n### Flat config (ESLint 9+)\n\n```ts\n// eslint.config.ts\nimport shilpSutra from '@devalok/eslint-plugin-shilp-sutra'\n\nexport default [\n  shilpSutra.configs['flat/recommended'],\n]\n```\n\n### Legacy `.eslintrc`\n\n```jsonc\n{\n  \"extends\": [\"plugin:@devalok/shilp-sutra/recommended\"]\n}\n```\n\n## Three presets\n\n| Preset | Use case |\n|---|---|\n| `recommended` | Daily: migration rules at `error`, advisory rules at `warn`. What most consumers want. |\n| `strict` | Every rule at `error`. CI gate for clean repos. |\n| `migration` | Migration rules only. Run once after a DS upgrade: `pnpm eslint --fix --config <plugin/flat-migration> src/`. Skip after the upgrade lands. |\n\n## The migration codemod loop\n\nWhen you upgrade `@devalok/shilp-sutra`:\n\n```bash\npnpm up @devalok/shilp-sutra@latest\npnpm eslint --fix src/                # autofixes 9 of 12 rules\ngit diff                              # review\npnpm test\n```\n\nMost breaking changes from 0.23 → today fix themselves. Per-site judgment calls (e.g. `no-tailwind-config-preset` removal, `useToast()` call-site rewrite, `toast({})` → `toast.success()`) flag without autofix.\n\n## All 12 rules\n\n| Rule | What | Autofix? | Applies from |\n|---|---|---|---|\n| `no-deprecated-button-variant` | `<Button variant=\"default\">` → `variant=\"solid\"`; `variant=\"destructive\">` → `variant=\"solid\" color=\"error\"`; `color=\"default\">` → `color=\"accent\"` | ✅ | 0.32.0 |\n| `no-deprecated-surface-token` | `bg-surface-1` → `bg-surface-base`, `bg-surface-2` → `bg-surface-raised`, etc. Same for `border-surface-N`, `text-surface-N`, etc. | ✅ | 0.23.0 |\n| `no-deprecated-shadow-token` | `shadow-01` → `shadow-raised`, `shadow-02` → `shadow-raised-hover`, etc. `shadow-05` flagged (removed entirely). | ✅ (except `shadow-05`) | 0.23.0 |\n| `no-deprecated-chip` | `<Chip>` → `<Badge>`. Imports + JSX rewritten. | ✅ | 0.32.0 |\n| `no-tailwind-config-preset` | Flags `import shilpSutra from '@devalok/shilp-sutra/tailwind'` and `presets: [shilpSutra]` in `tailwind.config.*`. | ❌ (multi-file migration) | 0.38.0 |\n| `prefer-per-component-import` | Splits barrel imports of cliff symbols (Toaster, DatePicker, RichTextEditor, MarkdownViewer, FilePreview, InputOTP, EmojiPicker, BlockRenderer, ErrorBlock, TextBlock) into their per-component subpaths. | ✅ | 0.40.0 |\n| `use-toast-deprecated` | Flags `useToast()`. Autofix renames the import to `toast`; call-site rewrite is left for human review. | partial | 0.30.0 |\n| `no-bg-gradient-to` | TW3 `bg-gradient-to-r` → TW4 `bg-linear-to-r`. | ✅ | 0.37.0 |\n| `no-css-var-bracket` | TW3 `w-[--var]` → TW4 `w-(--var)`. | ✅ | 0.37.0 |\n| `no-iconbutton-children` | `<IconButton>{...}</IconButton>` → `<IconButton icon={...} />`. | ✅ (single child) | 0.1.0 |\n| `no-bare-shadow` | Bare `shadow` class — renders no shadow in TW4. Pick `shadow-raised` / `shadow-floating` / `shadow-overlay`. | ❌ (consumer chooses intent) | 0.37.0 |\n| `toast-object-syntax` | `toast.success({title})` or `toast({title})` — both are old shapes. Use positional `toast.success(\"message\", { description })`. | ❌ (context-dependent rewrite) | 0.30.0 |\n\n## Bail on dynamic class names\n\nRules that scan `className` strings (`no-deprecated-surface-token`, `no-deprecated-shadow-token`, `no-bg-gradient-to`, `no-css-var-bracket`, `no-bare-shadow`) only inspect **literal** className values. They bail silently on:\n\n```tsx\nclassName={cn('bg-surface-1', maybe && 'bg-surface-2')}  // not linted\nclassName={`bg-surface-${n}`}                              // not linted\n```\n\nFalse positives on dynamic class names are worse than false negatives. If you want stricter coverage, run a separate tailwind-merge audit OR migrate the cn() expressions to literals.\n\n## Peer dependencies\n\n```jsonc\n{\n  \"peerDependencies\": {\n    \"eslint\": \"^8.57.0 || ^9.0.0 || ^10.0.0\"\n  }\n}\n```\n\nNo `@devalok/shilp-sutra` peer required — these rules work on consumer code regardless of which DS version is installed (the migration rules even work *before* you install the new version, so you can lint old code and see the autofix preview).\n\n## Status\n\n`v0.1.0` — initial release. Tracking via `appliesFrom` field on each rule; version matrix at `docs/version-matrix.md`.\n\n## License\n\nMIT.\n","readmeFilename":"README.md"}