-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clearer readme for configuring a rule #910
Conversation
Thanks, there are actually links in the block above about all of this see here including sample configs but I agree this should follow the pattern of the other examples. Can you do me a quick favour though and make sure you include a DCO with your PR. DCO - https://github.com/sasstools/sass-lint/blob/develop/CONTRIBUTING.md#developer-certificate-of-origin as per our contribution guidelines https://github.com/sasstools/sass-lint/blob/develop/CONTRIBUTING.md#pull-requests Thanks! 👍 |
Prompt response there! I've added the DCO, hope that suffices. |
(completely overlooked that sample config, thanks for pointing it out) |
1 similar comment
@@ -79,13 +79,14 @@ For all [rules](https://github.com/sasstools/sass-lint/tree/master/docs/rules), | |||
|
|||
If you want to configure options, set the rule to an array, where the first item in the array is the severity, and the second item in the array is an object including the options you would like to set. | |||
|
|||
An example configuration of a rule with options look like the following: | |||
Here an is example configuration of a rule, where we are specifying that breaking the [indentation rule](https://github.com/sasstools/sass-lint/blob/master/docs/rules/indentation.md) should be treated as an error (its severity set to two), and setting the `size` option of the rule to 2 spaces: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 'Here is an'
corrected 😁 |
Thanks 👍 |
It took me a few minutes to figure out how to configure a rule, given that there are no complete examples of a
sass-lint.yml
(something that perhaps should be addressed?).In particular, it wasn't clear to me that the rule configuration needs to be nested under
rules:
, or what the example config shown was doing. I've clarified both of these in this updated readme.Hope it helps, thanks for the great project.
DCO 1.1 Signed-off-by: James Riley [email protected]