Added lint rule to enforce importing with extensions#831
Conversation
|
@danditomaso is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a lint rule to enforce file extensions in import statements to align with established project conventions.
- Adds
useImportExtensionsrule to Biome linter configuration - Updates existing import statements to include
.tsextensions - Ensures consistency across TypeScript imports in the codebase
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| biome.json | Adds the useImportExtensions lint rule to enforce file extensions in imports |
| packages/web/src/core/stores/utils/indexDB.test.ts | Updates relative import to include .ts extension |
| packages/web/src/core/stores/nodeDBStore/nodeDBStore.test.ts | Updates dynamic import path to include full file path with extension |
| packages/web/src/core/stores/nodeDBStore/index.ts | Updates type import to include .ts extension |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
I believe there are a few imports in the transport packages that need changing too |
Thanks for mentioning that, I ran a lint:fix from the workspace root and only found a few of the test.ts files were missing import extentions. |
Description
This small PR adds a lint rule improvement to ensure users comply with our established practice of adding file extension at the end of imported files.
Changes Made
useImportExtensionsto biome linter rule which enforces that imports at the top of the file require file extensions.Checklist
CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)