Skip to content

Lint for missing js extensions in relative imports - #152

Merged
jrjohnson merged 2 commits into
jrjohnson:mainfrom
stopfstedt:lint-for-missing-js-ext-in-relative-imports
Nov 6, 2026
Merged

jrjohnson merged 2 commits into
jrjohnson:mainfrom
stopfstedt:lint-for-missing-js-ext-in-relative-imports

Conversation

@stopfstedt

Copy link
Copy Markdown
Collaborator

@stopfstedt
stopfstedt force-pushed the lint-for-missing-js-ext-in-relative-imports branch from adce51f to 05425d7 Compare November 6, 2026 22:46
@stopfstedt
stopfstedt marked this pull request as ready for review November 6, 2026 22:46
@stopfstedt
stopfstedt requested a review from jrjohnson November 6, 2026 23:18
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

✅ Visual Diff Report — PASSED

270 images compared: 270 identical

View the report.

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.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟢 Approval recommended

Review evidence indicates there are no active or unresolved issues remaining and the changes are limited to adding an ESLint plugin and enabling a single lint rule with corresponding config and lockfile updates.

No open issues 🎉

1 file not reviewed
  • pnpm-lock.yaml: Generated file
What changed in this PR

This pull request adds eslint-plugin-n and enables the n/file-extension-in-import ESLint rule to enforce explicit file extensions in relative import/export paths, aligning linting with ESM import correctness and reducing the chance of extension-less relative imports entering the codebase.

Changes:

  • Add eslint-plugin-n as a dev dependency.
  • Register the n plugin in the ESLint flat config.
  • Enable n/file-extension-in-import with an “always”/['error','always'] configuration for applicable TypeScript/test/config file patterns.
File Summary
pnpm-lock.yaml Updates lockfile entries for eslint-plugin-n and its transitive dependencies.
package.json Adds eslint-plugin-n to devDependencies.
eslint.config.js Registers the n plugin and enables n/file-extension-in-import for relevant globs.

Review effort: Balanced

@jrjohnson
jrjohnson merged commit 62aee17 into jrjohnson:main Nov 6, 2026
17 of 18 checks passed
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