0

I cannot get flow (the facebook' type checker for javascript) to follow symbolic links directories created on Windows 10 (I do use Linux for this project, so not sure if it works there or not)

Flow documentation states that Symbolic links will be followed as long as they are also in the include path

https://flow.org/en/docs/config/

" ... symlinks are followed as long as they lead to a file or directory that is also included. .."

but using this .flowconfig (located at the root of my project (above the ./src folder) Does not produce desired results -- still reports an error that

import {Something} from 'web_common/Something'

is invlalid.

.flowconfig :

[ignore]

.*/node_modules/.*
.*/build/.*
config-overrides.js
.*/src/registerServiceWorker.js
.*/src/index.js

.*/config-overrides.js


 [include]
    ./src/wc.src/



 [libs]
    flow-typed

 [lints]

 [options]

    all=true

    module.system.node.resolve_dirname=node_modules
    module.name_mapper='^react-native' ->'react-native-web'
    module.name_mapper='^web_common' ->'src/wc.src'


    esproposal.decorators=ignore
    esproposal.class_static_fields=enable
    esproposal.class_instance_fields=enable

    suppress_type=$FlowIssue
    suppress_type=$FlowFixMe



 [strict]

Is there a solution to this, or the Flow processor cannot be used on Windows with symlinked projects?

4

1 回答 1

1

我现在有这个工作。解决方案是使 [include] 目录指向符号链接目录的物理位置(而不是符号链接本身)。

所以将上面的 .flowconfig 更改为

 [include]
    ../above_project_root_actual_location/wc.src/

解决了问题

于 2018-08-03T21:04:37.057 回答