Skip to content

Commit f95b8e6

Browse files
committed
chore: check spelling too
1 parent 7b045c8 commit f95b8e6

14 files changed

+800
-32
lines changed

Diff for: .github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
check:
1717
- format
1818
- lint
19+
- spell
1920
- type
2021
name: Check ${{ matrix.check }}
2122
runs-on: ubuntu-latest

Diff for: README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import { schema } from './previous-step';
6161
// Create the GraphQL over HTTP Node request handler
6262
const handler = createHandler({ schema });
6363

64-
// Create a HTTP server using the listner on `/graphql`
64+
// Create a HTTP server using the listener on `/graphql`
6565
const server = http.createServer((req, res) => {
6666
if (req.url.startsWith('/graphql')) {
6767
handler(req, res);
@@ -560,8 +560,8 @@ const client = createClient({
560560

561561
</details>
562562

563-
<details id="migrating-express-grpahql">
564-
<summary><a href="#migrating-express-grpahql">🔗</a> Server handler migration from <a href="https://github.com/graphql/express-graphql">express-graphql</a></summary>
563+
<details id="migrating-express-graphql">
564+
<summary><a href="#migrating-express-graphql">🔗</a> Server handler migration from <a href="https://github.com/graphql/express-graphql">express-graphql</a></summary>
565565

566566
```diff
567567
import express from 'express';
@@ -630,7 +630,7 @@ const handler = createHandler({
630630
context: async (req, args) => {
631631
return getDynamicContext(req, args);
632632
},
633-
// or static context by supplying the value direcly
633+
// or static context by supplying the value directly
634634
});
635635
```
636636

Diff for: cspell.config.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/** @type {import('@cspell/cspell-types').CSpellSettings} */
2+
const config = {
3+
ignorePaths: ['CHANGELOG.md', 'implementations/*/README.md'],
4+
words: [
5+
'fastify',
6+
'deno',
7+
'postgraphile',
8+
'graphql',
9+
'pluggable',
10+
'whatwg',
11+
'hotchocolate',
12+
'instanceof',
13+
'privkey',
14+
'keyout',
15+
'newkey',
16+
'isomorphically',
17+
],
18+
};
19+
module.exports = config;

Diff for: docs/classes/client.NetworkError.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Error.constructor
5959

6060
**response**: `undefined` \| `Response`
6161

62-
The underlyig response thats considered an error.
62+
The underlying response thats considered an error.
6363

6464
Will be undefined when no response is received,
6565
instead an unexpected network error.

Diff for: docs/interfaces/client.ClientOptions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ errors are considered fatal and will be reported immediately.
139139

140140
You may implement your own waiting strategy by timing the resolution of the returned promise.
141141

142-
Useful for retrying requests that failed because the service is temporarely unavailable.
142+
Useful for retrying requests that failed because the service is temporarily unavailable.
143143

144144
`retries` argument counts actual retries, so it will begin with
145145
0 after the first failed request.

Diff for: docs/interfaces/common.Sink.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ___
3838

3939
**error**(`error`): `void`
4040

41-
An error that has occured. This function "closes" the sink.
41+
An error that has occurred. This function "closes" the sink.
4242

4343
#### Parameters
4444

Diff for: docs/interfaces/handler.HandlerOptions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ ___
6868
`Optional` **formatError**: [`FormatError`](../modules/handler.md#formaterror)
6969

7070
Format handled errors to your satisfaction. Either GraphQL errors
71-
or safe request processing errors are meant by "handleded errors".
71+
or safe request processing errors are meant by "handled errors".
7272

73-
If multiple errors have occured, all of them will be mapped using
73+
If multiple errors have occurred, all of them will be mapped using
7474
this formatter.
7575

7676
___

Diff for: docs/modules/handler.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ___
7676

7777
▸ (`req`): `Promise`<[`Response`](handler.md#response)\>
7878

79-
The ready-to-use handler. Simply plug it in your favourite HTTP framework
79+
The ready-to-use handler. Simply plug it in your favorite HTTP framework
8080
and enjoy.
8181

8282
Errors thrown from **any** of the provided options or callbacks (or even due to
@@ -113,7 +113,7 @@ ___
113113

114114
A concrete GraphQL execution context value type.
115115

116-
Mainly used because TypeScript collapes unions
116+
Mainly used because TypeScript collapses unions
117117
with `any` or `unknown` to `any` or `unknown`. So,
118118
we use a custom type to allow definitions such as
119119
the `context` server option.
@@ -159,7 +159,7 @@ ___
159159
**createHandler**<`RequestRaw`, `RequestContext`, `Context`\>(`options`): [`Handler`](handler.md#handler)<`RequestRaw`, `RequestContext`\>
160160

161161
Makes a GraphQL over HTTP spec compliant server handler. The handler can
162-
be used with your favourite server library.
162+
be used with your favorite server library.
163163

164164
Beware that the handler resolves only after the whole operation completes.
165165

Diff for: package.json

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"check:format": "prettier --check .",
9595
"format": "yarn check:format --write",
9696
"check:lint": "eslint 'src'",
97+
"check:spell": "cspell --gitignore **/*.md",
9798
"check:type": "tsc --noEmit",
9899
"test": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 jest",
99100
"build:esm": "tsc -b tsconfig.esm.json && tsx scripts/esm-post-process.ts",
@@ -117,6 +118,7 @@
117118
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
118119
"@babel/preset-env": "^7.22.6",
119120
"@babel/preset-typescript": "^7.22.5",
121+
"@cspell/cspell-types": "^6.31.1",
120122
"@rollup/plugin-terser": "^0.4.3",
121123
"@rollup/plugin-typescript": "^11.1.2",
122124
"@semantic-release/changelog": "^6.0.3",
@@ -133,6 +135,7 @@
133135
"@typescript-eslint/parser": "^5.61.0",
134136
"@whatwg-node/fetch": "^0.9.7",
135137
"babel-jest": "^29.6.0",
138+
"cspell": "^6.31.1",
136139
"eslint": "^8.44.0",
137140
"eslint-config-prettier": "^8.8.0",
138141
"express": "^4.18.2",

Diff for: src/client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export interface ClientOptions {
9494
*
9595
* You may implement your own waiting strategy by timing the resolution of the returned promise.
9696
*
97-
* Useful for retrying requests that failed because the service is temporarely unavailable.
97+
* Useful for retrying requests that failed because the service is temporarily unavailable.
9898
*
9999
* `retries` argument counts actual retries, so it will begin with
100100
* 0 after the first failed request.
@@ -302,7 +302,7 @@ export class NetworkError<
302302
Response extends ResponseLike = ResponseLike,
303303
> extends Error {
304304
/**
305-
* The underlyig response thats considered an error.
305+
* The underlying response thats considered an error.
306306
*
307307
* Will be undefined when no response is received,
308308
* instead an unexpected network error.

Diff for: src/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface RequestParams {
2626
export interface Sink<T = unknown> {
2727
/** Next value arriving. */
2828
next(value: T): void;
29-
/** An error that has occured. This function "closes" the sink. */
29+
/** An error that has occurred. This function "closes" the sink. */
3030
error(error: unknown): void;
3131
/** The sink has completed. This function "closes" the sink. */
3232
complete(): void;

Diff for: src/handler.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function isResponse(val: unknown): val is Response {
140140
/**
141141
* A concrete GraphQL execution context value type.
142142
*
143-
* Mainly used because TypeScript collapes unions
143+
* Mainly used because TypeScript collapses unions
144144
* with `any` or `unknown` to `any` or `unknown`. So,
145145
* we use a custom type to allow definitions such as
146146
* the `context` server option.
@@ -324,16 +324,16 @@ export interface HandlerOptions<
324324
| void;
325325
/**
326326
* Format handled errors to your satisfaction. Either GraphQL errors
327-
* or safe request processing errors are meant by "handleded errors".
327+
* or safe request processing errors are meant by "handled errors".
328328
*
329-
* If multiple errors have occured, all of them will be mapped using
329+
* If multiple errors have occurred, all of them will be mapped using
330330
* this formatter.
331331
*/
332332
formatError?: FormatError;
333333
}
334334

335335
/**
336-
* The ready-to-use handler. Simply plug it in your favourite HTTP framework
336+
* The ready-to-use handler. Simply plug it in your favorite HTTP framework
337337
* and enjoy.
338338
*
339339
* Errors thrown from **any** of the provided options or callbacks (or even due to
@@ -348,7 +348,7 @@ export type Handler<RequestRaw = unknown, RequestContext = unknown> = (
348348

349349
/**
350350
* Makes a GraphQL over HTTP spec compliant server handler. The handler can
351-
* be used with your favourite server library.
351+
* be used with your favorite server library.
352352
*
353353
* Beware that the handler resolves only after the whole operation completes.
354354
*

Diff for: tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"babel.config.js",
2020
"jest.config.js",
2121
".eslintrc.js",
22-
"typedoc.js"
22+
"typedoc.js",
23+
"cspell.config.js"
2324
]
2425
}

0 commit comments

Comments
 (0)