facebook / facebook/flow

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

Offen
#284 52 Kommentare 88 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
feature request flowconfig
Vorherrschende Sprache
Rust
Sterne
22.3k
Forks
1.9k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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).

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.