From 0e97527aa0a4b438ae351f0ba24bd65388e6f499 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Thu, 18 Jun 2020 17:16:34 +0300 Subject: [PATCH] Run cspell on entire project (#2665) --- .github/CONTRIBUTING.md | 2 +- cspell.json | 33 ++++++++++++++++++++++++++++++- docs/Tutorial-PassingArguments.md | 4 ++-- package.json | 2 +- resources/checkgit.sh | 14 ++++++------- resources/gitpublish.sh | 8 ++++---- 6 files changed, 47 insertions(+), 16 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 17bd6cdc41..5b330c66f2 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -42,7 +42,7 @@ Complete your CLA here: 2. Check out your fork ```sh - git clone git@github.com:yournamehere/graphql-js.git + git clone git@github.com:your_name_here/graphql-js.git ``` 3. Install or Update all dependencies diff --git a/cspell.json b/cspell.json index c69e776d22..6ae856c51d 100644 --- a/cspell.json +++ b/cspell.json @@ -1,10 +1,38 @@ { "language": "en", "ignorePaths": [ + // Copied from '.gitignore', please keep it in sync. + ".eslintcache", + "node_modules", + "coverage", + "npmDist", + "denoDist", + "benchmarkDist", + "integrationTmp", + "npm", + "deno", + + // Excluded from spelling check + "cspell.json", + "package.json", + "package-lock.json", + "tsconfig.json", "src/__fixtures__/github-schema.graphql", "src/__fixtures__/github-schema.json" ], + "overrides": [ + { + "filename": "**/docs/APIReference-*.md", + "ignoreRegExpList": ["/href=\"[^\"]*\"/"] + } + ], "words": [ + "graphiql", + "sublinks", + "subcommand", + "transpilation", + "instanceof", + // Different names used inside tests "Skywalker", "Leia", @@ -21,17 +49,20 @@ // TODO: contribute upstream "deno", + "codecov", // TODO: remove bellow words "Graphi", // GraphiQL "QL's", // GraphQL's "QLIs", // GraphQLIs* "QLID", // GraphQLID + "QLJS", // GraphQLJS "iface", "Reqs", "ORing", "FXXX", "XXXF", - "bfnrt" + "bfnrt", + "wrds" ] } diff --git a/docs/Tutorial-PassingArguments.md b/docs/Tutorial-PassingArguments.md index 9a1ada9f18..200f8c557d 100644 --- a/docs/Tutorial-PassingArguments.md +++ b/docs/Tutorial-PassingArguments.md @@ -6,7 +6,7 @@ permalink: /graphql-js/passing-arguments/ next: /graphql-js/object-types/ --- -Just like a REST API, it's common to pass arguments to an endpoint in a GraphQL API. By defining the arguments in the schema language, typechecking happens automatically. Each argument must be named and have a type. For example, in the [Basic Types documentation](/graphql-js/basic-types/) we had an endpoint called `rollThreeDice`: +Just like a REST API, it's common to pass arguments to an endpoint in a GraphQL API. By defining the arguments in the schema language, type checking happens automatically. Each argument must be named and have a type. For example, in the [Basic Types documentation](/graphql-js/basic-types/) we had an endpoint called `rollThreeDice`: ```graphql type Query { @@ -14,7 +14,7 @@ type Query { } ``` -Instead of hardcoding “three”, we might want a more general function that rolls `numDice` dice, each of which have `numSides` sides. We can add arguments to the GraphQL schema language like this: +Instead of hard-coding “three”, we might want a more general function that rolls `numDice` dice, each of which have `numSides` sides. We can add arguments to the GraphQL schema language like this: ```graphql type Query { diff --git a/package.json b/package.json index 3a02bc1676..f8016760c6 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "testonly:cover": "nyc npm run testonly", "prettier": "prettier --write --list-different .", "prettier:check": "prettier --check .", - "check:spelling": "cspell \"./{src/**/,resources/**/,integrationTests/**/}*.{js,ts,md,graphql}\"", + "check:spelling": "cspell '**/*'", "check:integrations": "mocha --full-trace integrationTests/*-test.js", "build:npm": "node resources/build-npm.js", "build:deno": "node resources/build-deno.js", diff --git a/resources/checkgit.sh b/resources/checkgit.sh index a080b42566..f8e942bc8e 100644 --- a/resources/checkgit.sh +++ b/resources/checkgit.sh @@ -13,18 +13,18 @@ git fetch; if [[ $? -ne 0 ]]; then exit 1; fi; # Extract useful information. -GITBRANCH=$(git branch -v 2> /dev/null | sed '/^[^*]/d'); -GITBRANCHNAME=$(echo "$GITBRANCH" | sed 's/* \([A-Za-z0-9_\-]*\).*/\1/'); -GITBRANCHSYNC=$(echo "$GITBRANCH" | sed 's/* [^[]*.\([^]]*\).*/\1/'); +GIT_BRANCH=$(git branch -v 2> /dev/null | sed '/^[^*]/d'); +GIT_BRANCH_NAME=$(echo "$GIT_BRANCH" | sed 's/* \([A-Za-z0-9_\-]*\).*/\1/'); +GIT_BRANCH_SYNC=$(echo "$GIT_BRANCH" | sed 's/* [^[]*.\([^]]*\).*/\1/'); # Check if master is checked out -if [ "$GITBRANCHNAME" != "master" ]; then - read -p "Git not on master but $GITBRANCHNAME. Continue? (y|N) " yn; +if [ "$GIT_BRANCH_NAME" != "master" ]; then + read -p "Git not on master but $GIT_BRANCH_NAME. Continue? (y|N) " yn; if [ "$yn" != "y" ]; then exit 1; fi; fi; # Check if branch is synced with remote -if [ "$GITBRANCHSYNC" != "" ]; then - read -p "Git not up to date but $GITBRANCHSYNC. Continue? (y|N) " yn; +if [ "$GIT_BRANCH_SYNC" != "" ]; then + read -p "Git not up to date but $GIT_BRANCH_SYNC. Continue? (y|N) " yn; if [ "$yn" != "y" ]; then exit 1; fi; fi; diff --git a/resources/gitpublish.sh b/resources/gitpublish.sh index 3da2ee9eaa..8f6214d2f2 100755 --- a/resources/gitpublish.sh +++ b/resources/gitpublish.sh @@ -5,7 +5,7 @@ # # "graphql": "git://github.com/graphql/graphql-js.git#npm" # -# Additionaly it use use to push Deno build to `deno` branch. +# Additionally it use use to push Deno build to `deno` branch. BRANCH=$1 DIST_DIR=$2 @@ -45,8 +45,8 @@ rm -rf $BRANCH/* cp -r $DIST_DIR/* $BRANCH/ # Reference current commit -HEADREV=`git rev-parse HEAD` -echo $HEADREV +HEAD_REV=`git rev-parse HEAD` +echo $HEAD_REV # Deploy cd $BRANCH @@ -56,7 +56,7 @@ git add -A . if git diff --staged --quiet; then echo "Nothing to publish" else - git commit -a -m "Deploy $HEADREV to '$BRANCH' branch" + git commit -a -m "Deploy $HEAD_REV to '$BRANCH' branch" git push > /dev/null 2>&1 echo "Pushed" fi