Skip to content

fix(apps): repair ESLint flat config lint#713

Merged
DorianZheng merged 1 commit into
mainfrom
codex/fix-eslint-flat-config
Jun 10, 2026
Merged

fix(apps): repair ESLint flat config lint#713
DorianZheng merged 1 commit into
mainfrom
codex/fix-eslint-flat-config

Conversation

@law-chain-hot

@law-chain-hot law-chain-hot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Point api and dashboard flat configs at the apps workspace base config, make the api migration lint target run from the apps workspace on macOS, and fix the Storybook hook errors exposed once dashboard lint can load.

Summary by CodeRabbit

  • Refactor

    • Simplified migration path validation logic in build scripts
    • Refactored Storybook component stories for improved code organization
    • Updated UI component type definition formatting
  • Chores

    • Updated ESLint configuration paths for consistency across applications
    • Adjusted build script paths for proper workspace structure alignment

Point api and dashboard flat configs at the apps workspace base config, make the api migration lint target run from the apps workspace on macOS, and fix the Storybook hook errors exposed once dashboard lint can load.
@law-chain-hot law-chain-hot requested a review from a team as a code owner June 10, 2026 04:16
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR updates workspace directory structure by adjusting ESLint import paths and script references from apps/ prefixes to relative paths, refactors the migration validation script to use bash parameter expansion, and extracts state management from Storybook story render functions into wrapper components. A minor formatting change to a TypeScript type definition is also included.

Changes

Workspace Path Restructuring

Layer / File(s) Summary
ESLint config import paths
apps/api/eslint.config.mjs, apps/dashboard/eslint.config.mjs
Base config imports updated from ../../eslint.config.mjs to ../eslint.config.mjs in both api and dashboard ESLint configurations.
Migration script path and validation logic
apps/api/project.json, apps/api/scripts/validate-migration-paths.sh
Lint target command updated to reference api/scripts/validate-migration-paths.sh. Script logic refactored to compute relative paths and extract timestamps using bash parameter expansion (${migration_path%%-*}) and numeric regex validation instead of realpath and grep.

Storybook Story State Extraction

Layer / File(s) Summary
Date picker story wrapper components
apps/dashboard/src/components/ui/stories/date-picker.stories.tsx
Default and WithValue stories extract useState into DefaultDatePicker and DatePickerWithValue wrapper components; story render functions now simply invoke these components.
Facet filter story wrapper component
apps/dashboard/src/components/ui/stories/facet-filter.stories.tsx
Default story extracts selected state into a DefaultFacetFilter wrapper component; render function simplified to return the wrapper.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Paths shortened, scripts lean,

Storybook states now cleanly seen,

Parameter expansion's grace,

Wrapper components find their place! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(apps): repair ESLint flat config lint' clearly and concisely summarizes the main change: fixing ESLint flat configuration issues across the apps workspace.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-eslint-flat-config

Comment @coderabbitai help to get the list of available commands and usage tips.

@DorianZheng DorianZheng enabled auto-merge June 10, 2026 04:18
@DorianZheng DorianZheng added this pull request to the merge queue Jun 10, 2026
Merged via the queue into main with commit 7f68dce Jun 10, 2026
30 of 31 checks passed
@DorianZheng DorianZheng deleted the codex/fix-eslint-flat-config branch June 10, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants