Repository navigation
v0.7.0
What changed
defineLint(config)in@perfectpan/lint-config/vite-plusmerges a repository's lint config into the shared one:categories,optionsandrulesmerge key by key,pluginsare added, andoverridesapply after the shared ones and the opt-in checks.lintandfmtare unchanged.- Two opt-in checks, off unless given:
tailwind: { stylesheets: [{ entryPoint, files, excludeFiles }], literalValues }:eslint-plugin-better-tailwindcssrules for unknown, conflicting, duplicate, non-canonical and concatenated classes and stray whitespace, plus literal colours or lengths in arbitrary values. Needs the plugin (new optional peer,>=4.10.0).shadcn: { ui, elements }: the listed elements and Radix primitives only inside the shadcn/ui files (@radix-ui/react-slotallowed everywhere), andreact/no-multi-compoff in those files.
- The rule rationale moved from the README to
docs/decisions.md; overrides and path exemptions todocs/overrides.md.
What newly fails
Nothing, unless a repository turns an opt-in check on. With tailwind, arbitrary values such as text-[14px], bg-[#fff] or shadow-[0_1px_rgb(0_0_0/0.1)] fail; set literalValues: false while adding theme tokens. With shadcn, a listed element or a Radix import outside ui fails; list only elements whose shadcn/ui component is installed.
Impact
PerfectPan/agent-kit apps/website, which already runs the first five Tailwind rules: no-restricted-classes 43 hits in 20 files, no-concatenated-classes 3 hits (all in src/lib/utils.test.ts); shadcn with elements: ["button"] 0 hits.
Upgrade
Change #v0.6.1 to #v0.7.0 in the @perfectpan/lint-config dependency, then reinstall.