Skip to content

Conversation

@9romise
Copy link
Contributor

@9romise 9romise commented Nov 22, 2025

In earlier Node.js versions, importing ts files directly wasn't supported, so the failing test files from #2916 have been changed to use the .ts extension in this PR.

@changeset-bot
Copy link

changeset-bot bot commented Nov 22, 2025

⚠️ No Changeset found

Latest commit: 35bfd7c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

9romise added a commit to 9romise/eslint-plugin-vue that referenced this pull request Nov 22, 2025
@9romise 9romise marked this pull request as ready for review November 22, 2025 16:41
Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

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

Cool!

@9romise 9romise requested a review from FloEdelmann November 27, 2025 12:40
Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

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

Looks good to me now. Thank you! 🙂

Copy link
Contributor

Copilot AI left a comment

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 converts several test files from JavaScript (.js) to TypeScript (.ts) to enable direct import of TypeScript files in modern Node.js versions. The changes include:

  • Migration from CommonJS require() to ES6 import statements
  • Addition of type annotations for better type safety
  • Configuration updates to support TypeScript test files
  • Addition of non-null assertions with corresponding ESLint rule disabled

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.json Added vitest globals types and included test TypeScript files in compilation
tests/lib/rules/comment-directive.ts Converted from .js to .ts with ES6 imports and type annotations
tests/lib/rules/block-order.ts Converted from .js to .ts with ES6 imports, type annotations, and removed unnecessary output: null from valid test cases
tests/lib/configs/flat.ts Converted from .js to .ts with ES6 imports, type annotations, and added non-null assertions
tests/lib/configs/eslintrc.ts Converted from .js to .ts with ES6 imports
eslint.config.mjs Disabled @typescript-eslint/no-non-null-assertion rule to allow non-null assertions in TypeScript code
Comments suppressed due to low confidence (1)

tests/lib/rules/block-order.ts:4

  • The import path '../../../node_modules/@types/eslint' is fragile and non-standard. Import from 'eslint' directly instead, as TypeScript will resolve the correct type definitions automatically.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants