Adding default config logic - to support defining broadcast safe color definitions#102
Adding default config logic - to support defining broadcast safe color definitions#102disc7 wants to merge 1 commit intorokucommunity:masterfrom
Conversation
| .nyc_output | ||
| coverage | ||
| *.code-workspace | ||
| /src/config/config.local.ts |
There was a problem hiding this comment.
This file looks ignored by mistake
There was a problem hiding this comment.
We need to include this file but in a way that Typescript is happy with if the values are commented out.
TwitchBronBron
left a comment
There was a problem hiding this comment.
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
And here's how the config is loaded via the brighterscript plugins (and language server):
Line 114 in a650d6f
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