Skip to content

Commit

Permalink
show flow warnings and fixes all reported ones (#1832)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Apr 27, 2019
1 parent 09ed816 commit 09940fb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .flowconfig
Expand Up @@ -10,6 +10,8 @@
[libs]

[options]
include_warnings=true
module.use_strict=true
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$DisableFlowOnNegativeTest
Expand Down
1 change: 0 additions & 1 deletion src/type/__tests__/predicate-test.js
Expand Up @@ -605,7 +605,6 @@ describe('Directive predicates', () => {
});

it('returns false for directive class (rather than instance)', () => {
// $DisableFlowOnNegativeTest
expect(isDirective(GraphQLDirective)).to.equal(false);
expect(() => assertDirective(GraphQLDirective)).to.throw();
});
Expand Down
3 changes: 0 additions & 3 deletions src/utilities/__tests__/buildClientSchema-test.js
Expand Up @@ -548,7 +548,6 @@ describe('Type System: build schema from introspection', () => {
const introspection = introspectionFromSchema(dummySchema);

expect(introspection).to.have.nested.property('__schema.queryType.name');
// $DisableFlowOnNegativeTest
delete introspection.__schema.queryType.name;

expect(() => buildClientSchema(introspection)).to.throw(
Expand Down Expand Up @@ -705,7 +704,6 @@ describe('Type System: build schema from introspection', () => {
name: 'SomeDirective',
locations: ['QUERY'],
});
// $DisableFlowOnNegativeTest
delete someDirectiveIntrospection.locations;

expect(() => buildClientSchema(introspection)).to.throw(
Expand All @@ -721,7 +719,6 @@ describe('Type System: build schema from introspection', () => {
name: 'SomeDirective',
args: [],
});
// $DisableFlowOnNegativeTest
delete someDirectiveIntrospection.args;

expect(() => buildClientSchema(introspection)).to.throw(
Expand Down

0 comments on commit 09940fb

Please sign in to comment.