티스토리 뷰

Tool/Flow

[번역] Flow - Configuration[Option]_v0.83.0

코딩산책 2018. 10. 25. 00:36

.flowconfig [options]

How to configure Flow's various options

The [options] section in a .flowconfig file can contain several key-value pairs of the form:

[options]
keyA=valueA
keyB=valueB

Any options that are omitted will use their default values. Some options can be overridden with command line flags.

.flowconfig에 기입이 안된 생략되어진 옵션들은 디폴트 값으로 사용된다. 몇몇 옵션들은 커맨드 라인 플래그들로 덮어써질 수 있다.

Available options 

all (boolean) 

Set this to true to check all files, not just those with @flow.

The default value for all is false.

true 설정 시, @flow 설정 없이 모든 파일의 타입을 체크 한다.

디폴트 값은 false


[미숙지]emoji (boolean) 

Set this to true to add emoji to the status messages that Flow outputs when it’s busy checking your project.

The default value for emoji is false.

true 설정 시, Flow 상태 메세지 출력에 바쁠 때, 이모티콘을 붙인다.


[미숙지]esproposal.class_instance_fields (enable|ignore|warn) 

Set this to warn to indicate that Flow should give a warning on use of instance class fields per the pending spec.

You may also set this to ignore to indicate that Flow should simply ignore the syntax (i.e. Flow will not use this syntax to indicate the presence of a property on instances of the class).

The default value of this option is enable, which allows use of this proposed syntax.

warn 설정 하는 것은, Flow는 class fields 인스턴스 사용에서 보류중인 스팩에 대해 warning을 표시 할 것이다.

ignore 설정 하는 것은, Flow는 그 문법에 대해 간단하게 무시 할 수 있다.(예를 들어, class 인스턴스의 프로퍼티 존재 나타내는 문법을 사용하지 않을 것이다.)

디폴트 설정은 enable이고, 이 문법의 사용을 허용하는 것이다.


[미숙지]esproposal.class_static_fields (enable|ignore|warn) 

Set this to warn to indicate that Flow should give a warning on use of static class fields per the pending spec.

You may also set this to ignore to indicate that Flow should simply ignore the syntax (i.e. Flow will not use this syntax to indicate the presence of a static property on the class).

The default value of this option is enable, which allows use of this proposed syntax.

warn 설정 하는 것은, Flow는 class fields static 사용에서 보류중인 스팩에 대해 warning을 표시 할 것이다.

ignore 설정 하는 것은, Flow는 그 문법에 대해 간단하게 무시 할 수 있다.(예를 들어, class static 프로퍼티 존재 나타내는 문법을 사용하지 않을 것이다.)

디폴트 설정은 enable이고, 이 문법의 사용을 허용하는 것이다.


[미숙지]esproposal.decorators (ignore|warn) 

Set this to ignore to indicate that Flow should ignore decorators.

The default value of this option is warn, which gives a warning on use since this proposal is still very early-stage.

ignore 설정 하는 것은, Flow는 decorators를 무시 하는 것을 나타낸다.

디폴트 설정은 warn이고, 이 것은 이 제안은 여전히 초기단계이기 때문에 사용에 경고를 준다.


[미숙지]esproposal.export_star_as (enable|ignore|warn) 

Set this to enable to indicate that Flow should support the export * as syntax from leebyron’s proposal.

You may also set this to ignore to indicate that Flow should simply ignore the syntax. The default value of this option is warn, which gives a warning on use since this proposal is still very early-stage.

enable로 설정하는 것은, Flow는 leebyron’s proposal에 따른 export * as 문법을 지원해야만 한다는 것을 나타낸다.

만약 ingnore로 설정 하는 것은, Flow는 그 문법을 간단히 무시 해야만 할 것이다. 디폴트 값은 warn이고, 이 제안은 여전히 초기단계이기 때문에 사용에 경고를 준다.


[미숙지]esproposal.optional_chaining (enable|ignore|warn) 

Set this to enable to indicate that Flow should support the use of optional chaining per the pending spec.

You may also set this to ignore to indicate that Flow should simply ignore the syntax.

The default value of this option is warn, which gives a warning on use since this proposal is still very early-stage.

enable 설정은, Flow가 보류 스펙에 대해 optional chaining 사용의 지원을 해야만 한다는 것을 나타낸다.

ignore 설정은, Flow는 간단히 그 문법을 무시할 수 있다는 것을 나타낸다.

디폴트 값은 warn이고, 이 제안을 초기단계이기 때문에 경고를 준다.

[미숙지]esproposal.nullish_coalescing (enable|ignore|warn) 

Set this to enable to indicate that Flow should support the use of nullish coalescing per the pending spec.

You may also set this to ignore to indicate that Flow should simply ignore the syntax.

The default value of this option is warn, which gives a warning on use since this proposal is still very early-stage.

enable 설정은, Flow가 보류 스펙에 대해 nullish coalescing 사용의 지원을 해야만 한다는 것을 나타낸다.

ignore 설정은, Flow는 간단히 그 문법을 무시할 수 있다는 것을 나타낸다.

디폴트 값은 warn이고, 이 제안을 초기단계이기 때문에 경고를 준다.


[미숙지]experimental.const_params (boolean) 

Setting this to true makes Flow treat all function parameters as const bindings. Reassigning a param is an error which lets Flow be less conservative with refinements.

The default value is false.

true 설정은, Flow가 const를 바인딩 함으로써 모든 함수의 파라미터를 처리하게 만든다. 파라미터를 다시 할당하는 것은 Flow가 미세조정하여 덜 보수적으로 만드는 것으로 에러이다.

기본값은 false이다.


include_warnings (boolean) 

