Skip to content

Conversation

schoero
Copy link
Owner

@schoero schoero commented Jul 19, 2025

closes: #121

TODO:

  • add tsconfig option to settings and rules.

@schoero schoero requested a review from Copilot July 19, 2025 11:18
Copilot

This comment was marked as outdated.

@schoero schoero requested a review from Copilot July 19, 2025 21:59
Copy link
Contributor

@Copilot 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 adds support for TypeScript config path resolution in Tailwind CSS configurations by introducing a tsconfig option to settings and rules. This enables the plugin to resolve path aliases defined in TypeScript configuration files when processing imports and module resolution.

  • Adds tsconfig configuration option to all rules and global settings
  • Implements TypeScript path resolution using the tsconfig-paths-webpack-plugin
  • Refactors the async context system to support unified configuration and warning handling

Reviewed Changes

Copilot reviewed 62 out of 63 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/types/async.ts Moves Warning interface to centralized async types
src/utils/options.ts Adds tsconfig option to common options handling
src/async-utils/context.ts Creates unified async context management system
src/async-utils/tsconfig.ts Implements TypeScript config path resolution
src/async-utils/resolvers.ts Updates resolvers to support TypeScript path mapping
src/tailwindcss/*.ts Updates all Tailwind modules to use new async context system
src/rules/*.ts Adds tsconfig option to all rule configurations
package.json Adds tsconfig-paths-webpack-plugin dependency
docs/ Updates documentation for new tsconfig option

Comment on lines 9 to +10

runAsWorker(async ({ classes, configPath }: GetDissectedClassRequest) => {
const context = await createTailwindContext(configPath);
return getDissectedClasses(context, classes);
runAsWorker(async ({ classes, configPath, cwd, tsconfigPath }: GetDissectedClassRequest) => {
Copy link

Copilot AI Jul 19, 2025

Choose a reason for hiding this comment

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

Missing return type annotation and response structure. The function should return GetDissectedClassResponse but only returns the raw dissected classes array.

Copilot uses AI. Check for mistakes.

@schoero schoero marked this pull request as ready for review July 20, 2025 20:20
@schoero schoero merged commit ea756db into main Jul 20, 2025
20 checks passed
@schoero schoero deleted the feat/tsconfig-paths branch July 20, 2025 20:23
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.

support for import aliasing

1 participant