Skip to content

Commit

Permalink
Run cspell on entire project (#2665)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jun 18, 2020
1 parent b511dfc commit 0e97527
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Expand Up @@ -42,7 +42,7 @@ Complete your CLA here: <https://code.facebook.com/cla>
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
Expand Down
33 changes: 32 additions & 1 deletion 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",
Expand All @@ -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"
]
}
4 changes: 2 additions & 2 deletions docs/Tutorial-PassingArguments.md
Expand Up @@ -6,15 +6,15 @@ 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 {
rollThreeDice: [Int]
}
```

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 {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down
14 changes: 7 additions & 7 deletions resources/checkgit.sh
Expand Up @@ -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;
8 changes: 4 additions & 4 deletions resources/gitpublish.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 0e97527

Please sign in to comment.