nlydv / nova-stylelint

Stylelint extension for Nova, a new macOS-native code editor from Panic. Presents real-time stylesheet linting with inline and sidebar warnings by plugging into the built-in issue provider system.
https://extensions.panic.com/extensions/com.neelyadav/com.neelyadav.stylelint/
MIT License
5 stars 2 forks source link

Breaks with Stylelint 16.x #5

Open yphoenix opened 11 months ago

yphoenix commented 11 months ago

Everything worked upto 15.x, with 16.x everything breaks.

Should be easy to reproduce.

yphoenix commented 11 months ago

SyntaxError [uncaught]: JSON Parse error: Unexpected EOF

yphoenix commented 11 months ago

Seems stylelint outputs to stderr instead of stdout, so easy fix. Have fix: https://github.com/Issio-Contribute/nova-stylelint/tree/Fix-Issiue-5-Breaks-with-Stylelint-1.6.x

jeremyfuksa commented 10 months ago

Nudging this issue. I could sure use @yphoenix 's fix for this.

yphoenix commented 10 months ago

Util it is merged....

Go to ~/Library/Application\ Support/Nova/Extensions/com.neelyadav.stylelint/Scripts and edit the main.dist.js file.. around line 454 change resolve(output); to resolve(output ? output : error);

jeremyfuksa commented 10 months ago

That does not fix it for me. Using stylelint 15.11.0 in my package.json for my project.

If I update stylelint to 16.1.0, I get an error:

> stylelint src/**/*.scss || true

[filepath]/node_modules/meow/build/index.js:29
        description &&= help ? `\n  ${description}\n` : `\n${description}`;
                    ^^^

SyntaxError: Unexpected token '&&='
    at Loader.moduleStrategy (internal/modules/esm/translators.js:149:18)
yphoenix commented 10 months ago

What version of node are you using? &&= came in with node v15 and stylelint 16.x needs 18.12.0 or newer

jeremyfuksa commented 10 months ago

Upgraded to 18.17.1 and made the code edit. I'm still getting the crash.

yphoenix commented 10 months ago

Maybe there is something amiss about the node_modules associated with your stylelint install. It's the extension that is using the meow node module. The version I have installed in com.neelyadav.stylelint/Batteries/node_modules/meow/package.json is v9.0.0

So I did:

cd ~/Library/Application Support/Nova/Extensions/com.neelyadav.stylelint/Batteries
npm update

To update the associated modules

yphoenix commented 10 months ago

I wonder what version of meow you have installed as the code you are showing for the error doesn't match the code in meow/index.js

jeremyfuksa commented 10 months ago

meow isn't listed in the package.json in Batteries. I did an npm-check-updates run on the package.json in Batteries and my project.

meow in my project is 13.1.0.

After bumping dependencies in Batteries, the initial crash is gone, but now I get a new error in the Extension Console:

Stylelint[10:35:41.357000] TypeError [uncaught]:
Right side of assignment cannot be destructured@file:///Users/jf065530/Library/Application%20Support/Nova/Extensions/com.neelyadav.stylelint/Scripts/main.dist.js:315:50
JDENredden commented 8 months ago

Thanks @yphoenix !

Has the dev abandoned this project? Maybe your fork should take over?