Skip to content

Conversation

@9romise
Copy link
Contributor

@9romise 9romise commented Nov 20, 2025

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Nov 20, 2025

⚠️ No Changeset found

Latest commit: 3964236

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 9romise changed the title ci: setup typescript-eslint chore(lint): setup typescript-eslint Nov 20, 2025
@9romise
Copy link
Contributor Author

9romise commented Nov 20, 2025

I think we will never use .cjs or .cts extensions, so I haven't added support for them.

@9romise 9romise requested a review from FloEdelmann November 20, 2025 15:31
@9romise
Copy link
Contributor Author

9romise commented Nov 20, 2025

The type definitions in our repository appear to be outdated. Just curious — why aren't we directly referencing some of the node types from typescript-eslint?

@9romise
Copy link
Contributor Author

9romise commented Nov 20, 2025

Additionally, is the team interested in migrating to a pnpm workspace? I believe this would allow .mts files in the docs directory to use the module type directly instead of following the root's commonjs configuration.

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 sets up typescript-eslint linting for TypeScript files in the project. It adds ESLint rules and configurations specifically for .ts and .mts files, enabling strict TypeScript linting across the codebase.

Key changes:

  • Added @typescript-eslint/eslint-plugin dependency and configured TypeScript-specific ESLint rules
  • Updated ESLint configuration to support TypeScript files with appropriate parser and plugin settings
  • Applied auto-fixes from the new linting rules across TypeScript files (formatting, string concatenation, error handling)

Reviewed Changes

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

Show a summary per file
File Description
package.json Added @typescript-eslint/eslint-plugin dependency
eslint.config.mjs Configured TypeScript parser, plugin, and rules for .ts and .mts files; added eslint-typegen.d.ts to ignores
typings/eslint-plugin-vue/util-types/ast/es-ast.ts Fixed type from BigInt (constructor) to bigint (TypeScript primitive type)
vitest.config.mts Auto-formatted by new linting rules (removed semicolons, condensed arrays)
docs/.vitepress/vite-plugin.mts Applied linting auto-fixes (removed unused parameter, renamed error variable, replaced substring with slice, used template literals)
docs/.vitepress/theme/index.ts Flattened nested if statements for better readability
docs/.vitepress/config.mts Converted arrow function return to implicit return; added eslint-disable comment
docs/.eslintrc.js Removed as configuration moved to flat config in root

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

@FloEdelmann
Copy link
Member

why aren't we directly referencing some of the node types from typescript-eslint?

I don't know. @ota-meshi can you elaborate?

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.

Thank you!

@ota-meshi
Copy link
Member

why aren't we directly referencing some of the node types from typescript-eslint?

I don't know. @ota-meshi can you elaborate?

Since the nodes provided by typescript-eslint don't know that the parent has a VExpressionContainer, I thought it might be difficult to check them properly.
https://github.com/vuejs/vue-eslint-parser/blob/master/docs/ast.md#vexpressioncontainer
For this reason, I avoid using the nodes provided by typescript-eslint directly. I'd welcome any better solutions.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

Thank you!

@FloEdelmann FloEdelmann merged commit da00a44 into vuejs:master Nov 21, 2025
21 checks passed
@9romise 9romise deleted the setup/ts-eslint branch November 21, 2025 10:44
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