Flow

Adds static typing to JavaScript to improve developer productivity and code quality.

Version

0.54.1

Runtime

Node.js Versions

Supported Languages

JavaScript

Official Documentation

https://flowtype.org

YAML Configuration

flow:

  • input:

    Patterns to include in reports.

    Note: The input patterns are not applied when running Flow since Flow considers dependency between files and filtering the input files affects how Flow finds modules and detects issues. Therefore, the files excluded by the patterns are always processed and you may even see logs related to the excluded files in the job console. However, Inspecode eventually ignores any issues detected on the excluded files when generating job reports.

    If you need to let Flow ignore particular files, consider specifying --include and --ignore under options:, or modifying your .flowconfig files instead.

  • ignore:

    Patterns to exclude from reports.

    Note: Just like input:, the ignore patterns are not applied when running Flow.

  • auto-fix:

    N/A

  • config-file:

    N/A

  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.75 CPU with 2880 MiB RAM.

      Inspecode automatically specifies --max-workers option to Flow according to this value. For example, --max-workers 1 is specified by default (for 0.75 CPU), --max-workers 2 is specified for 1.1 CPU.

  • options:

    Below is the list of options that are supported:

    --all                             Typecheck all files, not just @flow
    --ignore                          Specify one or more ignore patterns, comma separated
    --ignore-version                  Ignore the version constraint in .flowconfig
    --include                         Specify one or more include patterns, comma separated
    --include-suppressed              Ignore any `suppress_comment` lines in .flowconfig
    --include-warnings                Include warnings in the error output (warnings are excluded by default)
    --lib                             Specify one or more lib files/directories, comma separated
    --lints                           Specify one or more lint rules, comma separated
    --munge-underscore-members        Treat any class member name with a leading underscore as private
    --no-flowlib                      Do not include embedded declarations
    --show-all-errors                 Print all errors (the default is to truncate after 50 errors)
    --weak                            Typecheck with weak inference, assuming dynamic types by default
    
  • thresholds:

    • num-issues:

      No tool specific severity levels are available.

  • experimental:

    • incremental:

      N/A

      Note: The incremental analysis cannot be supported for Flow. This is because Flow checks files with considering dependency between them and the results on unchanged files can be affected by changed files.

YAML Examples

  • With default options:

    inspecode:
      flow: default
    
  • With custom machine:

    inspecode:
      flow:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
    
  • With custom options:

    inspecode:
      flow:
        options:
          --include-warnings:
          --lints: "all=warn, untyped-type-import=error, sketchy-null-bool=off"
    

Project Detection

Inspecode automatically detects projects where .flowconfig files are placed in your repository, and then runs Flow for each project.

Resolving Dependencies

Inspecode searches your repository for the package.json files that enable Flow and then runs npm install at each directory where the package.json file exists so that you can use the specified version of Flow.

results matching ""

    No results matching ""