Closed s100 closed 2 years ago
Ran into this again today, any chance of addressing it? If this package is unmaintained we may just stop using it.
@joshblack Do you have any insight for us on this repo?
Hey, @s100 for whatever reason I did not notice your message. However, I have made a number of recent updates.
The package no longer uses a path in this way and should not as a result fail as it was doing for you.
Closing due to inacitivety. Please re-open if still an issue.
initMotionTokens.js
assumes that__dirname
uses forward slashes, but on Windows it uses backslashes. This has the result that the constructed pathlayoutFile
for accessingcarbon-components/src/globals/scss/_motion.scss
, on my machine, is:when it should be:
This causes an ENOENT exception to be thrown and
stylelint
fails.In general I think manual path parsing is a hazardous way to do this anyway - who's to say
carbon-components
is in the samenode_modules
directory asstylelint-plugin-carbon-tokens
? It could be nested insidestylelint-plugin-carbon-tokens
's ownnode_modules
directory, or installed globally. I think a more robust approach would be to use Node.js's built-inrequire.resolve
to figure out where thecarbon-components
package is on disk, and go from there.