Skip to content

Error trying to format ngClass attribute with optional chaining followed by property access via variable #91

@TomTomB

Description

@TomTomB

What version of prettier-plugin-tailwindcss are you using?

For example: v0.1.13

What version of Tailwind CSS are you using?

For example: v3.1.8

What version of Node.js are you using?

For example: v16.16.0

What package manager are you using?

yarn 2 (pnp disabled)

What operating system are you using?

Windows 11

Reproduction URL

https://github.com/TomTomB/tailwind-ng-prettier-issue

Describe your issue

The repo is a bare nrwl nx setup.
After clone, the following commands needs to get executed:

  • npm i
  • npm run prettier .\apps\issue-app\src\app\app.component.html

This will result in the following error.

apps\issue-app\src\app\app.component.html[error] apps\issue-app\src\app\app.component.html: Error: Unexpected node undefined

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions