eslint-plugin-css-modules
eslint-plugin-css-modules copied to clipboard
Does not play well with Node.12, Visual Code and possibly other Electron based editors
After digging deep into the code, I concluded that all the problems came from using deasync.
- In Visual Code, I get the following error:
This is because deasync is not compatible with Electon.
- On Node.12, running
eslinthangs whenever I use the plugin.
To solve these problems, we could instead use Node's ChildProcess#execSync or ChildProcess#spawnSync to run postcss-cli instead. The downside is that it would be a lot slower, specifically when linting large directories.
@satazor have you tried with more recent versions of Node.js? (trying to understand if your ticket means v12 and higher, or v12 only) v12 through v15 as well as v17 and v19 are EOL'ed at this point; v16 is in maintenance mode, so the Node team recommends using v18 or v20. We've been using both sucessfully, lately v20 exclusively.