Skip to content
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

Allow global configurations #252

Open
duaraghav8 opened this issue Jan 16, 2019 · 2 comments
Open

Allow global configurations #252

duaraghav8 opened this issue Jan 16, 2019 · 2 comments

Comments

@duaraghav8
Copy link
Owner

duaraghav8 commented Jan 16, 2019

Description
User should be able to specify configuration which is applied to all rules. Individual rule configurations should be able to override this global configuration.

Example: Use all rules and treat all as errors. This would mean I extend from solium:all and then apply the global configuration to treat all rules as errors. It could also be flexible to, for example, allow enabling all rules only for a specific plugin (eg- security/* : "error").

I don't have a clear idea on the interface to give to the user for this. This configuration has to go inside soliumrc config file or as CLI option or a combination of both.

Need opinions.

Use case
#47 (comment)

Screenshots

Alternatives
User has to individually list out all the rules and declare their severity as error or warning. This is inconvenient, especially when new releases add new rules which might go un-noticed if they're warnings by default.

Comments

Priority
@elenadimitrova?

@elenadimitrova
Copy link

For us it's a nice to have feature with overall low priority. However depending on interest others show it may climb up as I imagine more project looking into this.

@duaraghav8
Copy link
Owner Author

@elenadimitrova while this issue may take time to be implemented, I'm shipping another feature which will help you achieve a similar effect.

The CLI option --max-warnings (#255). Linter returns non-0 exit code if number of warnings > value of this option. You could use it with 0 as max tolerable warnings.

solium ... --max-warnings 0 which means even a single warning would fail the build.

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

No branches or pull requests

2 participants