-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update eslint config in packages/runtime/runtime-utils to extend "recommended" base config #23956
base: main
Are you sure you want to change the base?
Update eslint config in packages/runtime/runtime-utils to extend "recommended" base config #23956
Conversation
…ommended" base config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR updates the ESLint configuration in packages/runtime/runtime-utils to extend the "recommended" base config and adjusts several files for improved type safety and consistency. Key changes include updating lint rules, standardizing UTF encoding strings from "utf-8" to "utf8", and adding explicit return types as well as minor refactoring throughout the codebase.
Reviewed Changes
File | Description |
---|---|
packages/runtime/runtime-utils/.eslintrc.cjs | Changed ESLint config from a deprecated minimal config to the recommended configuration. |
packages/runtime/runtime-utils/src/dataStoreHelpers.ts | Updated type definitions and error handling logic for improved type safety. |
packages/runtime/runtime-utils/src/handles.ts | Refactored type checking for serialized handles using unknown type. |
packages/runtime/runtime-utils/src/unpackUsedRoutes.ts | Minor refactoring of conditional logic in accumulating child routes. |
packages/common/driver-definitions/src/protocol/storage.ts | Standardized encoding strings from "utf-8" to "utf8". |
packages/runtime/runtime-utils/src/summaryUtils.ts | Added new functions with explicit return types and updated UTF‑8 byte length calculation logic. |
packages/runtime/runtime-utils/src/requestParser.ts | Refactored URL path extraction and added explicit return types. |
packages/runtime/runtime-utils/src/runtimeFactoryHelper.ts | Improved type annotations for factory helper class. |
packages/runtime/runtime-utils/src/objectstorageutils.ts | Updated string slicing and adjusted condition for path existence checking. |
packages/loader/driver-utils/src/blob.ts | Standardized encoding strings in blob constructor. |
packages/loader/driver-utils/src/treeConversions.ts | Standardized encoding strings and minor adjustments in tree conversion. |
Various test files | Updated import paths and added explicit typing for better clarity and Node.js compatibility. |
packages/runtime/runtime-utils/src/utils.ts | Added explicit return type and replaced fromCharCode with fromCodePoint for compact ID encoding. |
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
packages/runtime/runtime-utils/src/summaryUtils.ts:71
- Verify that the iteration and index decrement logic correctly handles multi-code-unit characters after switching from charCodeAt to codePointAt to ensure the accurate calculation of UTF-8 byte length.
const code = str.codePointAt(i);
🔗 Found some broken links! 💔 Run a link check locally to find them. See linkcheck output
|
The package currently uses our "minimal" config. This PR updates it to use "recommended" and fix the resulting linter violations.
AB#3022