Skip to content

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jul 6, 2025

Closes #373

Applied changes based on Issue #373.

I’ve added an ESLint rule and resolver settings to enforce that all local JS imports must include the “.js” extension, while disallowing “.ts/.tsx/.jsx” extensions in import paths:

• In .eslintrc.js settings, register the extensions and configure the node resolver to recognize .js, .jsx, .ts, and .tsx.
• Added the import/extensions rule (via eslint-plugin-import) to error if you omit “.js” on JS imports (and forbid using “.ts/.tsx/.jsx” extensions).

With this in place, ESLint will now flag any inconsistent import extension usage. Let me know if you’d like to tweak the mappings or enable additional rules (e.g. unresolved imports).

@YiweiShen YiweiShen merged commit 895731a into main Jul 6, 2025
3 checks passed
@YiweiShen YiweiShen deleted the codez-chore-373-eslint-enforce-consistent-import-extensions-3042861572 branch July 6, 2025 23:57
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.

Enforce consistent import extensions

1 participant