-
I'm trying to add Stylelint to a brand new NextJS Typescript project with EmotionJS and almost no rules works on my styles files, the only error that I manage to see was This {
...
"customSyntax": "@stylelint/postcss-css-in-js",
...
} But after this error no rules works on my style files, I've tried to extends other standards, remove the Thats my EmotionJS test file:
As we can see there's a lot of errors on this styles but when I run Thats the .stylelintrc.json {
"extends": ["stylelint-config-standard"],
"customSyntax": "@stylelint/postcss-css-in-js",
"rules": {
"string-quotes": "double"
}
} I also notice that the config file is being read, if I remove the So, how can I properly config this to work as expected? Versions: {
"@emotion/react": "^11.8.2"
"next": "12.1.0"
"react": "17.0.2"
"stylelint": "^14.6.0"
"typescript": "4.6.2"
"@stylelint/postcss-css-in-js": "^0.37.2"
"postcss-syntax": "^0.36.2"
} |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Hey @Alecell, I have not used Stylelint myself. That said, your configuration looks correct so I'm not sure what's wrong. I could take a look at this if you can provide a small GitHub repo that shows the problem. If you find a solution on your own, be sure to post here so other people can benefit from it. We could add this to our documentation too (potentially). |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer @srmagura! Here's the repo https://github.com/Alecell/tag-that-song |
Beta Was this translation helpful? Give feedback.
-
Kind of find the answer, but its not a ready to use solution. As @srmagura suggested I went to the Stylelint project and opened a issue, but since I don't know if I can do something like this, I don't have much knowledge on open source projects and I believe that kind of thing is too much for me, but that's the current situation for those who want to use the latest version of Stylelint, we need to create our own Custom Syntax 😕 |
Beta Was this translation helpful? Give feedback.
-
Hi @Alecell , are there any updates on the Custom Syntax for emotion? Are there any alternatives to Thanks! |
Beta Was this translation helpful? Give feedback.
Kind of find the answer, but its not a ready to use solution.
As @srmagura suggested I went to the Stylelint project and opened a issue, but since
@stylelint/postcss-css-in-js
is deprecated, our solution is create our own EmotionJS Stylelint Syntax.I don't know if I can do something like this, I don't have much knowledge on open source projects and I believe that kind of thing is too much for me, but that's the current situation for those who want to use the latest version of Stylelint, we need to create our own Custom Syntax 😕