Stylelint: Error: No configuration provided for E:\AOTC\IE-SurveySubmission\src\styles.css

Created on 29 Aug 2018  路  3Comments  路  Source: stylelint/stylelint

I have installed using npm
package.json
"scripts": {
"ng": "ng",
"stylelint": "stylelint src/*.css",

}

when I run command npm run stylelint gets the error

No configuration provided for E:\AOTC\IE-SurveySubmission\src\styles.css
at module.exports (E:\AOTC\IE-SurveySubmission\node_modules\stylelint\lib\utils\configurationError.js:8:28)
at searchForConfig.then.then.config (E:\AOTC\IE-SurveySubmission\node_modules\stylelint\lib\getConfigForFile.js:49:15)

Most helpful comment

It looks like you haven't created a configuration yet. You can do so by following the docs. The easiest way is to extend the standard config e.g.

npm i stylelint --save-dev
npm i stylelint-config-standard --save-dev

Then put the following in your config:

{
  "extends": "stylelint-config-standard"
}

e.g. in a .stylelintrc.json file _in the root of your project_.

All 3 comments

It looks like you haven't created a configuration yet. You can do so by following the docs. The easiest way is to extend the standard config e.g.

npm i stylelint --save-dev
npm i stylelint-config-standard --save-dev

Then put the following in your config:

{
  "extends": "stylelint-config-standard"
}

e.g. in a .stylelintrc.json file _in the root of your project_.

I get the same issue.

I create a.scss , its path is E:/a.scss, but there is no stylelint config files.
When I want to use stylelint to lint my css, it says No configuration provided...,
It is because there is no stylelint config(package.json, .stylelinkrc and so on.) in E:/;

So, if I want to use stylelint, where has *.scss files, i have to create a config files ?
Can i create a config file under c:/User/my-user , if there is no config files found in CWD, it will find in c:/User/my-user ?

i use eslint, and I only need to add a .eslintrc under c:/Users/my-user, and everywhere i want to use eslint, if it can not find .eslintrc in CWD, it will try to find .eslintrc under c:/Users/my-user, so i don't need to create .eslintrc everywhere..

if it can not find .eslintrc in CWD, it will try to find .eslintrc under c:/Users/my-user

@Spike-Leung Please create a new issue for this feature request.

Was this page helpful?
0 / 5 - 0 ratings