Matoeil
Matoeil

Reputation: 7289

Stylelint error in PhpStorm IDE : no configuration provided

I cannot make stylelint to work in PhpStorm

"C:\Program Files\nodejs\node.exe" "K:/dev/npm packages/node_modules/stylelint/bin/stylelint.js" -f json --stdin-filename ..\..\..\..\..\..\..\..\:/dev/D8/themes/amu_www/css/style.css
K:\:\dev\D8\themes\amu_www\css\style.css
Error: No configuration provided for K:\:\dev\D8\themes\amu_www\css\style.css
    at module.exports (K:\dev\npm packages\node_modules\stylelint\lib\utils\configurationError.js:8:28)
    at stylelint._fullExplorer.load.then.then.config (K:\dev\npm packages\node_modules\stylelint\lib\getConfigForFile.js:47:15)

Process finished with exit code 78

I have placed a stylelintrc.json config file about everywhere I could think of but I don't know in which folder it is supposed to be put.

Upvotes: 4

Views: 5829

Answers (2)

Francesco Borzi
Francesco Borzi

Reputation: 61814

In my case, the problem was that my Webstorm IDE is always looking for the configuration file in the project root directory, while my stylelint.config.js was located in configs/stylelint.config.js.

I've solved by moving it to the root.

Upvotes: 1

Matoeil
Matoeil

Reputation: 7289

it was a .stylintrc.json and placing it just above the app working directory makes it foundable

Upvotes: 3

Related Questions