Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flow #158

Merged
merged 1 commit into from Feb 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -64,7 +64,7 @@
"eslint-plugin-prettier": "^2.6.2",
"eslint-plugin-vue": "^4.7.1",
"execa": "^1.0.0",
"flow-bin": "^0.79.1",
"flow-bin": "0.93.0",
"jest-cli": "^23.5.0",
"prettier": "^1.14.2",
"regenerator-runtime": "^0.12.1"
Expand Down
2 changes: 1 addition & 1 deletion test/4.example.js
Expand Up @@ -5,7 +5,7 @@
import React, { Component } from 'react';

type Props = {
firstName: Object,
firstName: number,
amilajack marked this conversation as resolved.
Show resolved Hide resolved
lastName: string
};

Expand Down
16 changes: 8 additions & 8 deletions test/__snapshots__/format.spec.js.snap
Expand Up @@ -95,8 +95,8 @@ exports[`Check codebases project-1 - eslint should give expected output 1`] = `
20:11 error Cannot add \`str\` and \`who\` because function (see line 12) is incompatible with number (see line 16) flowtype-errors/show-errors

./4.example.js
27:13 error Cannot create \`Foo\` element because property \`lastName\` is missing in props but exists in \`Props\` (see line 11) flowtype-errors/show-errors
27:27 error Cannot create \`Foo\` element because string is incompatible with object type (see line 7) in property \`firstName\` flowtype-errors/show-errors
27:13 error Cannot create \`Foo\` element because property \`lastName\` is missing in props but exists in \`Props\` (see line 11) flowtype-errors/show-errors
27:27 error Cannot create \`Foo\` element because string is incompatible with number (see line 7) in property \`firstName\` flowtype-errors/show-errors

./5.example.js
8:3 error Cannot call \`s\` with \`'4'\` bound to \`x\` because string is incompatible with number (see line 4) flowtype-errors/show-errors
Expand All @@ -114,7 +114,7 @@ exports[`Check codebases project-1 - eslint should give expected output 1`] = `

./9.example.js
8:18 error Cannot create \`Hello\` element because property \`name\` is missing in props but exists in object type (see ./9.example.import.js:6) flowtype-errors/show-errors
8:28 error Cannot call \`ReactDOM.render\` with \`document.getElementById(...)\` bound to \`container\` because null (see https://github.com/facebook/flow/blob/v0.79.1/lib/dom.js#L664) is incompatible with \`Element\` (see https://github.com/facebook/flow/blob/v0.79.1/lib/react-dom.js#L18) flowtype-errors/show-errors
8:28 error Cannot call \`ReactDOM.render\` with \`document.getElementById(...)\` bound to \`container\` because null (see https://github.com/facebook/flow/blob/v0.93.0/lib/dom.js#L783) is incompatible with \`Element\` (see https://github.com/facebook/flow/blob/v0.93.0/lib/react-dom.js#L18) flowtype-errors/show-errors

✖ 21 problems (21 errors, 0 warnings)

Expand Down Expand Up @@ -148,7 +148,7 @@ exports[`Check codebases run-all-flowdir - eslint should give expected output 1`
exports[`Check codebases warnings-all - eslint should give expected output 1`] = `
"
./example.js
9:22 warning Unclear type. Using \`any\`, \`Object\`, \`Function\`, \`$Subtype<...>\`, or \`$Supertype<...>\` types is not safe! (\`unclear-type\`) flowtype-errors/show-warnings
9:22 warning Unclear type. Using \`any\`, \`Object\`, or \`Function\` types is not safe! (\`unclear-type\`) flowtype-errors/show-warnings

✖ 1 problem (0 errors, 1 warning)

Expand All @@ -160,8 +160,8 @@ exports[`Check codebases warnings-default - eslint should give expected output 1
exports[`Check codebases warnings-mixed - eslint should give expected output 1`] = `
"
./example.js
10:22 warning Unclear type. Using \`any\`, \`Object\`, \`Function\`, \`$Subtype<...>\`, or \`$Supertype<...>\` types is not safe! (\`unclear-type\`) flowtype-errors/show-warnings
19:10 error Cannot return \`x.reduce(...) / x.length\` because number is incompatible with string (see line 18) flowtype-errors/show-errors
10:22 warning Unclear type. Using \`any\`, \`Object\`, or \`Function\` types is not safe! (\`unclear-type\`) flowtype-errors/show-warnings
19:10 error Cannot return \`x.reduce(...) / x.length\` because number is incompatible with string (see line 18) flowtype-errors/show-errors

✖ 2 problems (1 error, 1 warning)

Expand Down Expand Up @@ -415,7 +415,7 @@ Array [
"offset": 442,
},
},
"message": "Cannot create \`Foo\` element because string is incompatible with object type (see line 8) in property \`firstName\`.",
"message": "Cannot create \`Foo\` element because string is incompatible with number (see line 8) in property \`firstName\`.",
"start": 28,
"type": "default",
},
Expand Down Expand Up @@ -584,7 +584,7 @@ Array [
"offset": 170,
},
},
"message": "Cannot call \`ReactDOM.render\` with \`document.getElementById(...)\` bound to \`container\` because null (see https://github.com/facebook/flow/blob/v0.79.1/lib/dom.js#L664) is incompatible with \`Element\` (see https://github.com/facebook/flow/blob/v0.79.1/lib/react-dom.js#L18).",
"message": "Cannot call \`ReactDOM.render\` with \`document.getElementById(...)\` bound to \`container\` because null (see https://github.com/facebook/flow/blob/v0.93.0/lib/dom.js#L783) is incompatible with \`Element\` (see https://github.com/facebook/flow/blob/v0.93.0/lib/react-dom.js#L18).",
"start": 9,
"type": "default",
},
Expand Down
2 changes: 1 addition & 1 deletion test/codebases/project-1/4.example.js
Expand Up @@ -4,7 +4,7 @@
import React, { Component } from 'react';

type Props = {
firstName: Object,
firstName: number,
amilajack marked this conversation as resolved.
Show resolved Hide resolved
lastName: string
};

Expand Down
7 changes: 4 additions & 3 deletions yarn.lock
Expand Up @@ -2196,9 +2196,10 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2"
write "^0.2.1"

flow-bin@^0.79.1:
version "0.79.1"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.79.1.tgz#01c9f427baa6556753fa878c192d42e1ecb764b6"
flow-bin@0.93.0:
version "0.93.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.93.0.tgz#9192a08d88db2a8da0ff55e42420f44539791430"
integrity sha512-p8yq4ocOlpyJgOEBEj0v0GzCP25c9WP0ilFQ8hXSbrTR7RPKuR+Whr+OitlVyp8ocdX0j1MrIwQ8x28dacy1pg==

for-in@^1.0.1, for-in@^1.0.2:
version "1.0.2"
Expand Down