-
Notifications
You must be signed in to change notification settings - Fork 15
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
Adding default config logic - to support defining broadcast safe color definitions #102
base: master
Are you sure you want to change the base?
Conversation
@@ -3,3 +3,4 @@ dist | |||
.nyc_output | |||
coverage | |||
*.code-workspace | |||
/src/config/config.local.ts |
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.
This file looks ignored by mistake
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.
We need to include this file but in a way that Typescript is happy with if the values are commented out.
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.
Thanks for your work on this.
We already support loading settings from a bslint.json
file, so I don't think we should be adding another type of config (config.local
). You should be able to define this new structure within existing bslint.json design. So I think the files in src/config/
should all be removed.
Here's how the config file is loaded via the CLI:
Line 32 in a650d6f
const config = normalizeConfig(options); |
And here's how the config is loaded via the brighterscript plugins (and language server):
Line 114 in a650d6f
const { rules, fix, checkUsage, globals, ignores } = normalizeConfig(program.options); |
I'd envision this being added as some subtype of the rules, maybe like this (with defaults set if the user didn't provide these). I'm open to suggestions on the exact structure. @elsassph any thoughts?
{
"color-cert": {
"severity": "error",
"colors": {
"broadcastSafe": {
"black": "#161616",
"white": "#EBEBEB"
}
}
}
}
Will take a look when I get some time. :) |
First pass.
Todo