Adds static typing to JavaScript to improve developer productivity and code quality.
685 matches across 13 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | website/tests/check_flow_examples.sh | 1 | #!/bin/bash |
| LOW | tests/fs.sh | 1 | #!/bin/bash |
| LOW | tests/type_at_pos_types/recursive.js | 41 | // The following exhibits a use of the RemoveTopLevelTvarVisitor |
| LOW | tests/suppress_unused_lazy_3/test.sh | 1 | #!/bin/bash |
| LOW | tests/import_typeof/import_typeof.js | 81 | (() => {}) as functionFoo4T; // Error: return types are not compatible |
| LOW | tests/rust_port_flowset_clear/test.js | 1 | // Regression test for FlowSet::clear() destroying speculation levels. |
| LOW | tests/jsx_pragma/invalid_jsx_unsupported.js | 1 | // @jsx (x)=>x |
| LOW | tests/jsx_pragma/invalid_no_expr.js | 1 | // @jsx |
| LOW | tests/lint_severity_vim/test.sh | 1 | #!/bin/bash |
| LOW | tests/hook_syntax_compatibility/rules_of_hooks.js | 1041 | /* [classError('use')] */ |
| LOW | tests/hook_syntax_compatibility/rules_of_hooks.js | 1061 | // }, |
| LOW | tests/type_spread/inline.js | 21 | // Ensuring we still error in these cases when the RHS is a spread |
| LOW | tests/type_at_pos_statement/test.sh | 1 | #!/bin/bash |
| LOW | tests/type_at_pos_match_pattern/test.sh | 1 | #!/bin/bash |
| LOW | tests/lint_flag_redundant/test.sh | 1 | #!/bin/bash |
| LOW | …sts/saved_state_reinit_libdef_change_mergebase/test.sh | 1 | #!/bin/bash |
| LOW | tests/suppress_unused_lazy_2/test.sh | 1 | #!/bin/bash |
| LOW | tests/spread_performance/type_spread.js | 1 | //@flow |
| LOW | tests/type_at_pos_template_literal/test.sh | 1 | #!/bin/bash |
| LOW | tests/cli_renderer_not_all/test.sh | 1 | #!/bin/bash |
| LOW | tests/type_at_pos_namespace/test.sh | 1 | #!/bin/bash |
| LOW | tests/ide_unmerged_deps_dependents/test.sh | 1 | #!/bin/bash |
| LOW | tests/lint_redundant_comments/test.js | 1 | //Comments Redundant with Default (Error.) |
| LOW | tests/lint_cli_no_override_none/test.sh | 1 | #!/bin/bash |
| LOW | tests/get_def_types_first/test.sh | 1 | #!/bin/bash |
| LOW | tests/import_type/import_type.js | 61 | ////////////////////////////////////////////// |
| LOW | tests/cli_renderer_unicode/code_frame_omit.js | 21 | const x = 42; |
| LOW | tests/cli_renderer_unicode/test.sh | 1 | #!/bin/bash |
| LOW | …ts/autocomplete_haste_multiplatform_autoimport/test.sh | 1 | #!/bin/bash |
| LOW | tests/cli_renderer_color/code_frame_omit.js | 21 | const x = 42; |
| LOW | tests/cli_renderer_color/large_locs.js | 181 | really |
| LOW | tests/cli_renderer_color/large_locs.js | 201 | // 14 |
| LOW | tests/cli_renderer_color/large_locs.js | 221 | // 4 |
| LOW | tests/cli_renderer_color/large_locs.js | 241 | // 14 |
| LOW | tests/cli_renderer_color/large_locs.js | 261 | // 5 |
| LOW | tests/cli_renderer_color/large_locs.js | 281 | // 13 |
| LOW | tests/cli_renderer_color/large_locs.js | 301 | // 6 |
| LOW | tests/cli_renderer_color/large_locs.js | 321 | // 12 |
| LOW | tests/cli_renderer_color/large_locs.js | 341 | // 8 |
| LOW | tests/cli_renderer_color/basic.js | 1 | /** |
| LOW | tests/cli_renderer_color/test.sh | 1 | #!/bin/bash |
| LOW | tests/cli_renderer_color/max_line/test.js | 1 | /** |
| LOW | tests/cli_renderer_color/max_line/test.js | 21 | // intentionally empty line |
| LOW | tests/cli_renderer_color/max_line/test.js | 41 | // intentionally empty line |
| LOW | tests/cli_renderer_color/max_line/test.js | 61 | // intentionally empty line |
| LOW | tests/cli_renderer_color/max_line/test.js | 81 | // intentionally empty line |
| LOW | tests/cli_renderer_color/max_line/foo.js | 1 | /** |
| LOW | tests/cli_renderer_color/max_line/foo.js | 21 | // intentionally empty line |
| LOW | tests/cli_renderer_color/max_line/foo.js | 41 | // intentionally empty line |
| LOW | tests/cli_renderer_color/max_line/foo.js | 61 | // intentionally empty line |
| LOW | tests/cli_renderer_color/max_line/foo.js | 81 | // intentionally empty line |
| LOW | tests/focus_check/test.sh | 1 | #!/bin/bash |
| LOW | tests/typecast/typecast.js | 21 | // control case: |
| LOW | tests/shorthand/test.sh | 1 | #!/bin/bash |
| LOW | tests/lint_cli_remove_all/test.sh | 1 | #!/bin/bash |
| LOW | tests/ts_primitive_as_obj/string_literal_widening.ts | 1 | // Repro of the `T | (string & {})` widening idiom commonly used in TS |
| LOW | tests/type_at_pos_indexed_access/test.sh | 1 | #!/bin/bash |
| LOW | tests/libdef_outside_of_root/test.sh | 1 | #!/bin/bash |
| LOW | tests/lint_flag_shadowed/test.sh | 1 | #!/bin/bash |
| LOW | tests/typecheck_contents_error_suppression/test.sh | 1 | #!/bin/bash |
| 391 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | website/docusaurus.config.js | 37 | function polyfillNodeBuiltinsForFlowJS(context, options) { |
| LOW | website/docusaurus.config.js | 64 | function enableSomeEnvVarsAsBuildTimeConstants() { |
| LOW | website/libs/lz-string.js | 11 | declare export function decompressFromEncodedURIComponent(s: string): string; |
| LOW | website/libs/lz-string.js | 12 | declare export function compressToEncodedURIComponent(s: string): string; |
| LOW | website/src/try-flow/flow-loader.js | 72 | function normalizeFlowReleaseVersion(version: string): string { |
| LOW | website/src/try-flow/tokens-theme-provider.js | 52 | function generateTokensCSSForColorMap(colorMap) { |
| LOW | tests/hook_syntax_compatibility/syntax_compatibility.js | 5 | export function useHooklikeAnnotatedFunction(): void { } |
| LOW | tests/hook_syntax_compatibility/syntax_compatibility.js | 7 | function useHooklikeInferredFunction() { return 42; } |
| LOW | tests/hook_syntax_compatibility/syntax_compatibility.js | 9 | declare export function useDeclaredHooklikeFunction(): number; |
| LOW | tests/hook_syntax_compatibility/rules_of_hooks.js | 51 | function normalFunctionWithNormalFunction() { |
| LOW | tests/hook_syntax_compatibility/rules_of_hooks.js | 56 | function normalFunctionWithConditionalFunction() { |
| LOW | tests/hook_syntax_compatibility/rules_of_hooks.js | 64 | function functionThatStartsWithUseButIsntAHook() { |
| LOW | tests/hook_syntax_compatibility/rules_of_hooks.js | 746 | function normalFunctionWithConditionalHook() { |
| LOW | tests/refinements/computed_string_literal.js | 29 | function testSwitchLiteralProperty(b: B) { |
| LOW | tests/refinements/typeof.js | 59 | function testInvalidTemplateLiteral(x: string | number) { |
| LOW | tests/refinements/typeof.js | 101 | function testAnyWithNumberPostConditional(x: any) { |
| LOW | tests/refinements/typeof.js | 132 | function testPolyClassCtorWithFunction() { |
| LOW | tests/optional/optional_param.js | 22 | function testOptionalNullableDefault(x?: ?string = "hi"): string { |
| LOW | tests/optional/optional_param.js | 27 | function testOptionalNullableProperty(obj: {x?: ?string}): string { |
| LOW | tests/optional/optional_param.js | 32 | function testOptionalNullableFlowingToNullable(x?: ?string): ?string { |
| LOW | tests/multiflow/spread.js | 28 | function funWithReadonlyObjectInRestSpread(...args: [{+bar: string, ... }]): void {} |
| LOW | tests/exact_empty_objects/test.js | 31 | function paramDefaultDestructuring({a, b}: {a?: string, b?: number} = {}) { |
| LOW | tests/exact_empty_objects/test.js | 39 | function paramDefaultDestructuringWithInnerDefault({a, b = 1}: {a?: string, b?: number} = {}) { |
| LOW | tests/type_guards/inferred.js | 6 | declare function takesBoolReturningFunction(fn: (x: unknown) => boolean): void; |
| LOW | tests/types_first/function.js | 5 | export function functionWithTypeofAndDestructuring( |
| LOW | tests/types_first/function.js | 11 | export function functionWithTypeofAndOptional(x?: number = 1, y: typeof x) {} |
| LOW | tests/lti_implicit_instantiation/upper_non_t.js | 107 | function ResolveSpreadsToMultiflowSubtypeFull() { |
| LOW | tests/arrows/arrows.js | 1 | function selectBestEffortImageForWidth( |
| LOW | …s/strict_es6_import_export/named_exported_this_func.js | 28 | export function thisWithinNestedFunctionDecl() { |
| LOW | …s/strict_es6_import_export/named_exported_this_func.js | 34 | export function thisWithinNestedAsyncFunction(): () => void { |
| LOW | tests/hook_syntax/syntax_compatibility.js | 5 | export function useHooklikeAnnotatedFunction(): void { } |
| LOW | tests/hook_syntax/syntax_compatibility.js | 7 | function useHooklikeInferredFunction() { return 42; } |
| LOW | tests/hook_syntax/syntax_compatibility.js | 9 | declare export function useDeclaredHooklikeFunction(): number; |
| LOW | tests/hook_syntax/rules_of_hooks.js | 51 | function normalFunctionWithNormalFunction() { |
| LOW | tests/hook_syntax/rules_of_hooks.js | 56 | function normalFunctionWithConditionalFunction() { |
| LOW | tests/hook_syntax/rules_of_hooks.js | 64 | function functionThatStartsWithUseButIsntAHook() { |
| LOW | tests/hook_syntax/rules_of_hooks.js | 739 | function normalFunctionWithConditionalHook() { |
| LOW | …/babel-plugin-syntax-flow-parser-oxidized/src/index.js | 30 | export default function BabelPluginSyntaxHermesParser( |
| LOW | packages/flow-for-vscode/src/handlers.ts | 24 | export function onDidChangeActiveTextEditor( |
| LOW | packages/flow-for-vscode/src/handlers.ts | 148 | export function onDidRemoveWorkspaceFolders( |
| LOW | …r-vscode/src/FlowLanguageClient/DetailedDiagnostics.ts | 127 | function validatedRenderedFromDiagnostic( |
| LOW | …-for-vscode/src/FlowLanguageClient/createMiddleware.ts | 27 | function chainHandleDiagnosticsMiddleware( |
| LOW | …r-vscode/src/FlowLanguageClient/SemanticDecorations.ts | 17 | function refinedValueRangesFromDiagostics( |
| LOW | …r-vscode/src/FlowLanguageClient/SemanticDecorations.ts | 66 | export function getFilterSemanticDecorationsMiddleWare( |
| LOW | packages/flow-for-vscode/src/utils/uriToString.ts | 70 | function makeWindowsDriveLetterUppercase( |
| LOW | …flow-for-vscode/src/utils/checkFlowVersionSatisfies.ts | 10 | export default function checkFlowVersionSatisfies( |
| LOW | …-for-vscode/src/utils/checkRelativePatternSupported.ts | 12 | export default function checkRelativePatternSupported( |
| LOW | …es/flow-for-vscode/src/utils/getVerifiedFlowBinPath.ts | 21 | function getFlowBinDirPrefixForPlatform(): null | string { |
| LOW | …ils/LanguageClient/TypeCoverageFeature/TypeCoverage.ts | 210 | function uncoveredRangeToDiagnostic( |
| LOW | …ugin-fb-flow/rules/use-exact-by-default-object-type.js | 13 | function isFileWithAmbiguousObjectTypes(context) { |
| LOW | packages/flow-dev-tools/src/flowResult.js | 172 | function prettyPrintMessageOfError( |
| LOW | packages/flow-dev-tools/src/errors.js | 63 | function getFlowErrorsWithWarnings( |
| LOW | packages/flow-dev-tools/src/errors.js | 89 | async function getUnusedSuppressionErrors( |
| LOW | …ages/flow-dev-tools/src/check-test/checkDiffCompare.js | 84 | function substituteVersionForRecord(text: string, version: string): string { |
| LOW | …flow-dev-tools/src/test/searchStackForTestAssertion.js | 15 | function searchStackForTestAssertion(): ?AssertionLocation { |
| LOW | …ools/src/test/assertions/lspNoNewMessagesAfterSleep.js | 22 | function lspNoNewMessagesAfterSleep( |
| LOW | …tools/src/test/assertions/lspNewMessagesWithTimeout.js | 20 | function lspNewMessagesWithTimeout( |
| LOW | packages/flow-dev-tools/src/comment/getPathToLoc.js | 23 | function getChildNodeContainingLocation( |
| LOW | …es/flow-dev-tools/src/comment/remove-commentsRunner.js | 33 | async function removeUnusedErrorSuppressions( |
| LOW | …es/flow-dev-tools/src/comment/remove-commentsRunner.js | 48 | async function removeUnusedErrorSuppressionsFromText( |
| 137 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1098 | self.0.metadata.frozen.react_rules.contains(&rule) |
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1139 | match self.0.metadata.frozen.deprecated_utilities.get(t) { |
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1205 | self.0.metadata.frozen.file_options.dupe() |
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1342 | self.0.metadata.overridable.available_platforms.as_ref() |
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1394 | self.0.metadata.frozen.facebook_fbs.as_deref() |
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1398 | self.0.metadata.frozen.facebook_fbt.as_deref() |
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1418 | self.0.metadata.frozen.stylex_shorthand_prop.as_deref() |
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1482 | self.0.metadata.frozen.assert_operator.usable() |
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1486 | self.0.metadata.frozen.assert_operator.specialized() |
| CRITICAL | rust_port/crates/flow_typing_context/src/lib.rs | 1796 | self.0.metadata.frozen.verbose.as_deref() |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/union_new/issue-1462-i.js | 21 | print(val.foo); // <--- foo could be an array |
| HIGH | tests/union_new/issue-1462-ii.js | 23 | print(val.foo); |
| HIGH | …ages/flow-dev-tools/src/check-test/checkTestHelpers.js | 136 | print(text: string): void { |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | …_port/crates/flow_typing_flow_common/src/flow_cache.rs | 63 | // corresponding typing rules are already sufficiently robust. |
| MEDIUM | …/crates/flow_env_builder_resolver/src/name_resolver.rs | 3377 | // possibly undefined variable. Essentially, we are treating var redeclaration as a |
| MEDIUM | …kages/flow-dev-tools/src/check-test/checkTestRunner.js | 208 | // Build results map by test name for robust matching |
| MEDIUM | …ges/flow-parser-oxidized/__tests__/runContractTests.sh | 39 | # same `$WASM_OUT` (the JS test harness `require()`s a hard-coded |
| MEDIUM | newtests/lsp/diagnostics/test.js | 29 | // To be robust against races: we'll wait up to 9s to get the |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | rust_port/crates/flow_parser_wasm/src/position.rs | 76 | // Step 1: Build line-start byte offset table and parallel UTF-16 offset table. |
| LOW | rust_port/crates/flow_parser_wasm/src/position.rs | 137 | // Step 2: Compute byte_offset for each position and sort. |
| LOW | rust_port/crates/flow_parser_wasm/src/position.rs | 162 | // Step 3: Single-pass through source text computing UTF-16 offsets. |
| LOW | src/heap/hh_shared.c | 1350 | // Step 1: Scan the root set, threading any pointers to the heap. The |
| LOW | src/heap/hh_shared.c | 1358 | // Step 2: Scan the heap object-by-object from bottom to top. The dst pointer |
| LOW | src/heap/hh_shared.c | 1398 | // Step 3: Scan the heap object-by-object again, actually moving objects this |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | runtests.sh | 370 | # Print the results in order in a pretty way |
| LOW | rust_port/.claude/porting-reminder.sh | 51 | # Increment counter |
| LOW | packages/scripts/build.sh | 61 | # Check if file contains flow annotation |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …t_port/crates/flow_parser_utils/src/flow_ast_differ.rs | 2534 | // We keep this so that we don't forget to create handlers above when we add new AST nodes. |
| MEDIUM | newtests/tool_test_example/test.js | 31 | // And here is how you can assert that a step introduces new flow errors. I |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | website/tests/check_flow_examples.sh | 12 | # Usage: |
| LOW | packages/scripts/runOxidizedJestTests.sh | 12 | # Usage: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | packages/scripts/build.sh | 63 | # Create a new file with .js.flow extension |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | src/hack_forked/test/unit/utils/to_lsp.py | 17 | initialize {"initializationOptions":{},"processId":null,"rootPath":"/data/users/waleedk/test","capabilities":{}} |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/hook_syntax_compatibility/rules_of_hooks.js | 12 | declare function doSomething(): void |
| LOW | tests/hook_syntax/rules_of_hooks.js | 12 | declare function doSomething(): void |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/custom_errors/imported.js | 21 | const emailTest1: Email = "user@example.com"; // OK |
| LOW | tests/custom_errors/imported.js | 164 | email: "user@example.com", |