From 7b3241329e1ff49fb647b043b80568f0cf9e1a7c Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Mon, 27 Jul 2020 15:07:37 +0300 Subject: [PATCH] Remove Flow file annotations & add missing 3rd-party typings (#2724) --- .eslintignore | 2 + .eslintrc.yml | 116 +++--- .flowconfig | 10 +- flow-typed/npm/chai_vx.x.x.js | 331 ++++++++++++++++++ flow-typed/npm/mocha_vx.x.x.js | 305 ++++++++++++++++ integrationTests/integration-test.js | 2 - integrationTests/ts/test.js | 2 - resources/add-extension-to-import-paths.js | 2 - resources/benchmark-fork.js | 2 - resources/benchmark.js | 2 - resources/build-deno.js | 2 - resources/build-npm.js | 2 - resources/check-cover.js | 2 - resources/check-cycles.js | 2 - resources/colors.js | 2 - resources/eslint-internal-rules/index.js | 2 - .../eslint-internal-rules/no-dir-import.js | 2 - resources/gen-changelog.js | 2 - resources/gen-version.js | 6 +- resources/inline-invariant.js | 2 - resources/utils.js | 2 - src/__fixtures__/index.js | 2 - src/__testUtils__/__tests__/dedent-test.js | 2 - .../__tests__/genFuzzStrings-test.js | 2 - .../__tests__/inspectStr-test.js | 2 - src/__testUtils__/dedent.js | 2 - src/__testUtils__/genFuzzStrings.js | 2 - src/__testUtils__/inspectStr.js | 2 - src/__tests__/starWarsData.js | 2 - src/__tests__/starWarsIntrospection-test.js | 2 - src/__tests__/starWarsQuery-test.js | 2 - src/__tests__/starWarsSchema.js | 2 - src/__tests__/starWarsValidation-test.js | 2 - src/__tests__/version-test.js | 2 - src/error/GraphQLError.js | 2 - src/error/__tests__/GraphQLError-test.js | 2 - src/error/__tests__/formatError-test.js | 2 - src/error/__tests__/locatedError-test.js | 2 - src/error/formatError.js | 2 - src/error/index.js | 2 - src/error/locatedError.js | 2 - src/error/syntaxError.js | 2 - .../__tests__/abstract-promise-test.js | 2 - src/execution/__tests__/abstract-test.js | 2 - src/execution/__tests__/directives-test.js | 2 - src/execution/__tests__/executor-test.js | 2 - src/execution/__tests__/lists-test.js | 2 - src/execution/__tests__/mutations-test.js | 2 - src/execution/__tests__/nonnull-test.js | 2 - src/execution/__tests__/resolve-test.js | 2 - src/execution/__tests__/schema-test.js | 2 - src/execution/__tests__/sync-test.js | 2 - .../__tests__/union-interface-test.js | 2 - src/execution/__tests__/variables-test.js | 2 - src/execution/execute.js | 2 - src/execution/index.js | 2 - src/execution/values.js | 2 - src/graphql.js | 2 - src/index.js | 2 - src/jsutils/ObjMap.js | 2 - src/jsutils/Path.js | 2 - src/jsutils/PromiseOrValue.js | 2 - src/jsutils/__tests__/didYouMean-test.js | 2 - src/jsutils/__tests__/identityFunc-test.js | 2 - src/jsutils/__tests__/inspect-test.js | 2 - src/jsutils/__tests__/instanceOf-test.js | 2 - src/jsutils/__tests__/invariant-test.js | 2 - src/jsutils/__tests__/isCollection-test.js | 2 - src/jsutils/__tests__/isObjectLike-test.js | 2 - src/jsutils/__tests__/suggestionList-test.js | 2 - src/jsutils/__tests__/toObjMap-test.js | 2 - src/jsutils/defineInspect.js | 2 - src/jsutils/devAssert.js | 2 - src/jsutils/didYouMean.js | 2 - src/jsutils/identityFunc.js | 2 - src/jsutils/inspect.js | 2 - src/jsutils/instanceOf.js | 2 - src/jsutils/invariant.js | 2 - src/jsutils/isCollection.js | 2 - src/jsutils/isObjectLike.js | 2 - src/jsutils/isPromise.js | 2 - src/jsutils/keyMap.js | 2 - src/jsutils/keyValMap.js | 2 - src/jsutils/mapValue.js | 2 - src/jsutils/memoize3.js | 2 - src/jsutils/nodejsCustomInspectSymbol.js | 2 - src/jsutils/printPathArray.js | 2 - src/jsutils/promiseForObject.js | 2 - src/jsutils/promiseReduce.js | 2 - src/jsutils/suggestionList.js | 2 - src/jsutils/toObjMap.js | 2 - src/language/__tests__/blockString-fuzz.js | 2 - src/language/__tests__/blockString-test.js | 2 - src/language/__tests__/lexer-test.js | 2 - src/language/__tests__/parser-benchmark.js | 2 - src/language/__tests__/parser-test.js | 2 - src/language/__tests__/predicates-test.js | 2 - src/language/__tests__/printLocation-test.js | 2 - src/language/__tests__/printer-test.js | 2 - src/language/__tests__/schema-parser-test.js | 2 - src/language/__tests__/schema-printer-test.js | 2 - src/language/__tests__/source-test.js | 2 - src/language/__tests__/toJSONDeep.js | 2 - src/language/__tests__/visitor-test.js | 2 - src/language/ast.js | 2 - src/language/blockString.js | 2 - src/language/directiveLocation.js | 2 - src/language/index.js | 2 - src/language/kinds.js | 2 - src/language/lexer.js | 2 - src/language/location.js | 2 - src/language/parser.js | 2 - src/language/predicates.js | 2 - src/language/printLocation.js | 2 - src/language/printer.js | 2 - src/language/source.js | 2 - src/language/tokenKind.js | 2 - src/language/visitor.js | 2 - src/polyfills/arrayFrom.js | 2 - src/polyfills/find.js | 2 - src/polyfills/flatMap.js | 2 - src/polyfills/isFinite.js | 2 - src/polyfills/isInteger.js | 2 - src/polyfills/objectEntries.js | 2 - src/polyfills/objectValues.js | 2 - src/polyfills/symbols.js | 2 - .../eventEmitterAsyncIterator-test.js | 2 - .../__tests__/eventEmitterAsyncIterator.js | 2 - .../__tests__/mapAsyncIterator-test.js | 2 - src/subscription/__tests__/subscribe-test.js | 2 - src/subscription/index.js | 2 - src/subscription/mapAsyncIterator.js | 2 - src/subscription/subscribe.js | 2 - src/type/__tests__/definition-test.js | 2 - src/type/__tests__/directive-test.js | 2 - src/type/__tests__/enumType-test.js | 2 - src/type/__tests__/extensions-test.js | 2 - src/type/__tests__/introspection-test.js | 2 - src/type/__tests__/predicate-test.js | 2 - src/type/__tests__/scalars-test.js | 2 - src/type/__tests__/schema-test.js | 2 - src/type/__tests__/validation-test.js | 2 - src/type/definition.js | 2 - src/type/directives.js | 2 - src/type/index.js | 2 - src/type/introspection.js | 2 - src/type/scalars.js | 2 - src/type/schema.js | 2 - src/type/validate.js | 2 - src/utilities/TypeInfo.js | 2 - src/utilities/__tests__/TypeInfo-test.js | 2 - .../__tests__/assertValidName-test.js | 2 - src/utilities/__tests__/astFromValue-test.js | 2 - .../__tests__/buildASTSchema-benchmark.js | 2 - .../__tests__/buildASTSchema-test.js | 2 - .../__tests__/buildClientSchema-benchmark.js | 2 - .../__tests__/buildClientSchema-test.js | 2 - .../__tests__/coerceInputValue-test.js | 2 - src/utilities/__tests__/concatAST-test.js | 2 - src/utilities/__tests__/extendSchema-test.js | 2 - .../__tests__/findBreakingChanges-test.js | 2 - .../__tests__/getIntrospectionQuery-test.js | 2 - .../__tests__/getOperationAST-test.js | 2 - .../__tests__/getOperationRootType-test.js | 2 - .../introspectionFromSchema-benchmark.js | 2 - .../__tests__/introspectionFromSchema-test.js | 2 - .../__tests__/lexicographicSortSchema-test.js | 2 - src/utilities/__tests__/printSchema-test.js | 2 - .../__tests__/separateOperations-test.js | 2 - .../__tests__/stripIgnoredCharacters-fuzz.js | 2 - .../__tests__/stripIgnoredCharacters-test.js | 2 - .../__tests__/typeComparators-test.js | 2 - src/utilities/__tests__/valueFromAST-test.js | 2 - .../__tests__/valueFromASTUntyped-test.js | 2 - src/utilities/assertValidName.js | 2 - src/utilities/astFromValue.js | 2 - src/utilities/buildASTSchema.js | 2 - src/utilities/buildClientSchema.js | 2 - src/utilities/coerceInputValue.js | 2 - src/utilities/concatAST.js | 2 - src/utilities/extendSchema.js | 2 - src/utilities/findBreakingChanges.js | 2 - src/utilities/findDeprecatedUsages.js | 2 - src/utilities/getIntrospectionQuery.js | 2 - src/utilities/getOperationAST.js | 2 - src/utilities/getOperationRootType.js | 2 - src/utilities/index.js | 2 - src/utilities/introspectionFromSchema.js | 2 - src/utilities/lexicographicSortSchema.js | 2 - src/utilities/printSchema.js | 2 - src/utilities/separateOperations.js | 2 - src/utilities/stripIgnoredCharacters.js | 2 - src/utilities/typeComparators.js | 2 - src/utilities/typeFromAST.js | 2 - src/utilities/valueFromAST.js | 2 - src/utilities/valueFromASTUntyped.js | 2 - src/validation/ValidationContext.js | 2 - .../ExecutableDefinitionsRule-test.js | 2 - .../__tests__/FieldsOnCorrectTypeRule-test.js | 2 - .../FragmentsOnCompositeTypesRule-test.js | 2 - .../__tests__/KnownArgumentNamesRule-test.js | 2 - .../__tests__/KnownDirectivesRule-test.js | 2 - .../__tests__/KnownFragmentNamesRule-test.js | 2 - .../__tests__/KnownTypeNamesRule-test.js | 2 - .../LoneAnonymousOperationRule-test.js | 2 - .../LoneSchemaDefinitionRule-test.js | 2 - .../__tests__/NoDeprecatedCustomRule-test.js | 2 - .../__tests__/NoFragmentCyclesRule-test.js | 2 - .../NoSchemaIntrospectionCustomRule-test.js | 2 - .../NoUndefinedVariablesRule-test.js | 2 - .../__tests__/NoUnusedFragmentsRule-test.js | 2 - .../__tests__/NoUnusedVariablesRule-test.js | 2 - .../OverlappingFieldsCanBeMergedRule-test.js | 2 - .../PossibleFragmentSpreadsRule-test.js | 2 - .../PossibleTypeExtensionsRule-test.js | 2 - .../ProvidedRequiredArgumentsRule-test.js | 2 - .../__tests__/ScalarLeafsRule-test.js | 2 - .../SingleFieldSubscriptionsRule-test.js | 2 - .../__tests__/UniqueArgumentNamesRule-test.js | 2 - .../UniqueDirectiveNamesRule-test.js | 2 - .../UniqueDirectivesPerLocationRule-test.js | 2 - .../UniqueEnumValueNamesRule-test.js | 2 - .../UniqueFieldDefinitionNamesRule-test.js | 2 - .../__tests__/UniqueFragmentNamesRule-test.js | 2 - .../UniqueInputFieldNamesRule-test.js | 2 - .../UniqueOperationNamesRule-test.js | 2 - .../UniqueOperationTypesRule-test.js | 2 - .../__tests__/UniqueTypeNamesRule-test.js | 2 - .../__tests__/UniqueVariableNamesRule-test.js | 2 - .../__tests__/ValuesOfCorrectTypeRule-test.js | 2 - .../VariablesAreInputTypesRule-test.js | 2 - .../VariablesInAllowedPositionRule-test.js | 2 - src/validation/__tests__/harness.js | 11 +- .../__tests__/validateGQL-benchmark.js | 2 - .../__tests__/validateInvalidGQL-benchmark.js | 2 - .../__tests__/validateSDL-benchmark.js | 2 - src/validation/__tests__/validation-test.js | 2 - src/validation/index.js | 2 - src/validation/rules/ExecutableDefinitions.js | 2 - .../rules/ExecutableDefinitionsRule.js | 2 - .../rules/FieldsOnCorrectTypeRule.js | 2 - .../rules/FragmentsOnCompositeTypesRule.js | 2 - .../rules/KnownArgumentNamesRule.js | 2 - src/validation/rules/KnownDirectivesRule.js | 2 - .../rules/KnownFragmentNamesRule.js | 2 - src/validation/rules/KnownTypeNamesRule.js | 2 - .../rules/LoneAnonymousOperationRule.js | 2 - src/validation/rules/LoneSchemaDefinition.js | 2 - .../rules/LoneSchemaDefinitionRule.js | 2 - src/validation/rules/NoFragmentCyclesRule.js | 2 - .../rules/NoUndefinedVariablesRule.js | 2 - src/validation/rules/NoUnusedFragmentsRule.js | 2 - src/validation/rules/NoUnusedVariablesRule.js | 2 - .../rules/OverlappingFieldsCanBeMergedRule.js | 2 - .../rules/PossibleFragmentSpreadsRule.js | 2 - .../rules/PossibleTypeExtensions.js | 2 - .../rules/PossibleTypeExtensionsRule.js | 2 - .../rules/ProvidedRequiredArgumentsRule.js | 2 - src/validation/rules/ScalarLeafsRule.js | 2 - .../rules/SingleFieldSubscriptionsRule.js | 2 - .../rules/UniqueArgumentNamesRule.js | 2 - src/validation/rules/UniqueDirectiveNames.js | 2 - .../rules/UniqueDirectiveNamesRule.js | 2 - .../rules/UniqueDirectivesPerLocationRule.js | 2 - src/validation/rules/UniqueEnumValueNames.js | 2 - .../rules/UniqueEnumValueNamesRule.js | 2 - .../rules/UniqueFieldDefinitionNames.js | 2 - .../rules/UniqueFieldDefinitionNamesRule.js | 2 - .../rules/UniqueFragmentNamesRule.js | 2 - .../rules/UniqueInputFieldNamesRule.js | 2 - .../rules/UniqueOperationNamesRule.js | 2 - src/validation/rules/UniqueOperationTypes.js | 2 - .../rules/UniqueOperationTypesRule.js | 2 - src/validation/rules/UniqueTypeNames.js | 2 - src/validation/rules/UniqueTypeNamesRule.js | 2 - .../rules/UniqueVariableNamesRule.js | 2 - .../rules/ValuesOfCorrectTypeRule.js | 2 - .../rules/VariablesAreInputTypesRule.js | 2 - .../rules/VariablesInAllowedPositionRule.js | 2 - .../rules/custom/NoDeprecatedCustomRule.js | 2 - .../custom/NoSchemaIntrospectionCustomRule.js | 2 - src/validation/specifiedRules.js | 2 - src/validation/validate.js | 2 - src/version.js | 2 - 284 files changed, 706 insertions(+), 629 deletions(-) create mode 100644 flow-typed/npm/chai_vx.x.x.js create mode 100644 flow-typed/npm/mocha_vx.x.x.js diff --git a/.eslintignore b/.eslintignore index 639166654c..4bd345e311 100644 --- a/.eslintignore +++ b/.eslintignore @@ -8,5 +8,7 @@ /npm /deno +# Ignore Flow typings for 3rd-party libraries +/flow-typed # Ignore TS files inside integration test /integrationTests/ts/*.ts diff --git a/.eslintrc.yml b/.eslintrc.yml index 4a4594dc36..2d35bfbcc3 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,19 +1,16 @@ -parser: babel-eslint parserOptions: - sourceType: module + sourceType: script + ecmaVersion: 2020 env: es6: true node: true reportUnusedDisableDirectives: true plugins: - internal-rules - - flowtype - node - istanbul - import settings: - flowtype: - onlyFilesWithFlowAnnotation: true node: tryExtensions: ['.js', '.json', '.node', '.ts', '.d.ts'] @@ -25,54 +22,6 @@ rules: internal-rules/no-dir-import: error - ############################################################################## - # `eslint-plugin-flowtype` rule list based on `v5.2.x` - # https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype - ############################################################################## - - flowtype/array-style-complex-type: error - flowtype/array-style-simple-type: error - flowtype/define-flow-type: error - flowtype/newline-after-flow-annotation: error - flowtype/no-dupe-keys: error - flowtype/no-existential-type: off # checked by Flow - flowtype/no-flow-fix-me-comments: off - flowtype/no-mixed: off - flowtype/no-mutable-array: off - flowtype/no-primitive-constructor-types: error - flowtype/no-types-missing-file-annotation: error - flowtype/no-unused-expressions: off - flowtype/no-weak-types: [error, { any: false }] - flowtype/require-compound-type-alias: off - flowtype/require-exact-type: off - flowtype/require-indexer-name: error - flowtype/require-inexact-type: off # checked by Flow - flowtype/require-parameter-type: off - flowtype/require-readonly-react-props: off - flowtype/require-return-type: off - flowtype/require-types-at-top: off - flowtype/require-valid-file-annotation: - [error, always, { annotationStyle: line, strict: true }] - flowtype/require-variable-type: off - flowtype/sort-keys: off - flowtype/spread-exact-type: off - flowtype/type-id-match: [error, '^[A-Z]'] - flowtype/type-import-style: [error, declaration] - flowtype/use-flow-type: error - - # Bellow rules are disabled because coflicts with Prettier, see: - # https://github.com/prettier/eslint-config-prettier/blob/master/flowtype.js - flowtype/arrow-parens: off - flowtype/boolean-style: off - flowtype/delimiter-dangle: off - flowtype/generic-spacing: off - flowtype/object-type-delimiter: off - flowtype/semi: off - flowtype/space-after-type-colon: off - flowtype/space-before-generic-bracket: off - flowtype/space-before-type-colon: off - flowtype/union-intersection-spacing: off - ############################################################################## # `eslint-plugin-istanbul` rule list based on `v0.1.2` # https://github.com/istanbuljs/eslint-plugin-istanbul#rules @@ -491,17 +440,70 @@ rules: yield-star-spacing: off overrides: + - files: 'src/**/*.js' + parser: babel-eslint + parserOptions: + sourceType: module + plugins: + - flowtype + + rules: + ############################################################################## + # `eslint-plugin-flowtype` rule list based on `v5.2.x` + # https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype + ############################################################################## + + flowtype/array-style-complex-type: error + flowtype/array-style-simple-type: error + flowtype/define-flow-type: error + flowtype/newline-after-flow-annotation: error + flowtype/no-dupe-keys: error + flowtype/no-existential-type: off # checked by Flow + flowtype/no-flow-fix-me-comments: off + flowtype/no-mixed: off + flowtype/no-mutable-array: off + flowtype/no-primitive-constructor-types: error + flowtype/no-types-missing-file-annotation: off + flowtype/no-unused-expressions: off + flowtype/no-weak-types: [error, { any: false }] + flowtype/require-compound-type-alias: off + flowtype/require-exact-type: off + flowtype/require-indexer-name: error + flowtype/require-inexact-type: off # checked by Flow + flowtype/require-parameter-type: off + flowtype/require-readonly-react-props: off + flowtype/require-return-type: off + flowtype/require-types-at-top: off + flowtype/require-valid-file-annotation: off + flowtype/require-variable-type: off + flowtype/sort-keys: off + flowtype/spread-exact-type: off + flowtype/type-id-match: [error, '^[A-Z]'] + flowtype/type-import-style: [error, declaration] + flowtype/use-flow-type: error + + # Bellow rules are disabled because coflicts with Prettier, see: + # https://github.com/prettier/eslint-config-prettier/blob/master/flowtype.js + flowtype/arrow-parens: off + flowtype/boolean-style: off + flowtype/delimiter-dangle: off + flowtype/generic-spacing: off + flowtype/object-type-delimiter: off + flowtype/semi: off + flowtype/space-after-type-colon: off + flowtype/space-before-generic-bracket: off + flowtype/space-before-type-colon: off + flowtype/union-intersection-spacing: off - files: '**/*.ts' parser: '@typescript-eslint/parser' parserOptions: + sourceType: module project: ['tsconfig.json'] plugins: - '@typescript-eslint' extends: - plugin:import/typescript rules: - flowtype/no-types-missing-file-annotation: off - ########################################################################## # `@typescript-eslint/eslint-plugin` rule list based on `v3.7.x` ########################################################################## @@ -645,8 +647,6 @@ overrides: import/no-nodejs-modules: off no-restricted-syntax: off - files: 'integrationTests/**' - parserOptions: - sourceType: script rules: node/no-unpublished-import: off node/no-unpublished-require: off @@ -655,8 +655,6 @@ overrides: import/no-nodejs-modules: off no-console: off - files: 'resources/**' - parserOptions: - sourceType: script rules: node/no-unpublished-import: off node/no-unpublished-require: off diff --git a/.flowconfig b/.flowconfig index d8b3e69267..17721c0083 100644 --- a/.flowconfig +++ b/.flowconfig @@ -1,13 +1,9 @@ [ignore] .* !/src -!/node_modules/chai -!/node_modules/mocha [include] -[libs] - [lints] sketchy-null-bool=error sketchy-null-string=error @@ -16,7 +12,7 @@ sketchy-null-mixed=error sketchy-number=error untyped-type-import=error nonstrict-import=off -untyped-import=off +untyped-import=error unclear-type=off deprecated-type=error deprecated-utility=error @@ -37,10 +33,12 @@ mixed-import-and-require=error export-renamed-default=error [options] -include_warnings=true +all=true module.use_strict=true babel_loose_array_spread=true esproposal.optional_chaining=enable +experimental.const_params=true +include_warnings=true [version] ^0.130.0 diff --git a/flow-typed/npm/chai_vx.x.x.js b/flow-typed/npm/chai_vx.x.x.js new file mode 100644 index 0000000000..aa4cbe8e4f --- /dev/null +++ b/flow-typed/npm/chai_vx.x.x.js @@ -0,0 +1,331 @@ +declare module 'chai' { + declare type ExpectChain = { + and: ExpectChain, + at: ExpectChain, + be: ExpectChain, + been: ExpectChain, + have: ExpectChain, + has: ExpectChain, + is: ExpectChain, + of: ExpectChain, + same: ExpectChain, + that: ExpectChain, + to: ExpectChain, + which: ExpectChain, + with: ExpectChain, + not: ExpectChain, + deep: ExpectChain, + any: ExpectChain, + all: ExpectChain, + own: ExpectChain, + a: ExpectChain & ((type: string, message?: string) => ExpectChain), + an: ExpectChain & ((type: string, message?: string) => ExpectChain), + include: ExpectChain & + ((value: mixed, message?: string) => ExpectChain), + includes: ExpectChain & + ((value: mixed, message?: string) => ExpectChain), + contain: ExpectChain & + ((value: mixed, message?: string) => ExpectChain), + contains: ExpectChain & + ((value: mixed, message?: string) => ExpectChain), + eq: (value: T, message?: string) => ExpectChain, + eql: (value: T, message?: string) => ExpectChain, + equal: (value: T, message?: string) => ExpectChain, + equals: (value: T, message?: string) => ExpectChain, + above: (value: T & number, message?: string) => ExpectChain, + gt: (value: T & number, message?: string) => ExpectChain, + greaterThan: (value: T & number, message?: string) => ExpectChain, + least: (value: T & number, message?: string) => ExpectChain, + below: (value: T & number, message?: string) => ExpectChain, + lessThan: (value: T & number, message?: string) => ExpectChain, + lt: (value: T & number, message?: string) => ExpectChain, + most: (value: T & number, message?: string) => ExpectChain, + within: ( + start: T & number, + finish: T & number, + message?: string, + ) => ExpectChain, + instanceof: (constructor: mixed, message?: string) => ExpectChain, + instanceOf: (constructor: mixed, message?: string) => ExpectChain, + nested: ExpectChain, + property:

( + name: string, + value?: P, + message?: string, + ) => ExpectChain

& ((name: string) => ExpectChain), + length: ExpectChain & + ((value: number, message?: string) => ExpectChain), + lengthOf: ExpectChain & + ((value: number, message?: string) => ExpectChain), + match: (regex: RegExp, message?: string) => ExpectChain, + matches: (regex: RegExp, message?: string) => ExpectChain, + string: (string: string, message?: string) => ExpectChain, + key: (key: string) => ExpectChain, + keys: ( + key: string | Array, + ...keys: Array + ) => ExpectChain, + throw: ( + err?: Class | Error | RegExp | string, + errMsgMatcher?: RegExp | string, + msg?: string, + ) => ExpectChain, + respondTo: (method: string, message?: string) => ExpectChain, + itself: ExpectChain, + satisfy: ( + method: (value: T) => boolean, + message?: string, + ) => ExpectChain, + closeTo: ( + expected: T & number, + delta: number, + message?: string, + ) => ExpectChain, + members: (set: mixed, message?: string) => ExpectChain, + oneOf: (list: Array, message?: string) => ExpectChain, + change: (obj: mixed, key: string, message?: string) => ExpectChain, + increase: (obj: mixed, key: string, message?: string) => ExpectChain, + decrease: (obj: mixed, key: string, message?: string) => ExpectChain, + by: (delta: number, message?: string) => ExpectChain, + ordered: ExpectChain, + // dirty-chai + ok: () => ExpectChain, + true: () => ExpectChain, + false: () => ExpectChain, + null: () => ExpectChain, + undefined: () => ExpectChain, + exist: () => ExpectChain, + empty: () => ExpectChain, + extensible: () => ExpectChain, + sealed: () => ExpectChain, + frozen: () => ExpectChain, + NaN: () => ExpectChain, + // chai-immutable + size: (n: number) => ExpectChain, + // sinon-chai + called: () => ExpectChain, + callCount: (n: number) => ExpectChain, + calledOnce: () => ExpectChain, + calledTwice: () => ExpectChain, + calledThrice: () => ExpectChain, + calledBefore: (spy: mixed) => ExpectChain, + calledAfter: (spy: mixed) => ExpectChain, + calledImmediatelyBefore: (spy: mixed) => ExpectChain, + calledImmediatelyAfter: (spy: mixed) => ExpectChain, + calledWith: (...args: Array) => ExpectChain, + calledOnceWith: (...args: Array) => ExpectChain, + calledWithMatch: (...args: Array) => ExpectChain, + calledWithExactly: (...args: Array) => ExpectChain, + calledOnceWithExactly: (...args: Array) => ExpectChain, + returned: (returnVal: mixed) => ExpectChain, + alwaysReturned: (returnVal: mixed) => ExpectChain, + // chai-as-promised + eventually: ExpectChain, + resolvedWith: (value: mixed) => Promise & ExpectChain, + resolved: () => Promise & ExpectChain, + rejectedWith: ( + value: mixed, + errMsgMatcher?: RegExp | string, + msg?: string, + ) => Promise & ExpectChain, + rejected: () => Promise & ExpectChain, + notify: (callback: () => mixed) => ExpectChain, + fulfilled: () => Promise & ExpectChain, + // chai-subset + containSubset: (obj: { ... } | Array<{ ... }>) => ExpectChain, + // chai-redux-mock-store + dispatchedActions: ( + actions: Array<{ ... } | ((action: { ... }) => any)>, + ) => ExpectChain, + dispatchedTypes: (actions: Array) => ExpectChain, + // chai-enzyme + attr: (key: string, val?: any) => ExpectChain, + data: (key: string, val?: any) => ExpectChain, + prop: (key: string, val?: any) => ExpectChain, + state: (key: string, val?: any) => ExpectChain, + value: (val: string) => ExpectChain, + className: (val: string) => ExpectChain, + text: (val: string) => ExpectChain, + // chai-karma-snapshot + matchSnapshot: (lang?: any, update?: boolean, msg?: any) => ExpectChain, + ... + }; + + declare var expect: { + (actual: T, message?: string): ExpectChain, + fail: ((message?: string) => void) & + (( + actual: any, + expected: any, + message?: string, + operator?: string, + ) => void), + ... + }; + + declare function use(plugin: (chai: Object, utils: Object) => void): void; + + declare class assert { + static (expression: mixed, message?: string): void; + static fail( + actual: mixed, + expected: mixed, + message?: string, + operator?: string, + ): void; + + static isOk(object: mixed, message?: string): void; + static isNotOk(object: mixed, message?: string): void; + + static empty(object: mixed, message?: string): void; + static isEmpty(object: mixed, message?: string): void; + static notEmpty(object: mixed, message?: string): void; + static isNotEmpty(object: mixed, message?: string): void; + + static equal(actual: mixed, expected: mixed, message?: string): void; + static notEqual(actual: mixed, expected: mixed, message?: string): void; + + static strictEqual(act: mixed, exp: mixed, msg?: string): void; + static notStrictEqual(act: mixed, exp: mixed, msg?: string): void; + + static deepEqual(act: mixed, exp: mixed, msg?: string): void; + static notDeepEqual(act: mixed, exp: mixed, msg?: string): void; + + static ok(val: mixed, msg?: string): void; + static isTrue(val: mixed, msg?: string): void; + static isNotTrue(val: mixed, msg?: string): void; + static isFalse(val: mixed, msg?: string): void; + static isNotFalse(val: mixed, msg?: string): void; + + static isNull(val: mixed, msg?: string): void; + static isNotNull(val: mixed, msg?: string): void; + + static isUndefined(val: mixed, msg?: string): void; + static isDefined(val: mixed, msg?: string): void; + + static isNaN(val: mixed, msg?: string): void; + static isNotNaN(val: mixed, msg?: string): void; + + static isAbove(val: number, abv: number, msg?: string): void; + static isBelow(val: number, blw: number, msg?: string): void; + + static exists(val: mixed, msg?: string): void; + static notExists(val: mixed, msg?: string): void; + + static isAtMost(val: number, atmst: number, msg?: string): void; + static isAtLeast(val: number, atlst: number, msg?: string): void; + + static isFunction(val: mixed, msg?: string): void; + static isNotFunction(val: mixed, msg?: string): void; + + static isObject(val: mixed, msg?: string): void; + static isNotObject(val: mixed, msg?: string): void; + + static isArray(val: mixed, msg?: string): void; + static isNotArray(val: mixed, msg?: string): void; + + static isString(val: mixed, msg?: string): void; + static isNotString(val: mixed, msg?: string): void; + + static isNumber(val: mixed, msg?: string): void; + static isNotNumber(val: mixed, msg?: string): void; + + static isBoolean(val: mixed, msg?: string): void; + static isNotBoolean(val: mixed, msg?: string): void; + + static typeOf(val: mixed, type: string, msg?: string): void; + static notTypeOf(val: mixed, type: string, msg?: string): void; + + static instanceOf(val: mixed, constructor: Class<*>, msg?: string): void; + static notInstanceOf(val: mixed, constructor: Class<*>, msg?: string): void; + + static include(exp: string, inc: mixed, msg?: string): void; + static include(exp: Array, inc: T, msg?: string): void; + + static notInclude(exp: string, inc: mixed, msg?: string): void; + static notInclude(exp: Array, inc: T, msg?: string): void; + + static deepInclude( + haystack: T[] | string, + needle: $Shape, + msg?: string, + ): void; + static notDeepInclude( + haystack: T[] | string, + needle: $Shape, + msg?: string, + ): void; + + static match(exp: mixed, re: RegExp, msg?: string): void; + static notMatch(exp: mixed, re: RegExp, msg?: string): void; + + static property(obj: Object, prop: string, msg?: string): void; + static notProperty(obj: Object, prop: string, msg?: string): void; + static deepProperty(obj: Object, prop: string, msg?: string): void; + static notDeepProperty(obj: Object, prop: string, msg?: string): void; + + static propertyVal( + obj: Object, + prop: string, + val: mixed, + msg?: string, + ): void; + static propertyNotVal( + obj: Object, + prop: string, + val: mixed, + msg?: string, + ): void; + + static deepPropertyVal( + obj: Object, + prop: string, + val: mixed, + msg?: string, + ): void; + static deepPropertyNotVal( + obj: Object, + prop: string, + val: mixed, + msg?: string, + ): void; + + static lengthOf(exp: mixed, len: number, msg?: string): void; + + static throws( + func: () => any, + err?: Class | Error | RegExp | string, + errorMsgMatcher?: string | RegExp, + msg?: string, + ): void; + static doesNotThrow( + func: () => any, + err?: Class | Error | RegExp | string, + errorMsgMatcher?: string | RegExp, + msg?: string, + ): void; + + static closeTo( + actual: number, + expected: number, + delta: number, + msg?: string, + ): void; + static approximately( + actual: number, + expected: number, + delta: number, + msg?: string, + ): void; + + // chai-immutable + static sizeOf(val: mixed, length: number): void; + } + + declare var config: { + includeStack: boolean, + showDiff: boolean, + truncateThreshold: number, + ... + }; +} diff --git a/flow-typed/npm/mocha_vx.x.x.js b/flow-typed/npm/mocha_vx.x.x.js new file mode 100644 index 0000000000..b7c7c13128 --- /dev/null +++ b/flow-typed/npm/mocha_vx.x.x.js @@ -0,0 +1,305 @@ +declare interface $npm$mocha$SetupOptions { + slow?: number; + timeout?: number; + ui?: string; + globals?: Array; + reporter?: any; + bail?: boolean; + ignoreLeaks?: boolean; + grep?: any; +} + +declare type $npm$mocha$done = (error?: any) => any; + +// declare interface $npm$mocha$SuiteCallbackContext { +// timeout(ms: number): void; +// retries(n: number): void; +// slow(ms: number): void; +// } + +// declare interface $npm$mocha$TestCallbackContext { +// skip(): void; +// timeout(ms: number): void; +// retries(n: number): void; +// slow(ms: number): void; +// [index: string]: any; +// } + +declare interface $npm$mocha$Suite { + parent: $npm$mocha$Suite; + title: string; + fullTitle(): string; +} + +declare interface $npm$mocha$ContextDefinition { + ( + description: string, + callback: () => /* this: $npm$mocha$SuiteCallbackContext */ void, + ): $npm$mocha$Suite; + only( + description: string, + callback: () => /* this: $npm$mocha$SuiteCallbackContext */ void, + ): $npm$mocha$Suite; + skip( + description: string, + callbac: () => /* this: $npm$mocha$SuiteCallbackContext */ void, + ): void; + timeout(ms: number): void; +} + +declare interface $npm$mocha$TestDefinition { + ( + expectation: string, + callback?: ( + /* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done, + ) => mixed, + ): $npm$mocha$Test; + only( + expectation: string, + callback?: ( + /* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done, + ) => mixed, + ): $npm$mocha$Test; + skip( + expectation: string, + callback?: ( + /* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done, + ) => mixed, + ): void; + timeout(ms: number): void; + state: 'failed' | 'passed'; +} + +declare interface $npm$mocha$Runner {} + +declare class $npm$mocha$BaseReporter { + stats: { + suites: number, + tests: number, + passes: number, + pending: number, + failures: number, + ... + }; + + constructor(runner: $npm$mocha$Runner): $npm$mocha$BaseReporter; +} + +declare class $npm$mocha$DocReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$DotReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$HTMLReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$HTMLCovReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$JSONReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$JSONCovReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$JSONStreamReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$LandingReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$ListReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$MarkdownReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$MinReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$NyanReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$ProgressReporter extends $npm$mocha$BaseReporter { + constructor( + runner: $npm$mocha$Runner, + options?: { + open?: string, + complete?: string, + incomplete?: string, + close?: string, + ... + }, + ): $npm$mocha$ProgressReporter; +} +declare class $npm$mocha$SpecReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$TAPReporter extends $npm$mocha$BaseReporter {} +declare class $npm$mocha$XUnitReporter extends $npm$mocha$BaseReporter { + constructor( + runner: $npm$mocha$Runner, + options?: any, + ): $npm$mocha$XUnitReporter; +} + +declare class $npm$mocha$Mocha { + currentTest: $npm$mocha$TestDefinition; + constructor(options?: { + grep?: RegExp, + ui?: string, + reporter?: string, + timeout?: number, + reporterOptions?: any, + slow?: number, + bail?: boolean, + ... + }): $npm$mocha$Mocha; + setup(options: $npm$mocha$SetupOptions): this; + bail(value?: boolean): this; + addFile(file: string): this; + reporter(name: string): this; + reporter(reporter: (runner: $npm$mocha$Runner, options: any) => any): this; + ui(value: string): this; + grep(value: string): this; + grep(value: RegExp): this; + invert(): this; + ignoreLeaks(value: boolean): this; + checkLeaks(): this; + throwError(error: Error): void; + growl(): this; + globals(value: string): this; + globals(values: Array): this; + useColors(value: boolean): this; + useInlineDiffs(value: boolean): this; + timeout(value: number): this; + slow(value: number): this; + enableTimeouts(value: boolean): this; + asyncOnly(value: boolean): this; + noHighlighting(value: boolean): this; + run(onComplete?: (failures: number) => void): $npm$mocha$Runner; + + static reporters: { + Doc: $npm$mocha$DocReporter, + Dot: $npm$mocha$DotReporter, + HTML: $npm$mocha$HTMLReporter, + HTMLCov: $npm$mocha$HTMLCovReporter, + JSON: $npm$mocha$JSONReporter, + JSONCov: $npm$mocha$JSONCovReporter, + JSONStream: $npm$mocha$JSONStreamReporter, + Landing: $npm$mocha$LandingReporter, + List: $npm$mocha$ListReporter, + Markdown: $npm$mocha$MarkdownReporter, + Min: $npm$mocha$MinReporter, + Nyan: $npm$mocha$NyanReporter, + Progress: $npm$mocha$ProgressReporter, + ... + }; +} + +// declare interface $npm$mocha$HookCallbackContext { +// skip(): void; +// timeout(ms: number): void; +// [index: string]: any; +// } + +declare interface $npm$mocha$Runnable { + title: string; + fn: Function; + async: boolean; + sync: boolean; + timedOut: boolean; +} + +declare interface $npm$mocha$Test extends $npm$mocha$Runnable { + parent: $npm$mocha$Suite; + pending: boolean; + state: 'failed' | 'passed' | void; + fullTitle(): string; + timeout(ms: number): void; +} + +// declare interface $npm$mocha$BeforeAndAfterContext extends $npm$mocha$HookCallbackContext { +// currentTest: $npm$mocha$Test; +// } + +declare var mocha: $npm$mocha$Mocha; +declare var describe: $npm$mocha$ContextDefinition; +declare var xdescribe: $npm$mocha$ContextDefinition; +declare var context: $npm$mocha$ContextDefinition; +declare var suite: $npm$mocha$ContextDefinition; +declare var it: $npm$mocha$TestDefinition; +declare var xit: $npm$mocha$TestDefinition; +declare var test: $npm$mocha$TestDefinition; +declare var specify: $npm$mocha$TestDefinition; + +declare function run(): void; + +declare function setup( + callback: ( + /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function teardown( + callback: ( + /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function suiteSetup( + callback: ( + /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function suiteTeardown( + callback: ( + /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function before( + callback: ( + /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function before( + description: string, + callback: ( + /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function after( + callback: ( + /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function after( + description: string, + callback: ( + /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function beforeEach( + callback: ( + /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function beforeEach( + description: string, + callback: ( + /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function afterEach( + callback: ( + /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, + ) => mixed, +): void; +declare function afterEach( + description: string, + callback: ( + /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, + ) => mixed, +): void; + +declare module 'mocha' { + declare export var mocha: typeof mocha; + declare export var describe: typeof describe; + declare export var xdescribe: typeof xdescribe; + declare export var context: typeof context; + declare export var suite: typeof suite; + declare export var it: typeof it; + declare export var xit: typeof xit; + declare export var test: typeof test; + declare export var specify: typeof specify; + + declare export var run: typeof run; + + declare export var setup: typeof setup; + declare export var teardown: typeof teardown; + declare export var suiteSetup: typeof suiteSetup; + declare export var suiteTeardown: typeof suiteTeardown; + declare export var before: typeof before; + declare export var before: typeof before; + declare export var after: typeof after; + declare export var after: typeof after; + declare export var beforeEach: typeof beforeEach; + declare export var beforeEach: typeof beforeEach; + declare export var afterEach: typeof afterEach; + declare export var afterEach: typeof afterEach; + + declare export default $npm$mocha$Mocha; +} diff --git a/integrationTests/integration-test.js b/integrationTests/integration-test.js index 141b1bc1fe..41e6d627d9 100644 --- a/integrationTests/integration-test.js +++ b/integrationTests/integration-test.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const os = require('os'); diff --git a/integrationTests/ts/test.js b/integrationTests/ts/test.js index a8bd1ef9ca..158aee4cf6 100644 --- a/integrationTests/ts/test.js +++ b/integrationTests/ts/test.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const path = require('path'); diff --git a/resources/add-extension-to-import-paths.js b/resources/add-extension-to-import-paths.js index 5c7dade96e..3ec22d9dcc 100644 --- a/resources/add-extension-to-import-paths.js +++ b/resources/add-extension-to-import-paths.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; /** diff --git a/resources/benchmark-fork.js b/resources/benchmark-fork.js index 9a0abfe931..8b823c14d2 100644 --- a/resources/benchmark-fork.js +++ b/resources/benchmark-fork.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const assert = require('assert'); diff --git a/resources/benchmark.js b/resources/benchmark.js index ae1e7f1970..d9b3156f94 100644 --- a/resources/benchmark.js +++ b/resources/benchmark.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const os = require('os'); diff --git a/resources/build-deno.js b/resources/build-deno.js index 519318648e..0c63c06996 100644 --- a/resources/build-deno.js +++ b/resources/build-deno.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const fs = require('fs'); diff --git a/resources/build-npm.js b/resources/build-npm.js index a77bb7f7c4..074711b116 100644 --- a/resources/build-npm.js +++ b/resources/build-npm.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const fs = require('fs'); diff --git a/resources/check-cover.js b/resources/check-cover.js index 612b657e0d..3935ef9b21 100644 --- a/resources/check-cover.js +++ b/resources/check-cover.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const fs = require('fs'); diff --git a/resources/check-cycles.js b/resources/check-cycles.js index 321a572cf4..e5f0385d5f 100644 --- a/resources/check-cycles.js +++ b/resources/check-cycles.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const os = require('os'); diff --git a/resources/colors.js b/resources/colors.js index a9ce45a698..461fc6d013 100644 --- a/resources/colors.js +++ b/resources/colors.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; function red(str) { diff --git a/resources/eslint-internal-rules/index.js b/resources/eslint-internal-rules/index.js index b8370f5772..dcb9e34965 100644 --- a/resources/eslint-internal-rules/index.js +++ b/resources/eslint-internal-rules/index.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; module.exports = { diff --git a/resources/eslint-internal-rules/no-dir-import.js b/resources/eslint-internal-rules/no-dir-import.js index 44ed0e98b0..156a4e9741 100644 --- a/resources/eslint-internal-rules/no-dir-import.js +++ b/resources/eslint-internal-rules/no-dir-import.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const fs = require('fs'); diff --git a/resources/gen-changelog.js b/resources/gen-changelog.js index 6879fa5919..7449c1790c 100644 --- a/resources/gen-changelog.js +++ b/resources/gen-changelog.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const util = require('util'); diff --git a/resources/gen-version.js b/resources/gen-version.js index 3740f8239d..0141ff3597 100644 --- a/resources/gen-version.js +++ b/resources/gen-version.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const fs = require('fs'); @@ -13,9 +11,7 @@ if (!versionMatch) { const [, major, minor, patch, preReleaseTag] = versionMatch; -const body = `// @flow strict - -/** +const body = `/** * Note: This file is autogenerated using "resources/gen-version.js" script and * automatically updated by "npm version" command. */ diff --git a/resources/inline-invariant.js b/resources/inline-invariant.js index 9daed59862..c17367c8e0 100644 --- a/resources/inline-invariant.js +++ b/resources/inline-invariant.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; /** diff --git a/resources/utils.js b/resources/utils.js index 0014133ba1..d3593816f4 100644 --- a/resources/utils.js +++ b/resources/utils.js @@ -1,5 +1,3 @@ -// @noflow - 'use strict'; const fs = require('fs'); diff --git a/src/__fixtures__/index.js b/src/__fixtures__/index.js index 460bee30f0..047fe28128 100644 --- a/src/__fixtures__/index.js +++ b/src/__fixtures__/index.js @@ -1,5 +1,3 @@ -// @flow strict - import { join } from 'path'; import { readFileSync } from 'fs'; diff --git a/src/__testUtils__/__tests__/dedent-test.js b/src/__testUtils__/__tests__/dedent-test.js index 192af3c8de..9ee2440bce 100644 --- a/src/__testUtils__/__tests__/dedent-test.js +++ b/src/__testUtils__/__tests__/dedent-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/__testUtils__/__tests__/genFuzzStrings-test.js b/src/__testUtils__/__tests__/genFuzzStrings-test.js index c9d79cf47a..75da1b63cc 100644 --- a/src/__testUtils__/__tests__/genFuzzStrings-test.js +++ b/src/__testUtils__/__tests__/genFuzzStrings-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/__testUtils__/__tests__/inspectStr-test.js b/src/__testUtils__/__tests__/inspectStr-test.js index ba7e9f3688..b31e59b159 100644 --- a/src/__testUtils__/__tests__/inspectStr-test.js +++ b/src/__testUtils__/__tests__/inspectStr-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/__testUtils__/dedent.js b/src/__testUtils__/dedent.js index 80aef9be46..c4b8e8da7b 100644 --- a/src/__testUtils__/dedent.js +++ b/src/__testUtils__/dedent.js @@ -1,5 +1,3 @@ -// @flow strict - /** * An ES6 string tag that fixes indentation. Also removes leading newlines * and trailing spaces and tabs, but keeps trailing newlines. diff --git a/src/__testUtils__/genFuzzStrings.js b/src/__testUtils__/genFuzzStrings.js index b8258a75fe..4ead99080c 100644 --- a/src/__testUtils__/genFuzzStrings.js +++ b/src/__testUtils__/genFuzzStrings.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Generator that produces all possible combinations of allowed characters. */ diff --git a/src/__testUtils__/inspectStr.js b/src/__testUtils__/inspectStr.js index 1c2061888f..a99a28150a 100644 --- a/src/__testUtils__/inspectStr.js +++ b/src/__testUtils__/inspectStr.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Special inspect function to produce readable string literal for error messages in tests */ diff --git a/src/__tests__/starWarsData.js b/src/__tests__/starWarsData.js index 977d25c3bd..319960dd1d 100644 --- a/src/__tests__/starWarsData.js +++ b/src/__tests__/starWarsData.js @@ -1,5 +1,3 @@ -// @flow strict - /** * These are types which correspond to the schema. * They represent the shape of the data visited during field resolution. diff --git a/src/__tests__/starWarsIntrospection-test.js b/src/__tests__/starWarsIntrospection-test.js index 4d23b0f459..d637787c4a 100644 --- a/src/__tests__/starWarsIntrospection-test.js +++ b/src/__tests__/starWarsIntrospection-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/__tests__/starWarsQuery-test.js b/src/__tests__/starWarsQuery-test.js index fd14017293..8b8ef8a56e 100644 --- a/src/__tests__/starWarsQuery-test.js +++ b/src/__tests__/starWarsQuery-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/__tests__/starWarsSchema.js b/src/__tests__/starWarsSchema.js index 6d3c778ba7..cb5d5570f4 100644 --- a/src/__tests__/starWarsSchema.js +++ b/src/__tests__/starWarsSchema.js @@ -1,5 +1,3 @@ -// @flow strict - import invariant from '../jsutils/invariant'; import { GraphQLSchema } from '../type/schema'; diff --git a/src/__tests__/starWarsValidation-test.js b/src/__tests__/starWarsValidation-test.js index 33019338e6..65e6c7f666 100644 --- a/src/__tests__/starWarsValidation-test.js +++ b/src/__tests__/starWarsValidation-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/__tests__/version-test.js b/src/__tests__/version-test.js index 928c5d8094..7d9a0acf0c 100644 --- a/src/__tests__/version-test.js +++ b/src/__tests__/version-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/error/GraphQLError.js b/src/error/GraphQLError.js index 62052d1c94..67533533fd 100644 --- a/src/error/GraphQLError.js +++ b/src/error/GraphQLError.js @@ -1,5 +1,3 @@ -// @flow strict - // FIXME: // flowlint uninitialized-instance-property:off diff --git a/src/error/__tests__/GraphQLError-test.js b/src/error/__tests__/GraphQLError-test.js index a4130b96c6..b72d31b174 100644 --- a/src/error/__tests__/GraphQLError-test.js +++ b/src/error/__tests__/GraphQLError-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/error/__tests__/formatError-test.js b/src/error/__tests__/formatError-test.js index 8659ae2bfa..a509826a6b 100644 --- a/src/error/__tests__/formatError-test.js +++ b/src/error/__tests__/formatError-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/error/__tests__/locatedError-test.js b/src/error/__tests__/locatedError-test.js index d30cb6ed72..3de473b4c9 100644 --- a/src/error/__tests__/locatedError-test.js +++ b/src/error/__tests__/locatedError-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/error/formatError.js b/src/error/formatError.js index c80c0b0b73..d73cc897b0 100644 --- a/src/error/formatError.js +++ b/src/error/formatError.js @@ -1,5 +1,3 @@ -// @flow strict - import devAssert from '../jsutils/devAssert'; import type { SourceLocation } from '../language/location'; diff --git a/src/error/index.js b/src/error/index.js index c920bfc188..914a6dbe46 100644 --- a/src/error/index.js +++ b/src/error/index.js @@ -1,5 +1,3 @@ -// @flow strict - export { GraphQLError, printError } from './GraphQLError'; export { syntaxError } from './syntaxError'; diff --git a/src/error/locatedError.js b/src/error/locatedError.js index d98494b9f3..2cd591c2b7 100644 --- a/src/error/locatedError.js +++ b/src/error/locatedError.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ASTNode } from '../language/ast'; import { GraphQLError } from './GraphQLError'; diff --git a/src/error/syntaxError.js b/src/error/syntaxError.js index 3abb9dabcb..21a2dc18e4 100644 --- a/src/error/syntaxError.js +++ b/src/error/syntaxError.js @@ -1,5 +1,3 @@ -// @flow strict - import type { Source } from '../language/source'; import { GraphQLError } from './GraphQLError'; diff --git a/src/execution/__tests__/abstract-promise-test.js b/src/execution/__tests__/abstract-promise-test.js index 3831a6e076..57493714ae 100644 --- a/src/execution/__tests__/abstract-promise-test.js +++ b/src/execution/__tests__/abstract-promise-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/abstract-test.js b/src/execution/__tests__/abstract-test.js index 020d935719..27dec94f26 100644 --- a/src/execution/__tests__/abstract-test.js +++ b/src/execution/__tests__/abstract-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/directives-test.js b/src/execution/__tests__/directives-test.js index 52251a0fcc..67eedcb14c 100644 --- a/src/execution/__tests__/directives-test.js +++ b/src/execution/__tests__/directives-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/executor-test.js b/src/execution/__tests__/executor-test.js index 1260ec4e49..8cd55f015a 100644 --- a/src/execution/__tests__/executor-test.js +++ b/src/execution/__tests__/executor-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/lists-test.js b/src/execution/__tests__/lists-test.js index 168c9aac67..42222dd7cc 100644 --- a/src/execution/__tests__/lists-test.js +++ b/src/execution/__tests__/lists-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/mutations-test.js b/src/execution/__tests__/mutations-test.js index c134bb16ed..dfe62932fa 100644 --- a/src/execution/__tests__/mutations-test.js +++ b/src/execution/__tests__/mutations-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/nonnull-test.js b/src/execution/__tests__/nonnull-test.js index 19233016a8..056973789e 100644 --- a/src/execution/__tests__/nonnull-test.js +++ b/src/execution/__tests__/nonnull-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/resolve-test.js b/src/execution/__tests__/resolve-test.js index 22b37f7214..e55af4fc02 100644 --- a/src/execution/__tests__/resolve-test.js +++ b/src/execution/__tests__/resolve-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/schema-test.js b/src/execution/__tests__/schema-test.js index d625e33b53..4307433e51 100644 --- a/src/execution/__tests__/schema-test.js +++ b/src/execution/__tests__/schema-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/sync-test.js b/src/execution/__tests__/sync-test.js index 4610246c0a..184a259b69 100644 --- a/src/execution/__tests__/sync-test.js +++ b/src/execution/__tests__/sync-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/union-interface-test.js b/src/execution/__tests__/union-interface-test.js index 3ba4d222fb..b3cd6d0a0f 100644 --- a/src/execution/__tests__/union-interface-test.js +++ b/src/execution/__tests__/union-interface-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/__tests__/variables-test.js b/src/execution/__tests__/variables-test.js index 2e88257fb7..a8f533da27 100644 --- a/src/execution/__tests__/variables-test.js +++ b/src/execution/__tests__/variables-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/execution/execute.js b/src/execution/execute.js index 624a4fcdcb..dc5ccb3751 100644 --- a/src/execution/execute.js +++ b/src/execution/execute.js @@ -1,5 +1,3 @@ -// @flow strict - import arrayFrom from '../polyfills/arrayFrom'; import type { Path } from '../jsutils/Path'; diff --git a/src/execution/index.js b/src/execution/index.js index 14366ad194..5ae0706ec9 100644 --- a/src/execution/index.js +++ b/src/execution/index.js @@ -1,5 +1,3 @@ -// @flow strict - export { pathToArray as responsePathAsArray } from '../jsutils/Path'; export { diff --git a/src/execution/values.js b/src/execution/values.js index 329ef8896f..cfe9a4e0d7 100644 --- a/src/execution/values.js +++ b/src/execution/values.js @@ -1,5 +1,3 @@ -// @flow strict - import find from '../polyfills/find'; import type { ObjMap } from '../jsutils/ObjMap'; diff --git a/src/graphql.js b/src/graphql.js index 964bdf5345..da9428086d 100644 --- a/src/graphql.js +++ b/src/graphql.js @@ -1,5 +1,3 @@ -// @flow strict - import type { PromiseOrValue } from './jsutils/PromiseOrValue'; import isPromise from './jsutils/isPromise'; diff --git a/src/index.js b/src/index.js index 23bb3980a6..104ab88658 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,3 @@ -// @flow strict - /** * GraphQL.js provides a reference implementation for the GraphQL specification * but is also a useful utility for operating on GraphQL files and building diff --git a/src/jsutils/ObjMap.js b/src/jsutils/ObjMap.js index 63a8251084..9b6ef5e16e 100644 --- a/src/jsutils/ObjMap.js +++ b/src/jsutils/ObjMap.js @@ -1,5 +1,3 @@ -// @flow strict - export type ObjMap = { [key: string]: T, __proto__: null, ... }; export type ObjMapLike = ObjMap | { [key: string]: T, ... }; diff --git a/src/jsutils/Path.js b/src/jsutils/Path.js index 3ba629d5e6..47e8c7693c 100644 --- a/src/jsutils/Path.js +++ b/src/jsutils/Path.js @@ -1,5 +1,3 @@ -// @flow strict - export type Path = {| +prev: Path | void, +key: string | number, diff --git a/src/jsutils/PromiseOrValue.js b/src/jsutils/PromiseOrValue.js index 2d37412289..e493c87e06 100644 --- a/src/jsutils/PromiseOrValue.js +++ b/src/jsutils/PromiseOrValue.js @@ -1,3 +1 @@ -// @flow strict - export type PromiseOrValue<+T> = Promise | T; diff --git a/src/jsutils/__tests__/didYouMean-test.js b/src/jsutils/__tests__/didYouMean-test.js index ff79ad757a..70a4ac5237 100644 --- a/src/jsutils/__tests__/didYouMean-test.js +++ b/src/jsutils/__tests__/didYouMean-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/jsutils/__tests__/identityFunc-test.js b/src/jsutils/__tests__/identityFunc-test.js index 438f02b2c9..8c7eff39bc 100644 --- a/src/jsutils/__tests__/identityFunc-test.js +++ b/src/jsutils/__tests__/identityFunc-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/jsutils/__tests__/inspect-test.js b/src/jsutils/__tests__/inspect-test.js index 887c92fce1..a3fedb9d15 100644 --- a/src/jsutils/__tests__/inspect-test.js +++ b/src/jsutils/__tests__/inspect-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/jsutils/__tests__/instanceOf-test.js b/src/jsutils/__tests__/instanceOf-test.js index b91f03f9ce..17a8d4e46d 100644 --- a/src/jsutils/__tests__/instanceOf-test.js +++ b/src/jsutils/__tests__/instanceOf-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/jsutils/__tests__/invariant-test.js b/src/jsutils/__tests__/invariant-test.js index 762143076a..97c293596e 100644 --- a/src/jsutils/__tests__/invariant-test.js +++ b/src/jsutils/__tests__/invariant-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/jsutils/__tests__/isCollection-test.js b/src/jsutils/__tests__/isCollection-test.js index d42f38af11..3fe97ec618 100644 --- a/src/jsutils/__tests__/isCollection-test.js +++ b/src/jsutils/__tests__/isCollection-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/jsutils/__tests__/isObjectLike-test.js b/src/jsutils/__tests__/isObjectLike-test.js index 5827023f14..724d3ab10c 100644 --- a/src/jsutils/__tests__/isObjectLike-test.js +++ b/src/jsutils/__tests__/isObjectLike-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/jsutils/__tests__/suggestionList-test.js b/src/jsutils/__tests__/suggestionList-test.js index e9316f6393..12620fe856 100644 --- a/src/jsutils/__tests__/suggestionList-test.js +++ b/src/jsutils/__tests__/suggestionList-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/jsutils/__tests__/toObjMap-test.js b/src/jsutils/__tests__/toObjMap-test.js index 31fbd8f28f..3f5ab924f5 100644 --- a/src/jsutils/__tests__/toObjMap-test.js +++ b/src/jsutils/__tests__/toObjMap-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/jsutils/defineInspect.js b/src/jsutils/defineInspect.js index 485494737e..b0773a9a79 100644 --- a/src/jsutils/defineInspect.js +++ b/src/jsutils/defineInspect.js @@ -1,5 +1,3 @@ -// @flow strict - import invariant from './invariant'; import nodejsCustomInspectSymbol from './nodejsCustomInspectSymbol'; diff --git a/src/jsutils/devAssert.js b/src/jsutils/devAssert.js index 3aa0e663f6..da2adfcd00 100644 --- a/src/jsutils/devAssert.js +++ b/src/jsutils/devAssert.js @@ -1,5 +1,3 @@ -// @flow strict - export default function devAssert(condition: mixed, message: string): void { const booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') diff --git a/src/jsutils/didYouMean.js b/src/jsutils/didYouMean.js index 3e6bc94503..45e1a93c83 100644 --- a/src/jsutils/didYouMean.js +++ b/src/jsutils/didYouMean.js @@ -1,5 +1,3 @@ -// @flow strict - const MAX_SUGGESTIONS = 5; /** diff --git a/src/jsutils/identityFunc.js b/src/jsutils/identityFunc.js index 5cf7c4c33b..94cb7e1534 100644 --- a/src/jsutils/identityFunc.js +++ b/src/jsutils/identityFunc.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Returns the first argument it receives. */ diff --git a/src/jsutils/inspect.js b/src/jsutils/inspect.js index 9ae109a9f4..6c3d1af2e0 100644 --- a/src/jsutils/inspect.js +++ b/src/jsutils/inspect.js @@ -1,5 +1,3 @@ -// @flow strict - import nodejsCustomInspectSymbol from './nodejsCustomInspectSymbol'; const MAX_ARRAY_LENGTH = 10; diff --git a/src/jsutils/instanceOf.js b/src/jsutils/instanceOf.js index d45b58f0f0..2b3e8fc12a 100644 --- a/src/jsutils/instanceOf.js +++ b/src/jsutils/instanceOf.js @@ -1,5 +1,3 @@ -// @flow strict - /** * A replacement for instanceof which includes an error warning when multi-realm * constructors are detected. diff --git a/src/jsutils/invariant.js b/src/jsutils/invariant.js index 3edaca00ee..668f6ea426 100644 --- a/src/jsutils/invariant.js +++ b/src/jsutils/invariant.js @@ -1,5 +1,3 @@ -// @flow strict - export default function invariant(condition: mixed, message?: string): void { const booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') diff --git a/src/jsutils/isCollection.js b/src/jsutils/isCollection.js index e5ff8e9ef0..731470256d 100644 --- a/src/jsutils/isCollection.js +++ b/src/jsutils/isCollection.js @@ -1,5 +1,3 @@ -// @flow strict - import { SYMBOL_ITERATOR } from '../polyfills/symbols'; /** diff --git a/src/jsutils/isObjectLike.js b/src/jsutils/isObjectLike.js index 45d29f6037..a5f9754dd7 100644 --- a/src/jsutils/isObjectLike.js +++ b/src/jsutils/isObjectLike.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Return true if `value` is object-like. A value is object-like if it's not * `null` and has a `typeof` result of "object". diff --git a/src/jsutils/isPromise.js b/src/jsutils/isPromise.js index d6ef8177a0..4bbb5768e1 100644 --- a/src/jsutils/isPromise.js +++ b/src/jsutils/isPromise.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Returns true if the value acts like a Promise, i.e. has a "then" function, * otherwise returns false. diff --git a/src/jsutils/keyMap.js b/src/jsutils/keyMap.js index fedc6b4235..eb847d02c9 100644 --- a/src/jsutils/keyMap.js +++ b/src/jsutils/keyMap.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ObjMap } from './ObjMap'; /** diff --git a/src/jsutils/keyValMap.js b/src/jsutils/keyValMap.js index 7a76403204..a91e90b447 100644 --- a/src/jsutils/keyValMap.js +++ b/src/jsutils/keyValMap.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ObjMap } from './ObjMap'; /** diff --git a/src/jsutils/mapValue.js b/src/jsutils/mapValue.js index 068b2ed664..a2b91be2dd 100644 --- a/src/jsutils/mapValue.js +++ b/src/jsutils/mapValue.js @@ -1,5 +1,3 @@ -// @flow strict - import objectEntries from '../polyfills/objectEntries'; import type { ObjMap } from './ObjMap'; diff --git a/src/jsutils/memoize3.js b/src/jsutils/memoize3.js index 2d5707c5e9..ac73b7fad7 100644 --- a/src/jsutils/memoize3.js +++ b/src/jsutils/memoize3.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Memoizes the provided three-argument function. */ diff --git a/src/jsutils/nodejsCustomInspectSymbol.js b/src/jsutils/nodejsCustomInspectSymbol.js index 95b41c9fed..9a646e60cf 100644 --- a/src/jsutils/nodejsCustomInspectSymbol.js +++ b/src/jsutils/nodejsCustomInspectSymbol.js @@ -1,5 +1,3 @@ -// @flow strict - // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') const nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' diff --git a/src/jsutils/printPathArray.js b/src/jsutils/printPathArray.js index 10f6d119f2..34ab13daa0 100644 --- a/src/jsutils/printPathArray.js +++ b/src/jsutils/printPathArray.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Build a string describing the path. */ diff --git a/src/jsutils/promiseForObject.js b/src/jsutils/promiseForObject.js index 85c10f0f4f..bf07e4a3f0 100644 --- a/src/jsutils/promiseForObject.js +++ b/src/jsutils/promiseForObject.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ObjMap } from './ObjMap'; /** diff --git a/src/jsutils/promiseReduce.js b/src/jsutils/promiseReduce.js index cea9cb72a1..43d905283e 100644 --- a/src/jsutils/promiseReduce.js +++ b/src/jsutils/promiseReduce.js @@ -1,5 +1,3 @@ -// @flow strict - import type { PromiseOrValue } from './PromiseOrValue'; import isPromise from './isPromise'; diff --git a/src/jsutils/suggestionList.js b/src/jsutils/suggestionList.js index 04e61c2408..5eac2f3e60 100644 --- a/src/jsutils/suggestionList.js +++ b/src/jsutils/suggestionList.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Given an invalid input string and a list of valid options, returns a filtered * list of valid options sorted based on their similarity with the input. diff --git a/src/jsutils/toObjMap.js b/src/jsutils/toObjMap.js index d97397fd90..c0dc9e2fdb 100644 --- a/src/jsutils/toObjMap.js +++ b/src/jsutils/toObjMap.js @@ -1,5 +1,3 @@ -// @flow strict - import objectEntries from '../polyfills/objectEntries'; import type { diff --git a/src/language/__tests__/blockString-fuzz.js b/src/language/__tests__/blockString-fuzz.js index 7f11302e6d..7a7729de8a 100644 --- a/src/language/__tests__/blockString-fuzz.js +++ b/src/language/__tests__/blockString-fuzz.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import dedent from '../../__testUtils__/dedent'; diff --git a/src/language/__tests__/blockString-test.js b/src/language/__tests__/blockString-test.js index efd7abbd45..0976af5616 100644 --- a/src/language/__tests__/blockString-test.js +++ b/src/language/__tests__/blockString-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/language/__tests__/lexer-test.js b/src/language/__tests__/lexer-test.js index 14fa0bba4b..36f9ab3430 100644 --- a/src/language/__tests__/lexer-test.js +++ b/src/language/__tests__/lexer-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { inspect as nodeInspect } from 'util'; import { expect } from 'chai'; diff --git a/src/language/__tests__/parser-benchmark.js b/src/language/__tests__/parser-benchmark.js index f443f7237b..15fe9d8a71 100644 --- a/src/language/__tests__/parser-benchmark.js +++ b/src/language/__tests__/parser-benchmark.js @@ -1,5 +1,3 @@ -// @flow strict - import { parse } from '../parser'; import { kitchenSinkQuery } from '../../__fixtures__/index'; diff --git a/src/language/__tests__/parser-test.js b/src/language/__tests__/parser-test.js index 0f322a9661..2213fd6c27 100644 --- a/src/language/__tests__/parser-test.js +++ b/src/language/__tests__/parser-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { inspect as nodeInspect } from 'util'; import { expect } from 'chai'; diff --git a/src/language/__tests__/predicates-test.js b/src/language/__tests__/predicates-test.js index 884c5d1172..eb620abd61 100644 --- a/src/language/__tests__/predicates-test.js +++ b/src/language/__tests__/predicates-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/language/__tests__/printLocation-test.js b/src/language/__tests__/printLocation-test.js index 146c9e4541..2fbcdcca4e 100644 --- a/src/language/__tests__/printLocation-test.js +++ b/src/language/__tests__/printLocation-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/language/__tests__/printer-test.js b/src/language/__tests__/printer-test.js index a337df9c25..aa074819e3 100644 --- a/src/language/__tests__/printer-test.js +++ b/src/language/__tests__/printer-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/language/__tests__/schema-parser-test.js b/src/language/__tests__/schema-parser-test.js index ec29875d39..0da1e58f2a 100644 --- a/src/language/__tests__/schema-parser-test.js +++ b/src/language/__tests__/schema-parser-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/language/__tests__/schema-printer-test.js b/src/language/__tests__/schema-printer-test.js index a60ac83970..18fba5517d 100644 --- a/src/language/__tests__/schema-printer-test.js +++ b/src/language/__tests__/schema-printer-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/language/__tests__/source-test.js b/src/language/__tests__/source-test.js index 64b1a89d03..f83bdc2944 100644 --- a/src/language/__tests__/source-test.js +++ b/src/language/__tests__/source-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/language/__tests__/toJSONDeep.js b/src/language/__tests__/toJSONDeep.js index 5405b99ce1..2361a1ba26 100644 --- a/src/language/__tests__/toJSONDeep.js +++ b/src/language/__tests__/toJSONDeep.js @@ -1,5 +1,3 @@ -// @flow strict - import isObjectLike from '../../jsutils/isObjectLike'; /** diff --git a/src/language/__tests__/visitor-test.js b/src/language/__tests__/visitor-test.js index b847c8b5d2..c56dad233e 100644 --- a/src/language/__tests__/visitor-test.js +++ b/src/language/__tests__/visitor-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/language/ast.js b/src/language/ast.js index 4a4af902dd..0b69454977 100644 --- a/src/language/ast.js +++ b/src/language/ast.js @@ -1,5 +1,3 @@ -// @flow strict - import defineInspect from '../jsutils/defineInspect'; import type { Source } from './source'; diff --git a/src/language/blockString.js b/src/language/blockString.js index d8ec8fb49d..5b2aa5d1c1 100644 --- a/src/language/blockString.js +++ b/src/language/blockString.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Produces the value of a block string from its parsed raw value, similar to * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. diff --git a/src/language/directiveLocation.js b/src/language/directiveLocation.js index 6529898869..9fa1348cf8 100644 --- a/src/language/directiveLocation.js +++ b/src/language/directiveLocation.js @@ -1,5 +1,3 @@ -// @flow strict - /** * The set of allowed directive location values. */ diff --git a/src/language/index.js b/src/language/index.js index 60fd975077..6055ff4fe3 100644 --- a/src/language/index.js +++ b/src/language/index.js @@ -1,5 +1,3 @@ -// @flow strict - export { Source } from './source'; export { getLocation } from './location'; diff --git a/src/language/kinds.js b/src/language/kinds.js index d3292b203b..99e3e4a9ea 100644 --- a/src/language/kinds.js +++ b/src/language/kinds.js @@ -1,5 +1,3 @@ -// @flow strict - /** * The set of allowed kind values for AST nodes. */ diff --git a/src/language/lexer.js b/src/language/lexer.js index ac20afe90b..9a7626a351 100644 --- a/src/language/lexer.js +++ b/src/language/lexer.js @@ -1,5 +1,3 @@ -// @flow strict - import { syntaxError } from '../error/syntaxError'; import type { Source } from './source'; diff --git a/src/language/location.js b/src/language/location.js index 5f8825d8f2..8da175d4f2 100644 --- a/src/language/location.js +++ b/src/language/location.js @@ -1,5 +1,3 @@ -// @flow strict - import type { Source } from './source'; /** diff --git a/src/language/parser.js b/src/language/parser.js index c5cf892e11..fd4d3bb570 100644 --- a/src/language/parser.js +++ b/src/language/parser.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../jsutils/inspect'; import devAssert from '../jsutils/devAssert'; diff --git a/src/language/predicates.js b/src/language/predicates.js index 635225e5d8..b9108f87ad 100644 --- a/src/language/predicates.js +++ b/src/language/predicates.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ASTNode } from './ast'; import { Kind } from './kinds'; diff --git a/src/language/printLocation.js b/src/language/printLocation.js index 8b2d8fbdaf..fbf3504634 100644 --- a/src/language/printLocation.js +++ b/src/language/printLocation.js @@ -1,5 +1,3 @@ -// @flow strict - import type { Source } from './source'; import type { Location } from './ast'; import type { SourceLocation } from './location'; diff --git a/src/language/printer.js b/src/language/printer.js index 3edfe30cf9..19563a22f6 100644 --- a/src/language/printer.js +++ b/src/language/printer.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ASTNode } from './ast'; import { visit } from './visitor'; diff --git a/src/language/source.js b/src/language/source.js index fe7e943ec4..565f78ef47 100644 --- a/src/language/source.js +++ b/src/language/source.js @@ -1,5 +1,3 @@ -// @flow strict - import { SYMBOL_TO_STRING_TAG } from '../polyfills/symbols'; import devAssert from '../jsutils/devAssert'; diff --git a/src/language/tokenKind.js b/src/language/tokenKind.js index 0dd0afc8c9..b4f5248c13 100644 --- a/src/language/tokenKind.js +++ b/src/language/tokenKind.js @@ -1,5 +1,3 @@ -// @flow strict - /** * An exported enum describing the different kinds of tokens that the * lexer emits. diff --git a/src/language/visitor.js b/src/language/visitor.js index 2be0a3d09b..5e367ce4a9 100644 --- a/src/language/visitor.js +++ b/src/language/visitor.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../jsutils/inspect'; import type { ASTNode, ASTKindToNode } from './ast'; diff --git a/src/polyfills/arrayFrom.js b/src/polyfills/arrayFrom.js index 4e7f220fd9..c97b20ed54 100644 --- a/src/polyfills/arrayFrom.js +++ b/src/polyfills/arrayFrom.js @@ -1,5 +1,3 @@ -// @flow strict - import { SYMBOL_ITERATOR } from './symbols'; declare function arrayFrom(arrayLike: Iterable): Array; diff --git a/src/polyfills/find.js b/src/polyfills/find.js index 224a99da4a..c3a3b8b4dd 100644 --- a/src/polyfills/find.js +++ b/src/polyfills/find.js @@ -1,5 +1,3 @@ -// @flow strict - declare function find( list: $ReadOnlyArray, predicate: (item: T) => boolean, diff --git a/src/polyfills/flatMap.js b/src/polyfills/flatMap.js index 38f739e97c..e77a6e152a 100644 --- a/src/polyfills/flatMap.js +++ b/src/polyfills/flatMap.js @@ -1,5 +1,3 @@ -// @flow strict - declare function flatMap( list: $ReadOnlyArray, fn: (item: T, index: number) => $ReadOnlyArray | U, diff --git a/src/polyfills/isFinite.js b/src/polyfills/isFinite.js index 8b26d8d2d9..dcaeba501a 100644 --- a/src/polyfills/isFinite.js +++ b/src/polyfills/isFinite.js @@ -1,5 +1,3 @@ -// @flow strict - declare function isFinitePolyfill( value: mixed, ): boolean %checks(typeof value === 'number'); diff --git a/src/polyfills/isInteger.js b/src/polyfills/isInteger.js index ba79ee4430..5ff717a88d 100644 --- a/src/polyfills/isInteger.js +++ b/src/polyfills/isInteger.js @@ -1,5 +1,3 @@ -// @flow strict - declare function isInteger(value: mixed): boolean %checks(typeof value === 'number'); diff --git a/src/polyfills/objectEntries.js b/src/polyfills/objectEntries.js index 9dee7af964..20148f6947 100644 --- a/src/polyfills/objectEntries.js +++ b/src/polyfills/objectEntries.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ObjMap } from '../jsutils/ObjMap'; declare function objectEntries(obj: ObjMap): Array<[string, T]>; diff --git a/src/polyfills/objectValues.js b/src/polyfills/objectValues.js index 13cca4ff8d..dfa0088d4c 100644 --- a/src/polyfills/objectValues.js +++ b/src/polyfills/objectValues.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ObjMap } from '../jsutils/ObjMap'; declare function objectValues(obj: ObjMap): Array; diff --git a/src/polyfills/symbols.js b/src/polyfills/symbols.js index 98de837705..b476b2adbb 100644 --- a/src/polyfills/symbols.js +++ b/src/polyfills/symbols.js @@ -1,5 +1,3 @@ -// @flow strict - // In ES2015 (or a polyfilled) environment, this will be Symbol.iterator // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') export const SYMBOL_ITERATOR: string = diff --git a/src/subscription/__tests__/eventEmitterAsyncIterator-test.js b/src/subscription/__tests__/eventEmitterAsyncIterator-test.js index 4e5ee51f36..61e2770089 100644 --- a/src/subscription/__tests__/eventEmitterAsyncIterator-test.js +++ b/src/subscription/__tests__/eventEmitterAsyncIterator-test.js @@ -1,5 +1,3 @@ -// @flow strict - import EventEmitter from 'events'; import { expect } from 'chai'; diff --git a/src/subscription/__tests__/eventEmitterAsyncIterator.js b/src/subscription/__tests__/eventEmitterAsyncIterator.js index c1c5abbfa7..77fc81c548 100644 --- a/src/subscription/__tests__/eventEmitterAsyncIterator.js +++ b/src/subscription/__tests__/eventEmitterAsyncIterator.js @@ -1,5 +1,3 @@ -// @flow strict - import type EventEmitter from 'events'; /** diff --git a/src/subscription/__tests__/mapAsyncIterator-test.js b/src/subscription/__tests__/mapAsyncIterator-test.js index c9c177442c..7ae9a14920 100644 --- a/src/subscription/__tests__/mapAsyncIterator-test.js +++ b/src/subscription/__tests__/mapAsyncIterator-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/subscription/__tests__/subscribe-test.js b/src/subscription/__tests__/subscribe-test.js index b56a606ff7..de0ddffe56 100644 --- a/src/subscription/__tests__/subscribe-test.js +++ b/src/subscription/__tests__/subscribe-test.js @@ -1,5 +1,3 @@ -// @flow strict - import EventEmitter from 'events'; import { expect } from 'chai'; diff --git a/src/subscription/index.js b/src/subscription/index.js index 45645edb8e..899e443b6b 100644 --- a/src/subscription/index.js +++ b/src/subscription/index.js @@ -1,4 +1,2 @@ -// @flow strict - export { subscribe, createSourceEventStream } from './subscribe'; export type { SubscriptionArgs } from './subscribe'; diff --git a/src/subscription/mapAsyncIterator.js b/src/subscription/mapAsyncIterator.js index 4714a72af9..264211202f 100644 --- a/src/subscription/mapAsyncIterator.js +++ b/src/subscription/mapAsyncIterator.js @@ -1,5 +1,3 @@ -// @flow strict - import { SYMBOL_ASYNC_ITERATOR } from '../polyfills/symbols'; import type { PromiseOrValue } from '../jsutils/PromiseOrValue'; diff --git a/src/subscription/subscribe.js b/src/subscription/subscribe.js index f4eece9ec9..26699261be 100644 --- a/src/subscription/subscribe.js +++ b/src/subscription/subscribe.js @@ -1,5 +1,3 @@ -// @flow strict - import { SYMBOL_ASYNC_ITERATOR } from '../polyfills/symbols'; import inspect from '../jsutils/inspect'; diff --git a/src/type/__tests__/definition-test.js b/src/type/__tests__/definition-test.js index 2ce2bcf7ef..94a4900057 100644 --- a/src/type/__tests__/definition-test.js +++ b/src/type/__tests__/definition-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/type/__tests__/directive-test.js b/src/type/__tests__/directive-test.js index 178ca4db91..262f700fda 100644 --- a/src/type/__tests__/directive-test.js +++ b/src/type/__tests__/directive-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/type/__tests__/enumType-test.js b/src/type/__tests__/enumType-test.js index 6a7c40329b..1b217a7498 100644 --- a/src/type/__tests__/enumType-test.js +++ b/src/type/__tests__/enumType-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/type/__tests__/extensions-test.js b/src/type/__tests__/extensions-test.js index 96027a116b..fd3c02021f 100644 --- a/src/type/__tests__/extensions-test.js +++ b/src/type/__tests__/extensions-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/type/__tests__/introspection-test.js b/src/type/__tests__/introspection-test.js index 6a9abf4d49..2dce63ac46 100644 --- a/src/type/__tests__/introspection-test.js +++ b/src/type/__tests__/introspection-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/type/__tests__/predicate-test.js b/src/type/__tests__/predicate-test.js index 40dcca7ee8..cd7efe49ee 100644 --- a/src/type/__tests__/predicate-test.js +++ b/src/type/__tests__/predicate-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/type/__tests__/scalars-test.js b/src/type/__tests__/scalars-test.js index 1bba23ba8f..86edda9d2d 100644 --- a/src/type/__tests__/scalars-test.js +++ b/src/type/__tests__/scalars-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/type/__tests__/schema-test.js b/src/type/__tests__/schema-test.js index 255e44883a..a610a3691e 100644 --- a/src/type/__tests__/schema-test.js +++ b/src/type/__tests__/schema-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/type/__tests__/validation-test.js b/src/type/__tests__/validation-test.js index 20b8a5e6b3..47f08a15dd 100644 --- a/src/type/__tests__/validation-test.js +++ b/src/type/__tests__/validation-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/type/definition.js b/src/type/definition.js index 6ccac91ddf..e3b5743142 100644 --- a/src/type/definition.js +++ b/src/type/definition.js @@ -1,5 +1,3 @@ -// @flow strict - import objectEntries from '../polyfills/objectEntries'; import { SYMBOL_TO_STRING_TAG } from '../polyfills/symbols'; diff --git a/src/type/directives.js b/src/type/directives.js index b5074b8266..f620371c79 100644 --- a/src/type/directives.js +++ b/src/type/directives.js @@ -1,5 +1,3 @@ -// @flow strict - import objectEntries from '../polyfills/objectEntries'; import { SYMBOL_TO_STRING_TAG } from '../polyfills/symbols'; diff --git a/src/type/index.js b/src/type/index.js index d15378b6cc..811d50247a 100644 --- a/src/type/index.js +++ b/src/type/index.js @@ -1,5 +1,3 @@ -// @flow strict - export type { Path as ResponsePath } from '../jsutils/Path'; export { diff --git a/src/type/introspection.js b/src/type/introspection.js index f0938c95ff..944795c77d 100644 --- a/src/type/introspection.js +++ b/src/type/introspection.js @@ -1,5 +1,3 @@ -// @flow strict - import objectValues from '../polyfills/objectValues'; import inspect from '../jsutils/inspect'; diff --git a/src/type/scalars.js b/src/type/scalars.js index c88bfac492..38709c5927 100644 --- a/src/type/scalars.js +++ b/src/type/scalars.js @@ -1,5 +1,3 @@ -// @flow strict - import isFinite from '../polyfills/isFinite'; import isInteger from '../polyfills/isInteger'; diff --git a/src/type/schema.js b/src/type/schema.js index 44d8c77262..0522b5e5cd 100644 --- a/src/type/schema.js +++ b/src/type/schema.js @@ -1,5 +1,3 @@ -// @flow strict - import find from '../polyfills/find'; import arrayFrom from '../polyfills/arrayFrom'; import objectValues from '../polyfills/objectValues'; diff --git a/src/type/validate.js b/src/type/validate.js index 8ac477a3f7..90ef8a3670 100644 --- a/src/type/validate.js +++ b/src/type/validate.js @@ -1,5 +1,3 @@ -// @flow strict - import find from '../polyfills/find'; import flatMap from '../polyfills/flatMap'; import objectValues from '../polyfills/objectValues'; diff --git a/src/utilities/TypeInfo.js b/src/utilities/TypeInfo.js index 906cfd812b..40c27e26df 100644 --- a/src/utilities/TypeInfo.js +++ b/src/utilities/TypeInfo.js @@ -1,5 +1,3 @@ -// @flow strict - import find from '../polyfills/find'; import type { Visitor } from '../language/visitor'; diff --git a/src/utilities/__tests__/TypeInfo-test.js b/src/utilities/__tests__/TypeInfo-test.js index 53da7e747b..73ca3d5090 100644 --- a/src/utilities/__tests__/TypeInfo-test.js +++ b/src/utilities/__tests__/TypeInfo-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/assertValidName-test.js b/src/utilities/__tests__/assertValidName-test.js index 8247c080c6..d1c6b98272 100644 --- a/src/utilities/__tests__/assertValidName-test.js +++ b/src/utilities/__tests__/assertValidName-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/astFromValue-test.js b/src/utilities/__tests__/astFromValue-test.js index 123f4ea27f..e473c7be40 100644 --- a/src/utilities/__tests__/astFromValue-test.js +++ b/src/utilities/__tests__/astFromValue-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/buildASTSchema-benchmark.js b/src/utilities/__tests__/buildASTSchema-benchmark.js index 9a4a276959..dfb9f1d253 100644 --- a/src/utilities/__tests__/buildASTSchema-benchmark.js +++ b/src/utilities/__tests__/buildASTSchema-benchmark.js @@ -1,5 +1,3 @@ -// @flow strict - import { parse } from '../../language/parser'; import { buildASTSchema } from '../buildASTSchema'; diff --git a/src/utilities/__tests__/buildASTSchema-test.js b/src/utilities/__tests__/buildASTSchema-test.js index 1c4b3ae071..3abbd6d9c7 100644 --- a/src/utilities/__tests__/buildASTSchema-test.js +++ b/src/utilities/__tests__/buildASTSchema-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/buildClientSchema-benchmark.js b/src/utilities/__tests__/buildClientSchema-benchmark.js index c9678782b4..4897fbddc6 100644 --- a/src/utilities/__tests__/buildClientSchema-benchmark.js +++ b/src/utilities/__tests__/buildClientSchema-benchmark.js @@ -1,5 +1,3 @@ -// @flow strict - import { buildClientSchema } from '../buildClientSchema'; import { bigSchemaIntrospectionResult } from '../../__fixtures__/index'; diff --git a/src/utilities/__tests__/buildClientSchema-test.js b/src/utilities/__tests__/buildClientSchema-test.js index 425dfd9d19..67b846cec5 100644 --- a/src/utilities/__tests__/buildClientSchema-test.js +++ b/src/utilities/__tests__/buildClientSchema-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/coerceInputValue-test.js b/src/utilities/__tests__/coerceInputValue-test.js index 7675ff44e3..519a07647c 100644 --- a/src/utilities/__tests__/coerceInputValue-test.js +++ b/src/utilities/__tests__/coerceInputValue-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/concatAST-test.js b/src/utilities/__tests__/concatAST-test.js index fc493ec905..089b36e9dd 100644 --- a/src/utilities/__tests__/concatAST-test.js +++ b/src/utilities/__tests__/concatAST-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/extendSchema-test.js b/src/utilities/__tests__/extendSchema-test.js index 0abea04353..1c07359442 100644 --- a/src/utilities/__tests__/extendSchema-test.js +++ b/src/utilities/__tests__/extendSchema-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/findBreakingChanges-test.js b/src/utilities/__tests__/findBreakingChanges-test.js index 1c5aad92a2..a4ab722084 100644 --- a/src/utilities/__tests__/findBreakingChanges-test.js +++ b/src/utilities/__tests__/findBreakingChanges-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/getIntrospectionQuery-test.js b/src/utilities/__tests__/getIntrospectionQuery-test.js index 462d683acf..3a6fad2c4b 100644 --- a/src/utilities/__tests__/getIntrospectionQuery-test.js +++ b/src/utilities/__tests__/getIntrospectionQuery-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/getOperationAST-test.js b/src/utilities/__tests__/getOperationAST-test.js index 8bc4c1646a..029dd7706e 100644 --- a/src/utilities/__tests__/getOperationAST-test.js +++ b/src/utilities/__tests__/getOperationAST-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/getOperationRootType-test.js b/src/utilities/__tests__/getOperationRootType-test.js index 546caf3bc4..0b5cfc08e5 100644 --- a/src/utilities/__tests__/getOperationRootType-test.js +++ b/src/utilities/__tests__/getOperationRootType-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/introspectionFromSchema-benchmark.js b/src/utilities/__tests__/introspectionFromSchema-benchmark.js index f27599c6a1..f4ff3afe09 100644 --- a/src/utilities/__tests__/introspectionFromSchema-benchmark.js +++ b/src/utilities/__tests__/introspectionFromSchema-benchmark.js @@ -1,5 +1,3 @@ -// @flow strict - import { parse } from '../../language/parser'; import { executeSync } from '../../execution/execute'; diff --git a/src/utilities/__tests__/introspectionFromSchema-test.js b/src/utilities/__tests__/introspectionFromSchema-test.js index 2e527a0bec..4af48dcc84 100644 --- a/src/utilities/__tests__/introspectionFromSchema-test.js +++ b/src/utilities/__tests__/introspectionFromSchema-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/lexicographicSortSchema-test.js b/src/utilities/__tests__/lexicographicSortSchema-test.js index ebdf149cbd..85f8965176 100644 --- a/src/utilities/__tests__/lexicographicSortSchema-test.js +++ b/src/utilities/__tests__/lexicographicSortSchema-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/printSchema-test.js b/src/utilities/__tests__/printSchema-test.js index 6b5bbd7414..e90dc2b379 100644 --- a/src/utilities/__tests__/printSchema-test.js +++ b/src/utilities/__tests__/printSchema-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/separateOperations-test.js b/src/utilities/__tests__/separateOperations-test.js index a2d4a65758..4240705396 100644 --- a/src/utilities/__tests__/separateOperations-test.js +++ b/src/utilities/__tests__/separateOperations-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/stripIgnoredCharacters-fuzz.js b/src/utilities/__tests__/stripIgnoredCharacters-fuzz.js index c853e1e768..1ab39ad7fe 100644 --- a/src/utilities/__tests__/stripIgnoredCharacters-fuzz.js +++ b/src/utilities/__tests__/stripIgnoredCharacters-fuzz.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import dedent from '../../__testUtils__/dedent'; diff --git a/src/utilities/__tests__/stripIgnoredCharacters-test.js b/src/utilities/__tests__/stripIgnoredCharacters-test.js index 65d70cff32..cb8fd1a269 100644 --- a/src/utilities/__tests__/stripIgnoredCharacters-test.js +++ b/src/utilities/__tests__/stripIgnoredCharacters-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/typeComparators-test.js b/src/utilities/__tests__/typeComparators-test.js index f2123c576b..dffbb4f0dc 100644 --- a/src/utilities/__tests__/typeComparators-test.js +++ b/src/utilities/__tests__/typeComparators-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/valueFromAST-test.js b/src/utilities/__tests__/valueFromAST-test.js index 615747ea44..5cd68b52a6 100644 --- a/src/utilities/__tests__/valueFromAST-test.js +++ b/src/utilities/__tests__/valueFromAST-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/__tests__/valueFromASTUntyped-test.js b/src/utilities/__tests__/valueFromASTUntyped-test.js index 3870662d26..5e971a43f6 100644 --- a/src/utilities/__tests__/valueFromASTUntyped-test.js +++ b/src/utilities/__tests__/valueFromASTUntyped-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/utilities/assertValidName.js b/src/utilities/assertValidName.js index 0d8bab764f..b919b61be7 100644 --- a/src/utilities/assertValidName.js +++ b/src/utilities/assertValidName.js @@ -1,5 +1,3 @@ -// @flow strict - import devAssert from '../jsutils/devAssert'; import { GraphQLError } from '../error/GraphQLError'; diff --git a/src/utilities/astFromValue.js b/src/utilities/astFromValue.js index 51cb953cf5..39ab089d27 100644 --- a/src/utilities/astFromValue.js +++ b/src/utilities/astFromValue.js @@ -1,5 +1,3 @@ -// @flow strict - import isFinite from '../polyfills/isFinite'; import arrayFrom from '../polyfills/arrayFrom'; import objectValues from '../polyfills/objectValues'; diff --git a/src/utilities/buildASTSchema.js b/src/utilities/buildASTSchema.js index c233d77bfa..067338611e 100644 --- a/src/utilities/buildASTSchema.js +++ b/src/utilities/buildASTSchema.js @@ -1,5 +1,3 @@ -// @flow strict - import devAssert from '../jsutils/devAssert'; import type { Source } from '../language/source'; diff --git a/src/utilities/buildClientSchema.js b/src/utilities/buildClientSchema.js index 529d6765bd..78cd1d1ae1 100644 --- a/src/utilities/buildClientSchema.js +++ b/src/utilities/buildClientSchema.js @@ -1,5 +1,3 @@ -// @flow strict - import objectValues from '../polyfills/objectValues'; import inspect from '../jsutils/inspect'; diff --git a/src/utilities/coerceInputValue.js b/src/utilities/coerceInputValue.js index f595acea86..57e46cf6c2 100644 --- a/src/utilities/coerceInputValue.js +++ b/src/utilities/coerceInputValue.js @@ -1,5 +1,3 @@ -// @flow strict - import arrayFrom from '../polyfills/arrayFrom'; import objectValues from '../polyfills/objectValues'; diff --git a/src/utilities/concatAST.js b/src/utilities/concatAST.js index ea11677a90..68677cc649 100644 --- a/src/utilities/concatAST.js +++ b/src/utilities/concatAST.js @@ -1,5 +1,3 @@ -// @flow strict - import flatMap from '../polyfills/flatMap'; import type { DocumentNode } from '../language/ast'; diff --git a/src/utilities/extendSchema.js b/src/utilities/extendSchema.js index 2950441576..c360971e70 100644 --- a/src/utilities/extendSchema.js +++ b/src/utilities/extendSchema.js @@ -1,5 +1,3 @@ -// @flow strict - import objectValues from '../polyfills/objectValues'; import keyMap from '../jsutils/keyMap'; diff --git a/src/utilities/findBreakingChanges.js b/src/utilities/findBreakingChanges.js index c05562361d..999f93feb9 100644 --- a/src/utilities/findBreakingChanges.js +++ b/src/utilities/findBreakingChanges.js @@ -1,5 +1,3 @@ -// @flow strict - import objectValues from '../polyfills/objectValues'; import keyMap from '../jsutils/keyMap'; diff --git a/src/utilities/findDeprecatedUsages.js b/src/utilities/findDeprecatedUsages.js index bf95e6f0eb..f193494bab 100644 --- a/src/utilities/findDeprecatedUsages.js +++ b/src/utilities/findDeprecatedUsages.js @@ -1,5 +1,3 @@ -// @flow strict - import type { GraphQLError } from '../error/GraphQLError'; import type { DocumentNode } from '../language/ast'; diff --git a/src/utilities/getIntrospectionQuery.js b/src/utilities/getIntrospectionQuery.js index a6e39cfe6b..e8389089f9 100644 --- a/src/utilities/getIntrospectionQuery.js +++ b/src/utilities/getIntrospectionQuery.js @@ -1,5 +1,3 @@ -// @flow strict - import type { DirectiveLocationEnum } from '../language/directiveLocation'; export type IntrospectionOptions = {| diff --git a/src/utilities/getOperationAST.js b/src/utilities/getOperationAST.js index 42c614a83b..259d2f05c5 100644 --- a/src/utilities/getOperationAST.js +++ b/src/utilities/getOperationAST.js @@ -1,5 +1,3 @@ -// @flow strict - import type { DocumentNode, OperationDefinitionNode } from '../language/ast'; import { Kind } from '../language/kinds'; diff --git a/src/utilities/getOperationRootType.js b/src/utilities/getOperationRootType.js index 8fcb87edc4..039cefaa40 100644 --- a/src/utilities/getOperationRootType.js +++ b/src/utilities/getOperationRootType.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../error/GraphQLError'; import type { diff --git a/src/utilities/index.js b/src/utilities/index.js index eb7c156696..27f849014e 100644 --- a/src/utilities/index.js +++ b/src/utilities/index.js @@ -1,5 +1,3 @@ -// @flow strict - // Produce the GraphQL query recommended for a full schema introspection. // Accepts optional IntrospectionOptions. export { getIntrospectionQuery } from './getIntrospectionQuery'; diff --git a/src/utilities/introspectionFromSchema.js b/src/utilities/introspectionFromSchema.js index fee1281650..e880b82995 100644 --- a/src/utilities/introspectionFromSchema.js +++ b/src/utilities/introspectionFromSchema.js @@ -1,5 +1,3 @@ -// @flow strict - import invariant from '../jsutils/invariant'; import { parse } from '../language/parser'; diff --git a/src/utilities/lexicographicSortSchema.js b/src/utilities/lexicographicSortSchema.js index 598737bd6a..a1e59c8f10 100644 --- a/src/utilities/lexicographicSortSchema.js +++ b/src/utilities/lexicographicSortSchema.js @@ -1,5 +1,3 @@ -// @flow strict - import objectValues from '../polyfills/objectValues'; import type { ObjMap } from '../jsutils/ObjMap'; diff --git a/src/utilities/printSchema.js b/src/utilities/printSchema.js index 9249cb1f91..f6c60d0e04 100644 --- a/src/utilities/printSchema.js +++ b/src/utilities/printSchema.js @@ -1,5 +1,3 @@ -// @flow strict - import objectValues from '../polyfills/objectValues'; import inspect from '../jsutils/inspect'; diff --git a/src/utilities/separateOperations.js b/src/utilities/separateOperations.js index ad5e061771..f7be8f5cb9 100644 --- a/src/utilities/separateOperations.js +++ b/src/utilities/separateOperations.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ObjMap } from '../jsutils/ObjMap'; import type { DocumentNode, OperationDefinitionNode } from '../language/ast'; diff --git a/src/utilities/stripIgnoredCharacters.js b/src/utilities/stripIgnoredCharacters.js index 2b2036b109..d6a4c57819 100644 --- a/src/utilities/stripIgnoredCharacters.js +++ b/src/utilities/stripIgnoredCharacters.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../jsutils/inspect'; import { Source } from '../language/source'; diff --git a/src/utilities/typeComparators.js b/src/utilities/typeComparators.js index 1f00d4f4ee..99f84d2e7a 100644 --- a/src/utilities/typeComparators.js +++ b/src/utilities/typeComparators.js @@ -1,5 +1,3 @@ -// @flow strict - import type { GraphQLSchema } from '../type/schema'; import type { GraphQLType, GraphQLCompositeType } from '../type/definition'; import { diff --git a/src/utilities/typeFromAST.js b/src/utilities/typeFromAST.js index 978d92380f..7db5dbb50a 100644 --- a/src/utilities/typeFromAST.js +++ b/src/utilities/typeFromAST.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../jsutils/inspect'; import invariant from '../jsutils/invariant'; diff --git a/src/utilities/valueFromAST.js b/src/utilities/valueFromAST.js index 663ee3d300..cbdafe8ed2 100644 --- a/src/utilities/valueFromAST.js +++ b/src/utilities/valueFromAST.js @@ -1,5 +1,3 @@ -// @flow strict - import objectValues from '../polyfills/objectValues'; import type { ObjMap } from '../jsutils/ObjMap'; diff --git a/src/utilities/valueFromASTUntyped.js b/src/utilities/valueFromASTUntyped.js index 3dbaf5ac36..3b70329bda 100644 --- a/src/utilities/valueFromASTUntyped.js +++ b/src/utilities/valueFromASTUntyped.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ObjMap } from '../jsutils/ObjMap'; import inspect from '../jsutils/inspect'; import invariant from '../jsutils/invariant'; diff --git a/src/validation/ValidationContext.js b/src/validation/ValidationContext.js index 585cbda662..9bb3dbab6b 100644 --- a/src/validation/ValidationContext.js +++ b/src/validation/ValidationContext.js @@ -1,5 +1,3 @@ -// @flow strict - import type { ObjMap } from '../jsutils/ObjMap'; import type { GraphQLError } from '../error/GraphQLError'; diff --git a/src/validation/__tests__/ExecutableDefinitionsRule-test.js b/src/validation/__tests__/ExecutableDefinitionsRule-test.js index 1779d23209..bdf10aa2b0 100644 --- a/src/validation/__tests__/ExecutableDefinitionsRule-test.js +++ b/src/validation/__tests__/ExecutableDefinitionsRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { ExecutableDefinitionsRule } from '../rules/ExecutableDefinitionsRule'; diff --git a/src/validation/__tests__/FieldsOnCorrectTypeRule-test.js b/src/validation/__tests__/FieldsOnCorrectTypeRule-test.js index b53d129d62..d242ac952e 100644 --- a/src/validation/__tests__/FieldsOnCorrectTypeRule-test.js +++ b/src/validation/__tests__/FieldsOnCorrectTypeRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.js b/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.js index 4bb7286efc..8aaaecf6cd 100644 --- a/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.js +++ b/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { FragmentsOnCompositeTypesRule } from '../rules/FragmentsOnCompositeTypesRule'; diff --git a/src/validation/__tests__/KnownArgumentNamesRule-test.js b/src/validation/__tests__/KnownArgumentNamesRule-test.js index 1746236216..3a6fdced3b 100644 --- a/src/validation/__tests__/KnownArgumentNamesRule-test.js +++ b/src/validation/__tests__/KnownArgumentNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/KnownDirectivesRule-test.js b/src/validation/__tests__/KnownDirectivesRule-test.js index acc0b61a9a..a6052c384c 100644 --- a/src/validation/__tests__/KnownDirectivesRule-test.js +++ b/src/validation/__tests__/KnownDirectivesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/KnownFragmentNamesRule-test.js b/src/validation/__tests__/KnownFragmentNamesRule-test.js index 551f967a35..f3c1c4bf45 100644 --- a/src/validation/__tests__/KnownFragmentNamesRule-test.js +++ b/src/validation/__tests__/KnownFragmentNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { KnownFragmentNamesRule } from '../rules/KnownFragmentNamesRule'; diff --git a/src/validation/__tests__/KnownTypeNamesRule-test.js b/src/validation/__tests__/KnownTypeNamesRule-test.js index 584ecab119..451a7321d8 100644 --- a/src/validation/__tests__/KnownTypeNamesRule-test.js +++ b/src/validation/__tests__/KnownTypeNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/LoneAnonymousOperationRule-test.js b/src/validation/__tests__/LoneAnonymousOperationRule-test.js index 9ca95088ce..91e1206ffc 100644 --- a/src/validation/__tests__/LoneAnonymousOperationRule-test.js +++ b/src/validation/__tests__/LoneAnonymousOperationRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { LoneAnonymousOperationRule } from '../rules/LoneAnonymousOperationRule'; diff --git a/src/validation/__tests__/LoneSchemaDefinitionRule-test.js b/src/validation/__tests__/LoneSchemaDefinitionRule-test.js index 34190eab9b..b11eb30d24 100644 --- a/src/validation/__tests__/LoneSchemaDefinitionRule-test.js +++ b/src/validation/__tests__/LoneSchemaDefinitionRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/NoDeprecatedCustomRule-test.js b/src/validation/__tests__/NoDeprecatedCustomRule-test.js index 82162f3992..7a148c9bb3 100644 --- a/src/validation/__tests__/NoDeprecatedCustomRule-test.js +++ b/src/validation/__tests__/NoDeprecatedCustomRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/NoFragmentCyclesRule-test.js b/src/validation/__tests__/NoFragmentCyclesRule-test.js index 07f42cd766..19bc3710a9 100644 --- a/src/validation/__tests__/NoFragmentCyclesRule-test.js +++ b/src/validation/__tests__/NoFragmentCyclesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { NoFragmentCyclesRule } from '../rules/NoFragmentCyclesRule'; diff --git a/src/validation/__tests__/NoSchemaIntrospectionCustomRule-test.js b/src/validation/__tests__/NoSchemaIntrospectionCustomRule-test.js index bbb671b0ef..36014b8a14 100644 --- a/src/validation/__tests__/NoSchemaIntrospectionCustomRule-test.js +++ b/src/validation/__tests__/NoSchemaIntrospectionCustomRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/NoUndefinedVariablesRule-test.js b/src/validation/__tests__/NoUndefinedVariablesRule-test.js index 5c90a00b89..1483171ce7 100644 --- a/src/validation/__tests__/NoUndefinedVariablesRule-test.js +++ b/src/validation/__tests__/NoUndefinedVariablesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { NoUndefinedVariablesRule } from '../rules/NoUndefinedVariablesRule'; diff --git a/src/validation/__tests__/NoUnusedFragmentsRule-test.js b/src/validation/__tests__/NoUnusedFragmentsRule-test.js index 8d0e3b9498..5c673b8c24 100644 --- a/src/validation/__tests__/NoUnusedFragmentsRule-test.js +++ b/src/validation/__tests__/NoUnusedFragmentsRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { NoUnusedFragmentsRule } from '../rules/NoUnusedFragmentsRule'; diff --git a/src/validation/__tests__/NoUnusedVariablesRule-test.js b/src/validation/__tests__/NoUnusedVariablesRule-test.js index 4eea095e0c..68c18bedac 100644 --- a/src/validation/__tests__/NoUnusedVariablesRule-test.js +++ b/src/validation/__tests__/NoUnusedVariablesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { NoUnusedVariablesRule } from '../rules/NoUnusedVariablesRule'; diff --git a/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.js b/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.js index 8d46357e89..410a857377 100644 --- a/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.js +++ b/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/PossibleFragmentSpreadsRule-test.js b/src/validation/__tests__/PossibleFragmentSpreadsRule-test.js index 6f70058125..24a7f7aca5 100644 --- a/src/validation/__tests__/PossibleFragmentSpreadsRule-test.js +++ b/src/validation/__tests__/PossibleFragmentSpreadsRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { PossibleFragmentSpreadsRule } from '../rules/PossibleFragmentSpreadsRule'; diff --git a/src/validation/__tests__/PossibleTypeExtensionsRule-test.js b/src/validation/__tests__/PossibleTypeExtensionsRule-test.js index 4f1bcde0c3..5766af72dc 100644 --- a/src/validation/__tests__/PossibleTypeExtensionsRule-test.js +++ b/src/validation/__tests__/PossibleTypeExtensionsRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.js b/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.js index d7198b481e..a49b64d5dd 100644 --- a/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.js +++ b/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/ScalarLeafsRule-test.js b/src/validation/__tests__/ScalarLeafsRule-test.js index 5f6cc30ab1..cb6f492794 100644 --- a/src/validation/__tests__/ScalarLeafsRule-test.js +++ b/src/validation/__tests__/ScalarLeafsRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { ScalarLeafsRule } from '../rules/ScalarLeafsRule'; diff --git a/src/validation/__tests__/SingleFieldSubscriptionsRule-test.js b/src/validation/__tests__/SingleFieldSubscriptionsRule-test.js index bbd55b0d8c..cc336e3761 100644 --- a/src/validation/__tests__/SingleFieldSubscriptionsRule-test.js +++ b/src/validation/__tests__/SingleFieldSubscriptionsRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { SingleFieldSubscriptionsRule } from '../rules/SingleFieldSubscriptionsRule'; diff --git a/src/validation/__tests__/UniqueArgumentNamesRule-test.js b/src/validation/__tests__/UniqueArgumentNamesRule-test.js index a72cec64c8..6962f4347e 100644 --- a/src/validation/__tests__/UniqueArgumentNamesRule-test.js +++ b/src/validation/__tests__/UniqueArgumentNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { UniqueArgumentNamesRule } from '../rules/UniqueArgumentNamesRule'; diff --git a/src/validation/__tests__/UniqueDirectiveNamesRule-test.js b/src/validation/__tests__/UniqueDirectiveNamesRule-test.js index 65261e985c..8a650dec2e 100644 --- a/src/validation/__tests__/UniqueDirectiveNamesRule-test.js +++ b/src/validation/__tests__/UniqueDirectiveNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.js b/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.js index 411b6cd9d8..b1c55d3140 100644 --- a/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.js +++ b/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { parse } from '../../language/parser'; diff --git a/src/validation/__tests__/UniqueEnumValueNamesRule-test.js b/src/validation/__tests__/UniqueEnumValueNamesRule-test.js index f5c2db52b3..69a4208469 100644 --- a/src/validation/__tests__/UniqueEnumValueNamesRule-test.js +++ b/src/validation/__tests__/UniqueEnumValueNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/UniqueFieldDefinitionNamesRule-test.js b/src/validation/__tests__/UniqueFieldDefinitionNamesRule-test.js index 759ad4b1a2..a5d301a829 100644 --- a/src/validation/__tests__/UniqueFieldDefinitionNamesRule-test.js +++ b/src/validation/__tests__/UniqueFieldDefinitionNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/UniqueFragmentNamesRule-test.js b/src/validation/__tests__/UniqueFragmentNamesRule-test.js index cf6a67da06..58c6b48265 100644 --- a/src/validation/__tests__/UniqueFragmentNamesRule-test.js +++ b/src/validation/__tests__/UniqueFragmentNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { UniqueFragmentNamesRule } from '../rules/UniqueFragmentNamesRule'; diff --git a/src/validation/__tests__/UniqueInputFieldNamesRule-test.js b/src/validation/__tests__/UniqueInputFieldNamesRule-test.js index 14b70ff8a4..27cf32644e 100644 --- a/src/validation/__tests__/UniqueInputFieldNamesRule-test.js +++ b/src/validation/__tests__/UniqueInputFieldNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { UniqueInputFieldNamesRule } from '../rules/UniqueInputFieldNamesRule'; diff --git a/src/validation/__tests__/UniqueOperationNamesRule-test.js b/src/validation/__tests__/UniqueOperationNamesRule-test.js index 6f1de34b4c..9aef762303 100644 --- a/src/validation/__tests__/UniqueOperationNamesRule-test.js +++ b/src/validation/__tests__/UniqueOperationNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { UniqueOperationNamesRule } from '../rules/UniqueOperationNamesRule'; diff --git a/src/validation/__tests__/UniqueOperationTypesRule-test.js b/src/validation/__tests__/UniqueOperationTypesRule-test.js index cf26459103..2fb794b07d 100644 --- a/src/validation/__tests__/UniqueOperationTypesRule-test.js +++ b/src/validation/__tests__/UniqueOperationTypesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/UniqueTypeNamesRule-test.js b/src/validation/__tests__/UniqueTypeNamesRule-test.js index 961116fd81..9b560245a3 100644 --- a/src/validation/__tests__/UniqueTypeNamesRule-test.js +++ b/src/validation/__tests__/UniqueTypeNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/UniqueVariableNamesRule-test.js b/src/validation/__tests__/UniqueVariableNamesRule-test.js index 779d581704..608f8bf448 100644 --- a/src/validation/__tests__/UniqueVariableNamesRule-test.js +++ b/src/validation/__tests__/UniqueVariableNamesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { UniqueVariableNamesRule } from '../rules/UniqueVariableNamesRule'; diff --git a/src/validation/__tests__/ValuesOfCorrectTypeRule-test.js b/src/validation/__tests__/ValuesOfCorrectTypeRule-test.js index 723208a872..c62a95bf7a 100644 --- a/src/validation/__tests__/ValuesOfCorrectTypeRule-test.js +++ b/src/validation/__tests__/ValuesOfCorrectTypeRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import inspect from '../../jsutils/inspect'; diff --git a/src/validation/__tests__/VariablesAreInputTypesRule-test.js b/src/validation/__tests__/VariablesAreInputTypesRule-test.js index 6c489745d6..2ab0a5b757 100644 --- a/src/validation/__tests__/VariablesAreInputTypesRule-test.js +++ b/src/validation/__tests__/VariablesAreInputTypesRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { VariablesAreInputTypesRule } from '../rules/VariablesAreInputTypesRule'; diff --git a/src/validation/__tests__/VariablesInAllowedPositionRule-test.js b/src/validation/__tests__/VariablesInAllowedPositionRule-test.js index 5654f7e955..335242beb8 100644 --- a/src/validation/__tests__/VariablesInAllowedPositionRule-test.js +++ b/src/validation/__tests__/VariablesInAllowedPositionRule-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { describe, it } from 'mocha'; import { VariablesInAllowedPositionRule } from '../rules/VariablesInAllowedPositionRule'; diff --git a/src/validation/__tests__/harness.js b/src/validation/__tests__/harness.js index 46e0b336bd..99683412d8 100644 --- a/src/validation/__tests__/harness.js +++ b/src/validation/__tests__/harness.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { parse } from '../../language/parser'; @@ -148,13 +146,16 @@ export function expectValidationErrorsWithSchema( schema: GraphQLSchema, rule: ValidationRule, queryStr: string, -) { +): any { const doc = parse(queryStr); const errors = validate(schema, doc, [rule]); return expect(errors); } -export function expectValidationErrors(rule: ValidationRule, queryStr: string) { +export function expectValidationErrors( + rule: ValidationRule, + queryStr: string, +): any { return expectValidationErrorsWithSchema(testSchema, rule, queryStr); } @@ -162,7 +163,7 @@ export function expectSDLValidationErrors( schema: ?GraphQLSchema, rule: SDLValidationRule, sdlStr: string, -) { +): any { const doc = parse(sdlStr); const errors = validateSDL(doc, schema, [rule]); return expect(errors); diff --git a/src/validation/__tests__/validateGQL-benchmark.js b/src/validation/__tests__/validateGQL-benchmark.js index 203ed29358..c930325f49 100644 --- a/src/validation/__tests__/validateGQL-benchmark.js +++ b/src/validation/__tests__/validateGQL-benchmark.js @@ -1,5 +1,3 @@ -// @flow strict - import { parse } from '../../language/parser'; import { buildSchema } from '../../utilities/buildASTSchema'; import { getIntrospectionQuery } from '../../utilities/getIntrospectionQuery'; diff --git a/src/validation/__tests__/validateInvalidGQL-benchmark.js b/src/validation/__tests__/validateInvalidGQL-benchmark.js index 8e9bb12a22..895c6a47c3 100644 --- a/src/validation/__tests__/validateInvalidGQL-benchmark.js +++ b/src/validation/__tests__/validateInvalidGQL-benchmark.js @@ -1,5 +1,3 @@ -// @flow strict - import { parse } from '../../language/parser'; import { buildSchema } from '../../utilities/buildASTSchema'; diff --git a/src/validation/__tests__/validateSDL-benchmark.js b/src/validation/__tests__/validateSDL-benchmark.js index e56eb06236..a4f8859d2d 100644 --- a/src/validation/__tests__/validateSDL-benchmark.js +++ b/src/validation/__tests__/validateSDL-benchmark.js @@ -1,5 +1,3 @@ -// @flow strict - import { parse } from '../../language/parser'; import { validateSDL } from '../validate'; diff --git a/src/validation/__tests__/validation-test.js b/src/validation/__tests__/validation-test.js index 5461d5be43..bd32a219c7 100644 --- a/src/validation/__tests__/validation-test.js +++ b/src/validation/__tests__/validation-test.js @@ -1,5 +1,3 @@ -// @flow strict - import { expect } from 'chai'; import { describe, it } from 'mocha'; diff --git a/src/validation/index.js b/src/validation/index.js index 4c977fa1c3..c0f24a0316 100644 --- a/src/validation/index.js +++ b/src/validation/index.js @@ -1,5 +1,3 @@ -// @flow strict - export { validate } from './validate'; export { ValidationContext } from './ValidationContext'; diff --git a/src/validation/rules/ExecutableDefinitions.js b/src/validation/rules/ExecutableDefinitions.js index b9ee751066..94557ad8de 100644 --- a/src/validation/rules/ExecutableDefinitions.js +++ b/src/validation/rules/ExecutableDefinitions.js @@ -1,5 +1,3 @@ -// @flow strict - /** * @deprecated and will be removed in v16 * Please use either: diff --git a/src/validation/rules/ExecutableDefinitionsRule.js b/src/validation/rules/ExecutableDefinitionsRule.js index e981cff2e8..c446e000e1 100644 --- a/src/validation/rules/ExecutableDefinitionsRule.js +++ b/src/validation/rules/ExecutableDefinitionsRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/FieldsOnCorrectTypeRule.js b/src/validation/rules/FieldsOnCorrectTypeRule.js index e0b67e7c68..5b60d53646 100644 --- a/src/validation/rules/FieldsOnCorrectTypeRule.js +++ b/src/validation/rules/FieldsOnCorrectTypeRule.js @@ -1,5 +1,3 @@ -// @flow strict - import arrayFrom from '../../polyfills/arrayFrom'; import didYouMean from '../../jsutils/didYouMean'; diff --git a/src/validation/rules/FragmentsOnCompositeTypesRule.js b/src/validation/rules/FragmentsOnCompositeTypesRule.js index 48b587cd41..75f49158c7 100644 --- a/src/validation/rules/FragmentsOnCompositeTypesRule.js +++ b/src/validation/rules/FragmentsOnCompositeTypesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/KnownArgumentNamesRule.js b/src/validation/rules/KnownArgumentNamesRule.js index a0b7dfd474..a7978112cf 100644 --- a/src/validation/rules/KnownArgumentNamesRule.js +++ b/src/validation/rules/KnownArgumentNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import didYouMean from '../../jsutils/didYouMean'; import suggestionList from '../../jsutils/suggestionList'; diff --git a/src/validation/rules/KnownDirectivesRule.js b/src/validation/rules/KnownDirectivesRule.js index 0d47bad73a..40d61cec28 100644 --- a/src/validation/rules/KnownDirectivesRule.js +++ b/src/validation/rules/KnownDirectivesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../../jsutils/inspect'; import invariant from '../../jsutils/invariant'; diff --git a/src/validation/rules/KnownFragmentNamesRule.js b/src/validation/rules/KnownFragmentNamesRule.js index 2d4a720dd1..0f3412bb45 100644 --- a/src/validation/rules/KnownFragmentNamesRule.js +++ b/src/validation/rules/KnownFragmentNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/KnownTypeNamesRule.js b/src/validation/rules/KnownTypeNamesRule.js index d8a0ad75d9..f60917dea8 100644 --- a/src/validation/rules/KnownTypeNamesRule.js +++ b/src/validation/rules/KnownTypeNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import didYouMean from '../../jsutils/didYouMean'; import suggestionList from '../../jsutils/suggestionList'; diff --git a/src/validation/rules/LoneAnonymousOperationRule.js b/src/validation/rules/LoneAnonymousOperationRule.js index dd8c3aa489..617c80639f 100644 --- a/src/validation/rules/LoneAnonymousOperationRule.js +++ b/src/validation/rules/LoneAnonymousOperationRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/LoneSchemaDefinition.js b/src/validation/rules/LoneSchemaDefinition.js index d5acb8439a..a38ad06a6d 100644 --- a/src/validation/rules/LoneSchemaDefinition.js +++ b/src/validation/rules/LoneSchemaDefinition.js @@ -1,5 +1,3 @@ -// @flow strict - /** * @deprecated and will be removed in v16 * Please use either: diff --git a/src/validation/rules/LoneSchemaDefinitionRule.js b/src/validation/rules/LoneSchemaDefinitionRule.js index dd0c0af12d..1c2b02371e 100644 --- a/src/validation/rules/LoneSchemaDefinitionRule.js +++ b/src/validation/rules/LoneSchemaDefinitionRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/NoFragmentCyclesRule.js b/src/validation/rules/NoFragmentCyclesRule.js index 3e7716f81b..2f30d3366b 100644 --- a/src/validation/rules/NoFragmentCyclesRule.js +++ b/src/validation/rules/NoFragmentCyclesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/NoUndefinedVariablesRule.js b/src/validation/rules/NoUndefinedVariablesRule.js index 787ee87da4..de1a84807f 100644 --- a/src/validation/rules/NoUndefinedVariablesRule.js +++ b/src/validation/rules/NoUndefinedVariablesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/NoUnusedFragmentsRule.js b/src/validation/rules/NoUnusedFragmentsRule.js index 69f2278b47..d69bf241cf 100644 --- a/src/validation/rules/NoUnusedFragmentsRule.js +++ b/src/validation/rules/NoUnusedFragmentsRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/NoUnusedVariablesRule.js b/src/validation/rules/NoUnusedVariablesRule.js index 31fba5f1af..70bc81c941 100644 --- a/src/validation/rules/NoUnusedVariablesRule.js +++ b/src/validation/rules/NoUnusedVariablesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/OverlappingFieldsCanBeMergedRule.js b/src/validation/rules/OverlappingFieldsCanBeMergedRule.js index 520bbec421..d4723c3177 100644 --- a/src/validation/rules/OverlappingFieldsCanBeMergedRule.js +++ b/src/validation/rules/OverlappingFieldsCanBeMergedRule.js @@ -1,5 +1,3 @@ -// @flow strict - import find from '../../polyfills/find'; import objectEntries from '../../polyfills/objectEntries'; diff --git a/src/validation/rules/PossibleFragmentSpreadsRule.js b/src/validation/rules/PossibleFragmentSpreadsRule.js index a0524a12da..1aa1cae5b7 100644 --- a/src/validation/rules/PossibleFragmentSpreadsRule.js +++ b/src/validation/rules/PossibleFragmentSpreadsRule.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../../jsutils/inspect'; import { GraphQLError } from '../../error/GraphQLError'; diff --git a/src/validation/rules/PossibleTypeExtensions.js b/src/validation/rules/PossibleTypeExtensions.js index 0e80b892aa..7573375e6d 100644 --- a/src/validation/rules/PossibleTypeExtensions.js +++ b/src/validation/rules/PossibleTypeExtensions.js @@ -1,5 +1,3 @@ -// @flow strict - /** * @deprecated and will be removed in v16 * Please use either: diff --git a/src/validation/rules/PossibleTypeExtensionsRule.js b/src/validation/rules/PossibleTypeExtensionsRule.js index b11457a4d0..a2ba93638c 100644 --- a/src/validation/rules/PossibleTypeExtensionsRule.js +++ b/src/validation/rules/PossibleTypeExtensionsRule.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../../jsutils/inspect'; import invariant from '../../jsutils/invariant'; import didYouMean from '../../jsutils/didYouMean'; diff --git a/src/validation/rules/ProvidedRequiredArgumentsRule.js b/src/validation/rules/ProvidedRequiredArgumentsRule.js index 4cc777f051..cb07c87057 100644 --- a/src/validation/rules/ProvidedRequiredArgumentsRule.js +++ b/src/validation/rules/ProvidedRequiredArgumentsRule.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../../jsutils/inspect'; import keyMap from '../../jsutils/keyMap'; diff --git a/src/validation/rules/ScalarLeafsRule.js b/src/validation/rules/ScalarLeafsRule.js index b6280f448c..a0c0c6cc40 100644 --- a/src/validation/rules/ScalarLeafsRule.js +++ b/src/validation/rules/ScalarLeafsRule.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../../jsutils/inspect'; import { GraphQLError } from '../../error/GraphQLError'; diff --git a/src/validation/rules/SingleFieldSubscriptionsRule.js b/src/validation/rules/SingleFieldSubscriptionsRule.js index 2a03029395..760fe3c144 100644 --- a/src/validation/rules/SingleFieldSubscriptionsRule.js +++ b/src/validation/rules/SingleFieldSubscriptionsRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueArgumentNamesRule.js b/src/validation/rules/UniqueArgumentNamesRule.js index d294ec4cc7..73289efd2f 100644 --- a/src/validation/rules/UniqueArgumentNamesRule.js +++ b/src/validation/rules/UniqueArgumentNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueDirectiveNames.js b/src/validation/rules/UniqueDirectiveNames.js index fbbd6fc579..c197e87cb2 100644 --- a/src/validation/rules/UniqueDirectiveNames.js +++ b/src/validation/rules/UniqueDirectiveNames.js @@ -1,5 +1,3 @@ -// @flow strict - /** * @deprecated and will be removed in v16 * Please use either: diff --git a/src/validation/rules/UniqueDirectiveNamesRule.js b/src/validation/rules/UniqueDirectiveNamesRule.js index f698bd1076..0d87d9deb4 100644 --- a/src/validation/rules/UniqueDirectiveNamesRule.js +++ b/src/validation/rules/UniqueDirectiveNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueDirectivesPerLocationRule.js b/src/validation/rules/UniqueDirectivesPerLocationRule.js index cdd17abbe1..a21c081790 100644 --- a/src/validation/rules/UniqueDirectivesPerLocationRule.js +++ b/src/validation/rules/UniqueDirectivesPerLocationRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import { Kind } from '../../language/kinds'; diff --git a/src/validation/rules/UniqueEnumValueNames.js b/src/validation/rules/UniqueEnumValueNames.js index bf40bb2c33..96d9b787ca 100644 --- a/src/validation/rules/UniqueEnumValueNames.js +++ b/src/validation/rules/UniqueEnumValueNames.js @@ -1,5 +1,3 @@ -// @flow strict - /** * @deprecated and will be removed in v16 * Please use either: diff --git a/src/validation/rules/UniqueEnumValueNamesRule.js b/src/validation/rules/UniqueEnumValueNamesRule.js index 73425e986c..3eb1bb55ff 100644 --- a/src/validation/rules/UniqueEnumValueNamesRule.js +++ b/src/validation/rules/UniqueEnumValueNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueFieldDefinitionNames.js b/src/validation/rules/UniqueFieldDefinitionNames.js index 2efdf02a9a..26ebb066ce 100644 --- a/src/validation/rules/UniqueFieldDefinitionNames.js +++ b/src/validation/rules/UniqueFieldDefinitionNames.js @@ -1,5 +1,3 @@ -// @flow strict - /** * @deprecated and will be removed in v16 * Please use either: diff --git a/src/validation/rules/UniqueFieldDefinitionNamesRule.js b/src/validation/rules/UniqueFieldDefinitionNamesRule.js index 1f6eeb033c..652b773cda 100644 --- a/src/validation/rules/UniqueFieldDefinitionNamesRule.js +++ b/src/validation/rules/UniqueFieldDefinitionNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueFragmentNamesRule.js b/src/validation/rules/UniqueFragmentNamesRule.js index 9f79a1af34..144e0e94d5 100644 --- a/src/validation/rules/UniqueFragmentNamesRule.js +++ b/src/validation/rules/UniqueFragmentNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueInputFieldNamesRule.js b/src/validation/rules/UniqueInputFieldNamesRule.js index 0fca6f4687..413783e930 100644 --- a/src/validation/rules/UniqueInputFieldNamesRule.js +++ b/src/validation/rules/UniqueInputFieldNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueOperationNamesRule.js b/src/validation/rules/UniqueOperationNamesRule.js index fdedf25cc1..6051e91978 100644 --- a/src/validation/rules/UniqueOperationNamesRule.js +++ b/src/validation/rules/UniqueOperationNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueOperationTypes.js b/src/validation/rules/UniqueOperationTypes.js index bb3d541cab..423932dba1 100644 --- a/src/validation/rules/UniqueOperationTypes.js +++ b/src/validation/rules/UniqueOperationTypes.js @@ -1,5 +1,3 @@ -// @flow strict - /** * @deprecated and will be removed in v16 * Please use either: diff --git a/src/validation/rules/UniqueOperationTypesRule.js b/src/validation/rules/UniqueOperationTypesRule.js index a13814e327..0e630a52e3 100644 --- a/src/validation/rules/UniqueOperationTypesRule.js +++ b/src/validation/rules/UniqueOperationTypesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueTypeNames.js b/src/validation/rules/UniqueTypeNames.js index ea708b23ff..1740eef841 100644 --- a/src/validation/rules/UniqueTypeNames.js +++ b/src/validation/rules/UniqueTypeNames.js @@ -1,5 +1,3 @@ -// @flow strict - /** * @deprecated and will be removed in v16 * Please use either: diff --git a/src/validation/rules/UniqueTypeNamesRule.js b/src/validation/rules/UniqueTypeNamesRule.js index 41a5934ae8..fed280c446 100644 --- a/src/validation/rules/UniqueTypeNamesRule.js +++ b/src/validation/rules/UniqueTypeNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/UniqueVariableNamesRule.js b/src/validation/rules/UniqueVariableNamesRule.js index a8a7503e03..6035cdfa3e 100644 --- a/src/validation/rules/UniqueVariableNamesRule.js +++ b/src/validation/rules/UniqueVariableNamesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; diff --git a/src/validation/rules/ValuesOfCorrectTypeRule.js b/src/validation/rules/ValuesOfCorrectTypeRule.js index 8941cdbd5f..d97647a000 100644 --- a/src/validation/rules/ValuesOfCorrectTypeRule.js +++ b/src/validation/rules/ValuesOfCorrectTypeRule.js @@ -1,5 +1,3 @@ -// @flow strict - import objectValues from '../../polyfills/objectValues'; import keyMap from '../../jsutils/keyMap'; diff --git a/src/validation/rules/VariablesAreInputTypesRule.js b/src/validation/rules/VariablesAreInputTypesRule.js index 431b0b42dd..f16cb7461d 100644 --- a/src/validation/rules/VariablesAreInputTypesRule.js +++ b/src/validation/rules/VariablesAreInputTypesRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../error/GraphQLError'; import { print } from '../../language/printer'; diff --git a/src/validation/rules/VariablesInAllowedPositionRule.js b/src/validation/rules/VariablesInAllowedPositionRule.js index 8a2bb7706d..8d0cbbf26c 100644 --- a/src/validation/rules/VariablesInAllowedPositionRule.js +++ b/src/validation/rules/VariablesInAllowedPositionRule.js @@ -1,5 +1,3 @@ -// @flow strict - import inspect from '../../jsutils/inspect'; import { GraphQLError } from '../../error/GraphQLError'; diff --git a/src/validation/rules/custom/NoDeprecatedCustomRule.js b/src/validation/rules/custom/NoDeprecatedCustomRule.js index 244c18ec1a..597f51654f 100644 --- a/src/validation/rules/custom/NoDeprecatedCustomRule.js +++ b/src/validation/rules/custom/NoDeprecatedCustomRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../../error/GraphQLError'; import type { EnumValueNode, FieldNode } from '../../../language/ast'; diff --git a/src/validation/rules/custom/NoSchemaIntrospectionCustomRule.js b/src/validation/rules/custom/NoSchemaIntrospectionCustomRule.js index 2f4d857697..7a1c1f2ab9 100644 --- a/src/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +++ b/src/validation/rules/custom/NoSchemaIntrospectionCustomRule.js @@ -1,5 +1,3 @@ -// @flow strict - import { GraphQLError } from '../../../error/GraphQLError'; import type { FieldNode } from '../../../language/ast'; diff --git a/src/validation/specifiedRules.js b/src/validation/specifiedRules.js index 54bbf84ae3..72f25d9490 100644 --- a/src/validation/specifiedRules.js +++ b/src/validation/specifiedRules.js @@ -1,5 +1,3 @@ -// @flow strict - // Spec Section: "Executable Definitions" import { ExecutableDefinitionsRule } from './rules/ExecutableDefinitionsRule'; diff --git a/src/validation/validate.js b/src/validation/validate.js index 3c2d6c68cf..8cb11a5bcd 100644 --- a/src/validation/validate.js +++ b/src/validation/validate.js @@ -1,5 +1,3 @@ -// @flow strict - import devAssert from '../jsutils/devAssert'; import { GraphQLError } from '../error/GraphQLError'; diff --git a/src/version.js b/src/version.js index bf632144b5..df03b22b09 100644 --- a/src/version.js +++ b/src/version.js @@ -1,5 +1,3 @@ -// @flow strict - /** * Note: This file is autogenerated using "resources/gen-version.js" script and * automatically updated by "npm version" command.