wikimedia/grunt-stylelint

Throw an error if node.js is too old for the plugin

peternewman opened this issue · 3 comments

I don't really know if this is an issue for this grunt plugin, or should be upstream in grunt or node.js or somewhere else, but I've been trying to migrate some CI and usage of the grunt-stylelint plugin stopped working. After a lot of debugging I've found we were running node v8.12.0 which hasn't been supported in stylelint since 12.0.1 apparently: stylelint/stylelint#4787 (comment)

Nothing in the whole stack threw any errors, despite the fact you all seem to have the engines bit set in packages.json, so does nothing actually read it? See the source issue:
OpenLightingProject/ola#1733

Some Google suggests it's user error, is there really no sensible way to catch and warn of this by default, I've wasted a few hours on it:
https://npm.community/t/engines-and-engines-strict-ignored/4792

I think this can probably be closed given npm/npm#12486 unless there is some easy way to check within the plugin to save people time?

Correction:
npm/cli#692
npm/cli#3263

I don't know if this works? npm/cli#692 (comment)

Hmm. I think theoretically we could write something here that does an environment check before proceeding, but that definitely feels like something that should be done by node/npm itself, not us, I agree.

(Also, such a feature should probably be if not in node/npm at least in stylelint itself and not this wrapper for it.)

Closing without prejudice for now.

Yeah fair enough. I eventually worked out the cause of my issue as being that anyway.