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 glob-level configuration for lint rules #8033

Open
atty-stripe opened this issue Aug 21, 2019 · 2 comments
Open

Allow glob-level configuration for lint rules #8033

atty-stripe opened this issue Aug 21, 2019 · 2 comments

Comments

@atty-stripe
Copy link

Proposal

I would like support for selectively enabling lint rules at a per-directory (or glob) level.

We have a large codebase at Stripe that did not start with the strictest lint rules. What we would like to do is enable new lint rules in specific directories, so that new code written in those directories can be safer. Over time, we can migrate other directories to accept new lint rules.

This can either be implemented with an extension to .flowconfig, or perhaps allowing per-directory .flowconfig files that can inherit from parent directory .flowconfig files. I don't have strong opinions for a solution, but would love to see this problem solved.

Use case

See above.

@kevinbarabash
Copy link

It would be nice if there was a way to enable/disable on a per file basis too.

@jamesisaac
Copy link
Contributor

For anyone not aware, you can get part of the way there with @flow strict annotations on files you want to be checked against a stricter set of rules (configurable in .flowconfig which lint rules those are):

https://flow.org/en/docs/strict/

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

3 participants