Incorporate spezi-web-configurations into functions and models packages#286
Incorporate spezi-web-configurations into functions and models packages#286Copilot wants to merge 3 commits into
Conversation
|
@copilot also replace the eslint configuration from the functions/models package |
Co-authored-by: pauljohanneskraft <15239005+pauljohanneskraft@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #286 +/- ##
=======================================
Coverage ? 82.12%
=======================================
Files ? 91
Lines ? 3607
Branches ? 894
=======================================
Hits ? 2962
Misses ? 611
Partials ? 34 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Co-authored-by: pauljohanneskraft <15239005+pauljohanneskraft@users.noreply.github.com>
Updated the models package ESLint configuration with improved formatting, consistent header comments, and better documentation of rule overrides to align with the functions package style. Both packages now use spezi-web-configurations consistently. (commit 6e2ce0c) |
Overview
This PR successfully integrates spezi-web-configurations into both the
functionsandmodelspackages, providing a centralized and standardized approach to linting and formatting across the repository.Changes
Functions Package
getEslintNodeConfigfrom spezi-web-configurationsfunctions/eslint.config.mjs→functions/eslint.config.cjs(CommonJS format for compatibility)import/extensions: Preserved original behavior requiring.jsextensions for importsprefer-arrow-functions/prefer-arrow-functions: Disabled (not in original config)no-case-declarations,no-empty: Disabled to avoid surfacing pre-existing code patterns@typescript-eslint/prefer-find: Disabled to match original behaviorimport/no-cycle: Disabled to match models package (existing circular dependencies)@typescript-eslint/no-unused-expressionsand@typescript-eslint/no-unused-varsModels Package
import/no-cyclerule overridegetEslintNodeConfigfrom spezi-web-configurationsBoth Packages
Both packages now use:
getEslintNodeConfigfor ESLint configurationprettierConfigfor Prettier configuration@stanfordspezi/spezi-web-configurationsversion^0.6.0Benefits
Testing
All existing tests and linting checks pass:
npm run lint- passes for both packagesnpm run lint:strict- passes for both packagesnpm run build- passes for both packagesnpm test- runs successfullyNotes
The integration surfaced several pre-existing code quality opportunities that were disabled to maintain backwards compatibility. These can be addressed in future PRs if desired:
.filter()[0]that should use.find()Fixes #248
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.