Setting this to true makes Flow commands include warnings in the error output. Warnings are hidden by default in the CLI to avoid console spew. (An IDE is a much better interface to show warnings.)

The default value is false.

true 설정은, Flow가 에러 출력에서 경고를 포함 하는 것이다. 경고는 콘솔에서 뿜어져 나오는 것을 피하기 위해 CLI에서 기본적으로 숨겨진다(IDE에서는 경고를 보여주는 것이 더 낳다)

기본 값은 flase이다.

log.file (string) 

The path to the log file (defaults to /tmp/flow/<escaped root path>.log).

로그 파일의 경로(기본값은 /tmp/flow/<escaped root path>.log)


max_header_tokens (integer) 

Flow tries to avoid parsing non-flow files. This means Flow needs to start lexing a file to see if it has @flow or @noflow in it. This option lets you configure how much of the file Flow lexes before it decides there is no relevant docblock.

  • Neither @flow nor @noflow - Parse this file with Flow syntax disallowed and do not typecheck it.
  • @flow - Parse this file with Flow syntax allowed and typecheck it.
  • @noflow - Parse this file with Flow syntax allowed and do not typecheck it. This is meant as an escape hatch to suppress Flow in a file without having to delete all the Flow-specific syntax.

The default value of max_header_tokens is 10.

Flow는 non-flow 파일들을 피하려 하다. 그 것은 Flow는 만약 @flow, @noflow로 파일에서 시작하는 것이 필요하다는 것이다. 이옵션은 Flow lexes가 결정되기 전까지 관련없는 docblock 얼마나 있는지 설정하게 한다.

  • @flow 도 @noflow도 - Flow 문법으로 받아드리지 않는 파일로 분석한다 그리고 그것을 타입체크 하지 않는다.

  • @flow - Flow 문법 파일로 받아드리고 분석한다 그리고 그것을 타입체크 한다.

  • @noflow - Flow 문법 파일로 받아드리고 분석한다 그리고 그것을 타입체크 하지는 않는다. 이 것은 Flow 특정 구문을 삭제하지 않고도 파일에서 Flow을 억제하는 피난용 비상구를 의미했다.

max_header_token 기본값은 10이다.

module.file_ext (string) 

By default, Flow will look for files with the extensions .js.jsx.mjs and .json. You can override this behavior with this option.

기본적으로, Flow는 .js, .jsx, .mjs, .json 확장자 파일을 찾는다. 이 옵션으로 이 것을 덮어쓰기 할 수 있다.

For example, if you do:

[options]
module.file_ext=.foo
module.file_ext=.bar

Then Flow will instead look for the file extensions .foo and .bar.

그럼 Flow는 .foo, .bar 확장자를 대신 찾는다(Note. module.file_ext 여러번 명시 할 수 있다)

Note: you can specify module.file_ext multiple times


module.ignore_non_literal_requires (boolean) 

Set this to true and Flow will no longer complain when you use require() with something other than a string literal.

The default value is false.

true 설정은 Flow는 더 이상 string literal 이외의 어떤 걸로 require()를 사용할 때 불평하지 않는다.


module.name_mapper (regex -> string) 

Specify a regular expression to match against module names, and a replacement pattern, separated by a ->.

모듈명에 붙여(?) 매칭하거나, 패턴을 교체하거나, ->로 분리하기 위해 정규식 표현을 명시한다, 

For example:

module.name_mapper='^image![a-zA-Z0-9$_]+$' -> 'ImageStub'

This makes Flow treat require('image!foo.jpg') as if it were require('ImageStub').

이것은 Flow가 require('imge!foo.jpg')를 require('ImageStub')로써 처리하게 만든다.

These are OCaml regular expressions. Use \( and \) (slashes required!) to create a capturing group, which you can refer to in the replacement pattern as \1 (up to \9).

Ocaml 정규식 표현이 있다. 캡처 그룹을 생성하기 위해 \( 그리고 \)를 사용해라 그것은 \1에서 \9까지 대체 패턴에서 참조할 수 있다??(Note: module.name_mapper를 여러번 명시할 수 있다.)

Note: you can specify module.name_mapper multiple times

module.name_mapper.extension (string -> string) 

Specify a file extension to match, and a replacement module name, separated by a ->.

Note: This is just shorthand for module.name_mapper='^\(.*\)\.EXTENSION$' -> 'TEMPLATE')

For example:

module.name_mapper.extension='css' -> '<PROJECT_ROOT>/CSSFlowStub.js.flow'

Makes Flow treat require('foo.css') as if it were require(PROJECT_ROOT + '/CSSFlowStub').

Note: You can specify module.name_mapper.extension multiple times for different extensions.

module.system (node|haste) 

The module system to use to resolve import and requireHaste is used in React Native.

The default is node.

module.system.node.resolve_dirname (string) 

By default, Flow will look in directories named node_modules for node modules. You can configure this behavior with this option.

For example, if you do:

[options]
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=custom_node_modules

Then Flow will look in directories named node_modules or custom_node_modules.

Note: you can specify module.system.node.resolve_dirname multiple times

module.use_strict (boolean) 

Set this to true if you use a transpiler that adds "use strict"; to the top of every module.

The default value is false.

munge_underscores (boolean) 

Set this to true to have Flow treat underscore-prefixed class properties and methods as private. This should be used in conjunction with jstransform’s ES6 class transform, which enforces the same privacy at runtime.

The default value is false.

no_flowlib (boolean) 

Flow has builtin library definitions. Setting this to true will tell Flow to ignore the builtin library definitions.

The default value is false.


'Tool > Flow' 카테고리의 다른 글

[번역] Flow - Configuration  (0) 2018.10.23
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함