-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add rulesets #86
Add rulesets #86
Conversation
ThanksSo excited to view this PR into the project. Regards. |
Otherwise, the subsequent validation will fail.
We'll need to add some documentation on how to create a ruleset. |
lib/config/config-file.js
Outdated
configExtends = [config.extends] | ||
} | ||
|
||
return configExtends.reduceRight((previousValue, parentPath) => { |
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.
Any reason to reduce from the right? This means that the rules that appear first in the array will override the ones that appear next. I think it makes more sense to do it the other way around, and that's the way eslint does it if I'm not wrong.
The rules should have higher priority than the rulesets. Right now, it seems that if a rule is set by a ruleset, then you cannot override it. |
Closes #73
Example of .solhintrc.json or .solhint.json:
First install package:
npm i solhint-config-align-base
{ "extends": [ "align-base" ], "rules": { "avoid-throw": "off", "indent": ["error", 2] } }
Or you can extend a core rule like
all
,recommended
ordefault