Skip to content

show flow warnings and fixes all reported ones #1832

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

Merged
merged 1 commit into from
Apr 27, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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