Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception error detected by stylelint #10

Open
CGSimplePeople opened this issue Mar 10, 2023 · 4 comments
Open

Exception error detected by stylelint #10

CGSimplePeople opened this issue Mar 10, 2023 · 4 comments

Comments

@CGSimplePeople
Copy link

Hello, when I use the following stylelint configuration to format styled-components, when I write styled-components in the tsx file, as long as I write the code, the stylelint plugin of vscode will detect an exception and report an error

This is the configuration of stylelint
{
"extends": ["stylelint-config-rational-order", "stylelint-config-standard"],
"plugins": ["stylelint-order"],
"customSyntax": "postcss-styled-components"
}

This is the error message
SyntaxError: Unexpected keyword 'function'. (11:0) at instantiate (E:\GProjects\UI\node_modules.pnpm@babel+parser@7.21.2\node_modules@babel\parser\lib\index.js:64:32) at constructor
企业微信截图_16784128377413

When I don't use postcss-styled-components, no such error message will appear, but at the same time, I can't format styled-components

@CGSimplePeople
Copy link
Author

@43081j

@russtuck91
Copy link

Having the same problem +1

@43081j
Copy link
Owner

43081j commented May 15, 2023

do you have an example of source that triggers this? i.e. the js with the css literal in it

really sorry for my absence lately, has been a very busy couple of months

@karlhorky
Copy link

Wonder if this is related to the Stylelint v15 upgrade, like this issue mentions:

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

No branches or pull requests

4 participants