Skip to content

Conversation

@chrsgrffth
Copy link
Contributor

We recently switched our project to use prettier for code formatting which enforces a max length of lines. Some of our variable names are long and/or nested, requiring the var() function to be break onto multiple lines.

It seems that the propertyNode being tested as the property name is including all of the whitespace which causes the plugin to report an error even though the variable does exists. This change removes the whitespace in the propertyName definition before testing it.

With prettier formatting (lint error reported):
Screenshot 2019-06-26 16 10 06

Same property, without prettier formatting (no error):
Screenshot 2019-06-26 16 12 43

@bcole808
Copy link

I am working with @chrsgrffth and can confirm that I also receive a false lint warning when there is whitespace around the property name, and that trimming the whitespace here resolves the issue.

PS: 👋 Hello @jonathantneal !!! 🎉

@jonathantneal jonathantneal merged commit b69920b into csstools:master Jun 27, 2019
@chrsgrffth
Copy link
Contributor Author

Thanks @jonathantneal! What's the process for publishing this patch to npm?

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