Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.

Unable to load custom stylelint config #1

Closed
iblack10 opened this issue Jul 21, 2016 · 7 comments
Closed

Unable to load custom stylelint config #1

iblack10 opened this issue Jul 21, 2016 · 7 comments
Assignees

Comments

@iblack10
Copy link

Thanks for creating the plugin.

I have a working ".stylelintrc" config file in the root of my project which successfully lints styles inside of VS Code. However, I can't get vscode-stylefmt to use the same configuration file. When I run style-fmt it just uses some default rules and not the rules in my .stylelintrc file.

Am I missing something?

@mrmlnc
Copy link
Owner

mrmlnc commented Jul 21, 2016

Hi, @iblack10,

I can't reproduce your problem on Windows 10. You can provide your configuration file and CSS/Scss file (preferably with the structure of directories)?

@mrmlnc mrmlnc self-assigned this Jul 21, 2016
@iblack10
Copy link
Author

Ah, I think I've narrowed down the issue to how my stylelint rules are formatted. I have:

"indentation": [4, { "severity": "error" }]

That doesn't work - but this does:

"indentation": 4

I've been using different severities for rules as per the stylelint docs: https://github.com/stylelint/stylelint/blob/d2166dfbcdefefacafd27afd5993ec8341c3b45e/docs/user-guide/configuration.md#severities-error--warning but it seems these are not compatible with stylefmt just now.

@mrmlnc
Copy link
Owner

mrmlnc commented Jul 21, 2016

It seems that this is so. I installed Stylefmt as the global package and tried to format a SCSS file with this configuration:

{
  "rules": {
    "indentation": [4, { "severity": "warning" }]
  }
}

And... it does not work as expected. Please create this question in the repository Stylefmt. I will update the plugin, once this issue is resolved.

@iblack10
Copy link
Author

Thanks - have created an issue for this now.

@mrmlnc
Copy link
Owner

mrmlnc commented Jul 21, 2016

Ok. In such a case, i will close this issue. I will update the plugin, once this issue is resolved. 👍

@mrmlnc mrmlnc closed this as completed Jul 21, 2016
@iblack10
Copy link
Author

I've submitted a pull request which should fix this issue for the "indentation" rule. Same process would need to be carried out for all other rules as well though.

@mrmlnc
Copy link
Owner

mrmlnc commented Jul 28, 2016

@iblack10, done 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants