Skip to content

Commit a44fb55

Browse files
committed
feat(eslint): add Flow configs to ESLint configs
1 parent 59efec6 commit a44fb55

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/generators/ESLintGenerator.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,15 @@ export class ESLintGenerator extends Generator {
4242
packages.push("eslint-plugin-react");
4343
}
4444

45-
if (userConfigs.typescript) {
45+
if (userConfigs.configurations.includes("flow")) {
46+
configs.extends.push("plugin:flowtype/recommended");
47+
configs.plugins.push("flowtype");
48+
configs.rules = {
49+
...configs.rules,
50+
"flowtype/no-types-missing-file-annotation": "off",
51+
};
52+
packages.push("eslint-plugin-flowtype");
53+
} else if (userConfigs.typescript) {
4654
configs.extends.push("plugin:@typescript-eslint/recommended");
4755
configs.parser = "@typescript-eslint/parser";
4856
configs.plugins.push("@typescript-eslint");

0 commit comments

Comments
 (0)