learning_ai_common_plat/dashboards
saravanakumardb1 eed654418e fix(admin-web/eslint): hoist .cjs ignore to index-0 ignores block
The previous fix (commit a4ee36b6) added '.pnpmfile.cjs' to the
globalIgnores() call at the END of the admin-web eslint config,
but flat-config v9 only applies ignores from the FIRST config
object that contains an 'ignores' key — every subsequent config
item is matched against the file before the late ignore is read.
That's why CI run 66 still failed with the same require() error
even after the dashboard-level ignore was in place.

Fix: declare an explicit '{ ignores: [...] }' at array index 0,
which is the documented eslint v9 pattern for skipping files
before any rule config attaches:

  defineConfig([
    { ignores: ['**/.pnpmfile.cjs', '**/*.cjs'] },  // <-- now first
    ...nextVitals,
    ...nextTs,
    { rules: { ... } },
    globalIgnores([ ... ]),
  ])

Verified locally:
  cd dashboards/admin-web && npx eslint .  -> 0 errors, 0 warnings
2026-05-23 17:15:34 -07:00
..
admin-web fix(admin-web/eslint): hoist .cjs ignore to index-0 ignores block 2026-05-23 17:15:34 -07:00
tracker-web feat(scripts+ui): Tier 2 complete \u2014 common_plat 0 hex findings (was 59) 2026-05-23 14:37:51 -07:00
ux-lab docs(ux-lab): consolidate each kit to single PROMPT.md + .gitignore only 2026-03-05 21:42:19 -08:00