facebook / facebook/flow

Replace /* @flow */ with entry in .flowconfig

Ouverte
#284 52 commentaires 88 réactions 0 personnes assignées Voir sur GitHub
feature request flowconfig
Langage dominant
Rust
Étoiles
22.3k
Forks
1.9k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

When introducing Flow to legacy code, it's nice to specify on a per-file basis what files Flow should analyze. Thus, we have the `/* @flow */` or `/* @flow weak */` comments at the top of each file. Once Flow is widely used in a project, I imagine that this would become extremely tedious. Or worse, someone may accidentally fail to include the comment and then we'll have no protection on that file with no warning that we don't. I suppose `flow check --all` exists for these cases, but that's an extremely inflexible solution.

Couldn't all these cases (analyze a few files, most files, or all files from a project) be solved more simply by providing a way to specify a glob or regex in .flowconfig that determines what files to analyze? That's what I assumed the `[include]` option was for, but it looks like it still requires the files listed to include the `/* @flow */` comment (so it's more for checking files in a folder outside the one where .flowconfig is located).

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.