shadscan-vue 0.0.0 → 0.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.1](https://github.com/vinayakkulkarni/shadscan-vue/compare/v0.1.0...v0.1.1) (2026-07-25)
4
+
5
+
6
+ ### Documentation
7
+
8
+ * point the package and readmes at the live site ([72c9546](https://github.com/vinayakkulkarni/shadscan-vue/commit/72c9546592d4d95474c4266b1e62f654f4f21320))
9
+
10
+ ## 0.1.0 (2026-07-25)
11
+
12
+
13
+ ### Features
14
+
15
+ * **cli:** add rule catalog, setup hook, and roast copy ([65824fe](https://github.com/vinayakkulkarni/shadscan-vue/commit/65824fe77175fd14e2e8fa8a84a006936ee0e4d2))
16
+ * **cli:** engine core with discovery, parsing, audit runtime ([1e99838](https://github.com/vinayakkulkarni/shadscan-vue/commit/1e998389b8e9b6415c146f7010384042ddec5d16))
17
+ * **rules:** 8 accessibility rules with fixture-based TDD suite ([c4d9bd5](https://github.com/vinayakkulkarni/shadscan-vue/commit/c4d9bd5848887481c4fca30094b96cf0bbc0490b))
18
+ * **rules:** 8 foundation rules with fixture-based TDD suite ([5bc6bae](https://github.com/vinayakkulkarni/shadscan-vue/commit/5bc6baed1da1baa5dfdc51ea6d82a55802d43c42))
19
+ * **rules:** 8 interaction rules with fixture-based TDD suite ([8c51912](https://github.com/vinayakkulkarni/shadscan-vue/commit/8c5191235a4ea50a65aa44d1dd2c5b1890d0dd91))
20
+ * **rules:** 9 production-polish rules with fixture-based TDD suite ([c21a390](https://github.com/vinayakkulkarni/shadscan-vue/commit/c21a39079e79eaeb169e752efca3044f0e9763c0))
21
+ * **rules:** audit dialog accessible names across reka-ui primitives ([cbeccc7](https://github.com/vinayakkulkarni/shadscan-vue/commit/cbeccc775b3b74e73c6886eca2e9d94632d09854))
22
+ * **rules:** complete forms category with 7 rules and TDD suite ([2183930](https://github.com/vinayakkulkarni/shadscan-vue/commit/21839301a7e9601f0c83afa990f7a3c6461b060e))
23
+ * **rules:** complete states category with 8 rules and TDD suite ([671a26f](https://github.com/vinayakkulkarni/shadscan-vue/commit/671a26f4b75dfd9efb312d08ee163d9cc46d3e05))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **cli:** honour roast defaults and ship the package readme ([bb1c19e](https://github.com/vinayakkulkarni/shadscan-vue/commit/bb1c19e19dd417aa6e941c6612458022a0332e51))
29
+ * **rules:** do not fail alias resolution before configs are generated ([b04eea4](https://github.com/vinayakkulkarni/shadscan-vue/commit/b04eea4ea25b964320ac63f2ce733a6edc3f6229))
30
+ * **rules:** resolve shadcn aliases through project references ([04db057](https://github.com/vinayakkulkarni/shadscan-vue/commit/04db057614b4a68d6afa0b6fd648de5ab199c509))
31
+ * **test:** commit the generated Nuxt config used by alias fixtures ([de9723f](https://github.com/vinayakkulkarni/shadscan-vue/commit/de9723fa1b57d17231c8d8045a81b1c7ed683883))
32
+
33
+
34
+ ### Miscellaneous
35
+
36
+ * scaffold shadscan-vue monorepo ([7a3eb62](https://github.com/vinayakkulkarni/shadscan-vue/commit/7a3eb62dcfc74345bcb62d147536e90006132998))
37
+
38
+ ## Changelog
39
+
3
40
  All notable changes to this project are documented in this file.
4
41
 
5
42
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  Deterministic checks. Evidence. Agent-ready fixes. Static audit — no AI required.
6
6
 
7
+ **[shadscan-vue.geoql.in](https://shadscan-vue.geoql.in)** — rule catalog, docs, and changelog.
8
+
7
9
  `shadscan-vue` audits **shadcn-vue** (Vue 3 + Vite) and **shadcn-nuxt** (Nuxt 4)
8
10
  applications for the fundamentals that are easy to skip and expensive to miss:
9
11
  theme wiring, command menus, route and error states, accessible controls, form
File without changes
package/dist/index.js CHANGED
@@ -2803,9 +2803,19 @@ const baseIdentifier = (collection) => {
2803
2803
  return /([A-Za-z_$][\w$]*)\s*$/u.exec(collection)?.[1];
2804
2804
  };
2805
2805
  /** True when the file's script region references the identifier. */
2806
+ const scriptSource = (file) => file.sfc?.descriptor.scriptSetup?.content ?? file.sfc?.descriptor.script?.content ?? "";
2806
2807
  const scriptDefines = (file, identifier) => {
2807
- const script = file.sfc?.descriptor.scriptSetup?.content ?? file.sfc?.descriptor.script?.content ?? "";
2808
- return new RegExp(`\\b${identifier}\\b`, "u").test(script);
2808
+ return new RegExp(`\\b${identifier}\\b`, "u").test(scriptSource(file));
2809
+ };
2810
+ /**
2811
+ * A collection assigned a non-empty array literal at declaration cannot be
2812
+ * empty at runtime, so demanding an empty state for it reports a failure the
2813
+ * author cannot act on. Matches `const tabs = [` and typed forms such as
2814
+ * `const tabs: Tab[] = [`, then confirms the literal has at least one entry.
2815
+ */
2816
+ const isStaticNonEmptyLiteral = (file, identifier) => {
2817
+ const declaration = new RegExp(`\\b(?:const|let|var)\\s+${identifier}\\b[^=]*=\\s*\\[\\s*([^\\]])`, "su").exec(scriptSource(file));
2818
+ return declaration !== null && declaration[1] !== void 0;
2809
2819
  };
2810
2820
  /** True when the file contains an empty-branch guard for the collection. */
2811
2821
  const hasEmptyBranch = (fileText, collection, identifier) => {
@@ -2847,7 +2857,7 @@ const emptyStatePresent = {
2847
2857
  if (collection === void 0) continue;
2848
2858
  const identifier = baseIdentifier(collection);
2849
2859
  if (identifier === void 0) continue;
2850
- if (!scriptDefines(file, identifier)) continue;
2860
+ if (!scriptDefines(file, identifier) || isStaticNonEmptyLiteral(file, identifier)) continue;
2851
2861
  if (hasEmptyBranch(file.text, collection, identifier)) continue;
2852
2862
  failures.push({
2853
2863
  message: `<${element.tag}> iterates \`${collection}\` with no empty-state branch in this file.`,
@@ -3225,7 +3235,7 @@ const buttonIconsHaveDataIcon = {
3225
3235
  //#region src/rules/production-polish/metadata-title-description-complete.ts
3226
3236
  const TITLE_PATTERN = /\b(?:title|titleTemplate)\s*:/u;
3227
3237
  const DESCRIPTION_PATTERN = /\bdescription\s*:/u;
3228
- const HEAD_CALL_PATTERN = /\b(?:useSeoMeta|useHead|definePageMeta)\s*\(/u;
3238
+ const HEAD_CALL_PATTERN = /\b(?:useSeoMeta|useHead)\s*\(/u;
3229
3239
  const metadataTitleDescriptionComplete = {
3230
3240
  id: "metadata-title-description-complete",
3231
3241
  title: "Routable pages declare a title and description",