Skip to content

Added lint rule to enforce importing with extensions#831

Merged
danditomaso merged 3 commits into
meshtastic:mainfrom
danditomaso:fix/improve-linting-of-file-extentions
Sep 3, 2025
Merged

Added lint rule to enforce importing with extensions#831
danditomaso merged 3 commits into
meshtastic:mainfrom
danditomaso:fix/improve-linting-of-file-extentions

Conversation

@danditomaso

@danditomaso danditomaso commented Sep 3, 2025

Copy link
Copy Markdown
Collaborator

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

  • Added useImportExtensions to biome linter rule which enforces that imports at the top of the file require file extensions.

Checklist

  • Code follows project style guidelines
  • Documentation has been updated or added
  • Tests have been added or updated
  • All i18n translation labels have been added (read
    CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)

@vercel

vercel Bot commented Sep 3, 2025

Copy link
Copy Markdown

@danditomaso is attempting to deploy a commit to the Meshtastic Team on Vercel.

A member of the Team first needs to authorize it.

@danditomaso danditomaso changed the title fix: added lint rule to enforce importing with extentions Added lint rule to enforce importing with extensions Sep 3, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a lint rule to enforce file extensions in import statements to align with established project conventions.

  • Adds useImportExtensions rule to Biome linter configuration
  • Updates existing import statements to include .ts extensions
  • 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.

Comment thread biome.json
Comment thread packages/web/src/core/stores/nodeDBStore/nodeDBStore.test.ts Outdated
@philon-

philon- commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

I believe there are a few imports in the transport packages that need changing too

@danditomaso

Copy link
Copy Markdown
Collaborator Author

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.

@danditomaso danditomaso merged commit d0f4939 into meshtastic:main Sep 3, 2025
2 of 3 checks passed
@danditomaso danditomaso deleted the fix/improve-linting-of-file-extentions branch September 3, 2025 21:07
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.

3 participants