From 570af60c9b5b7449aa2428a0c3d7d1dae49c9ade Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Wed, 5 Sep 2018 14:29:37 +0300 Subject: [PATCH] Run spell checker on all JS files --- src/execution/__tests__/executor-test.js | 2 +- src/execution/__tests__/lists-test.js | 2 +- src/execution/__tests__/mutations-test.js | 2 +- src/execution/execute.js | 4 ++-- src/language/__tests__/parser-test.js | 2 +- src/language/__tests__/schema-parser-test.js | 2 +- src/language/blockStringValue.js | 2 +- src/language/lexer.js | 2 +- src/utilities/__tests__/buildASTSchema-test.js | 2 +- src/utilities/__tests__/extendSchema-test.js | 8 ++++---- src/validation/__tests__/KnownArgumentNames-test.js | 2 +- .../__tests__/OverlappingFieldsCanBeMerged-test.js | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/execution/__tests__/executor-test.js b/src/execution/__tests__/executor-test.js index ac2591add9..1baf063a83 100644 --- a/src/execution/__tests__/executor-test.js +++ b/src/execution/__tests__/executor-test.js @@ -950,7 +950,7 @@ describe('Execute: Handles basic execution tasks', () => { it('does not include illegal fields in output', () => { const doc = `mutation M { - thisIsIllegalDontIncludeMe + thisIsIllegalDoNotIncludeMe }`; const ast = parse(doc); const schema = new GraphQLSchema({ diff --git a/src/execution/__tests__/lists-test.js b/src/execution/__tests__/lists-test.js index e6513b10bd..8056b03ce3 100644 --- a/src/execution/__tests__/lists-test.js +++ b/src/execution/__tests__/lists-test.js @@ -87,7 +87,7 @@ describe('Execute: Accepts any iterable as list value', () => { it( 'Does not accept (Iterable) String-literal as a List value', - check(GraphQLList(GraphQLString), 'Singluar', { + check(GraphQLList(GraphQLString), 'Singular', { data: { nest: { test: null } }, errors: [ { diff --git a/src/execution/__tests__/mutations-test.js b/src/execution/__tests__/mutations-test.js index d12973b615..8df6410123 100644 --- a/src/execution/__tests__/mutations-test.js +++ b/src/execution/__tests__/mutations-test.js @@ -133,7 +133,7 @@ describe('Execute: Handles mutation execution ordering', () => { }); }); - it('evaluates mutations correctly in the presense of a failed mutation', async () => { + it('evaluates mutations correctly in the presence of a failed mutation', async () => { const doc = `mutation M { first: immediatelyChangeTheNumber(newNumber: 1) { theNumber diff --git a/src/execution/execute.js b/src/execution/execute.js index a76377b7d1..f6f6144359 100644 --- a/src/execution/execute.js +++ b/src/execution/execute.js @@ -575,7 +575,7 @@ export function collectFields( /** * Determines if a field should be included based on the @include and @skip - * directives, where @skip has higher precidence than @include. + * directives, where @skip has higher precedence than @include. */ function shouldIncludeNode( exeContext: ExecutionContext, @@ -1238,7 +1238,7 @@ export const defaultFieldResolver: GraphQLFieldResolver = function( }; /** - * This method looks up the field on the given type defintion. + * This method looks up the field on the given type definition. * It has special casing for the two introspection fields, __schema * and __typename. __typename is special because it can always be * queried as a field, even in situations where no other fields diff --git a/src/language/__tests__/parser-test.js b/src/language/__tests__/parser-test.js index c1e9ceca92..6d8c597734 100644 --- a/src/language/__tests__/parser-test.js +++ b/src/language/__tests__/parser-test.js @@ -129,7 +129,7 @@ describe('Parser', () => { }); it('parses multi-byte characters', () => { - // Note: \u0A0A could be naively interpretted as two line-feed chars. + // Note: \u0A0A could be naively interpreted as two line-feed chars. const ast = parse(` # This comment has a \u0A0A multi-byte character. { field(arg: "Has a \u0A0A multi-byte character.") } diff --git a/src/language/__tests__/schema-parser-test.js b/src/language/__tests__/schema-parser-test.js index 1ad0acd05e..d7e7ff943d 100644 --- a/src/language/__tests__/schema-parser-test.js +++ b/src/language/__tests__/schema-parser-test.js @@ -722,7 +722,7 @@ type Hello { }); }); - it('Union fails with leading douple pipe', () => { + it('Union fails with leading double pipe', () => { expectSyntaxError('union Hello = || Wo | Rld', 'Expected Name, found |', { line: 1, column: 16, diff --git a/src/language/blockStringValue.js b/src/language/blockStringValue.js index ec2449ffeb..5b90bc0531 100644 --- a/src/language/blockStringValue.js +++ b/src/language/blockStringValue.js @@ -9,7 +9,7 @@ /** * 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. + * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. * * This implements the GraphQL spec's BlockStringValue() static algorithm. */ diff --git a/src/language/lexer.js b/src/language/lexer.js index 36d6d82cb3..9eff1c2575 100644 --- a/src/language/lexer.js +++ b/src/language/lexer.js @@ -687,7 +687,7 @@ function readBlockString(source, start, line, col, prev): Token { } /** - * Converts four hexidecimal chars to the integer that the + * Converts four hexadecimal chars to the integer that the * string represents. For example, uniCharCode('0','0','0','f') * will return 15, and uniCharCode('0','0','f','f') returns 255. * diff --git a/src/utilities/__tests__/buildASTSchema-test.js b/src/utilities/__tests__/buildASTSchema-test.js index b0f64b24b6..253c1023f3 100644 --- a/src/utilities/__tests__/buildASTSchema-test.js +++ b/src/utilities/__tests__/buildASTSchema-test.js @@ -576,7 +576,7 @@ describe('Schema Builder', () => { } type Subscription { - sbscribeHelloScalars(str: String, int: Int, bool: Boolean): HelloScalars + subscribeHelloScalars(str: String, int: Int, bool: Boolean): HelloScalars } `; const output = cycleOutput(body); diff --git a/src/utilities/__tests__/extendSchema-test.js b/src/utilities/__tests__/extendSchema-test.js index 8c433fa9be..b70e15b77a 100644 --- a/src/utilities/__tests__/extendSchema-test.js +++ b/src/utilities/__tests__/extendSchema-test.js @@ -144,12 +144,12 @@ function extendTestSchema(sdl, options) { } const testSchemaAST = parse(printSchema(testSchema)); -const testSchemaDefinions = testSchemaAST.definitions.map(print); +const testSchemaDefinitions = testSchemaAST.definitions.map(print); function printTestSchemaChanges(extendedSchema) { const ast = parse(printSchema(extendedSchema)); ast.definitions = ast.definitions.filter( - node => !testSchemaDefinions.includes(print(node)), + node => !testSchemaDefinitions.includes(print(node)), ); return print(ast); } @@ -1163,12 +1163,12 @@ describe('extendSchema', () => { `; expect(() => extendTestSchema(typeSDL)).to.throw(unknownTypeError); - const intefaceSDL = ` + const interfaceSDL = ` extend interface SomeInterface { quix: Quix } `; - expect(() => extendTestSchema(intefaceSDL)).to.throw(unknownTypeError); + expect(() => extendTestSchema(interfaceSDL)).to.throw(unknownTypeError); const unionSDL = ` extend union SomeUnion = Quix diff --git a/src/validation/__tests__/KnownArgumentNames-test.js b/src/validation/__tests__/KnownArgumentNames-test.js index 015f84ee66..80c4655a00 100644 --- a/src/validation/__tests__/KnownArgumentNames-test.js +++ b/src/validation/__tests__/KnownArgumentNames-test.js @@ -131,7 +131,7 @@ describe('Validate: Known argument names', () => { ); }); - it('undirective args are invalid', () => { + it('field args are invalid', () => { expectFailsRule( KnownArgumentNames, ` diff --git a/src/validation/__tests__/OverlappingFieldsCanBeMerged-test.js b/src/validation/__tests__/OverlappingFieldsCanBeMerged-test.js index 97d66b9ff2..8bf5ecc48d 100644 --- a/src/validation/__tests__/OverlappingFieldsCanBeMerged-test.js +++ b/src/validation/__tests__/OverlappingFieldsCanBeMerged-test.js @@ -979,7 +979,7 @@ describe('Validate: Overlapping fields can be merged', () => { ); }); - it('allows non-conflicting overlaping types', () => { + it('allows non-conflicting overlapping types', () => { expectPassesRuleWithSchema( schema, OverlappingFieldsCanBeMerged,