Giter VIP home page Giter VIP logo

Comments (5)

ota-meshi avatar ota-meshi commented on May 25, 2024 4

It's probably a problem with the library global-modules used by stylelint. It seems that using nvm may not return the correct global module path.

jonschlinkert/global-modules#7

It may work if you specify the full path in config.

module.exports = {
  extends: [
    '/path/to/.../node_modules/stylelint-config-rational-order',
    // or 
    require.resolve('stylelint-config-rational-order'),
  ],
}

from vscode-stylelint.

ota-meshi avatar ota-meshi commented on May 25, 2024 3

Hi @multics.
I think that if you specify the Node module in "stylelint.stylelintPath", it will work. e.g. "stylelint.stylelintPath": "/usr/local/lib/node_modules/stylelint"
Even if "bin" is specified, it does not work.

from vscode-stylelint.

multics avatar multics commented on May 25, 2024 1

Hi @ota-meshi,
Thanks for your information provided. It solves the crash problem. Now I've encountered another issue. I use a global config file stylelint.config.js at my home dir, the vscode complains it could not find the config. Together with the stylelint, I installed the config I would like to extend globally as well.

npm install -g stylelint stylelint-config-rational-order

image

Here is the config:

module.exports = {
  extends: ['stylelint-config-rational-order'],
}

BTW: command line execution has no problem.

stylelint index.css

image

div {
  font-size: large;
  color: black;
  display: block;
}

Do you have any suggestions?

Thanks very much and have a nice day!

from vscode-stylelint.

multics avatar multics commented on May 25, 2024 1

Thanks @ota-meshi

Yes, you are right. I am using nvm, and absolute path solution /absolute/path/to/.../stylelint-config-package solves the problem. Another one doesn't.

Your help is appreciated!

By the way, if this extension could be enhanced to support nvm users, the global config file would look nicer and node upgrades won't require the global config updated. That will be perfect! 😀

One more thing: Stylelint is my favorite lint tool. Thanks for your guys' contribution!❤️

from vscode-stylelint.

multics avatar multics commented on May 25, 2024

output panel of stylelint has lots of these kinds of information:

Invalid option "--stdio". Did you mean "--stdin"?
Invalid option "--client-process-id".
[Info  - 11:40:53 PM] Connection to server got closed. Server will restart.

from vscode-stylelint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.