Skip to content

Commit bacffcf

Browse files
Add spellchecker (#2297)
1 parent e4ba457 commit bacffcf

File tree

4 files changed

+502
-6
lines changed

4 files changed

+502
-6
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ GraphQL.js is [MIT-licensed](https://github.com/graphql/graphql-js/blob/master/L
143143

144144
The `*.d.ts` files in this project are based on [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/54712a7e28090c5b1253b746d1878003c954f3ff/types/graphql) definitions written by:
145145

146+
<!--- spell-checker:disable -->
147+
146148
- TonyYang https://github.com/TonyPythoneer
147149
- Caleb Meredith https://github.com/calebmer
148150
- Dominic Watson https://github.com/intellix

cspell.json

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"language": "en",
3+
"ignorePaths": [
4+
"src/__fixtures__/github-schema.graphql",
5+
"src/__fixtures__/github-schema.json"
6+
],
7+
"words": [
8+
"jsutils",
9+
"tsutils",
10+
"iterall",
11+
"noflow",
12+
13+
// Different names used inside tests
14+
"Skywalker",
15+
"Leia",
16+
"Wilhuff",
17+
"Tarkin",
18+
"Artoo",
19+
"Threepio",
20+
"Odie",
21+
"Odie's",
22+
"Damerau",
23+
"Alderaan",
24+
"Tatooine",
25+
"astromech",
26+
"yuzhi",
27+
28+
// TODO: remove bellow words
29+
"Graphi", // GraphiQL
30+
"QL's", // GraphQL's
31+
"QLIs", // GraphQLIs*
32+
"QLID", // GraphQLID
33+
"iface",
34+
"Reqs",
35+
"ORing",
36+
"FXXX",
37+
"XXXF",
38+
"bfnrt",
39+
40+
// TODO: contribute to upstream dictionaries
41+
"ASTs",
42+
"adjacencies",
43+
"bigint",
44+
"bugfixes",
45+
"contravariant",
46+
"dedent",
47+
"deserialized",
48+
"dirent",
49+
"docstring",
50+
"erroring",
51+
"filepath",
52+
"filepaths",
53+
"hardcoded",
54+
"heredoc",
55+
"lexable",
56+
"lexed",
57+
"lexes",
58+
"lexing",
59+
"memoed",
60+
"memoization",
61+
"memoized",
62+
"memoizes",
63+
"memoizing",
64+
"nullability",
65+
"nullish",
66+
"passthrough",
67+
"polyfill",
68+
"promisify",
69+
"pubsub",
70+
"punctuator",
71+
"punctuators",
72+
"recurse",
73+
"recursing",
74+
"refetch",
75+
"stateful",
76+
"stringifies",
77+
"subfields",
78+
"subgraphs",
79+
"subtrees",
80+
"subtyped",
81+
"superset",
82+
"undefine",
83+
"unparsed"
84+
]
85+
}

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"node": ">= 10.x"
2525
},
2626
"scripts": {
27-
"test": "npm run prettier:check && npm run lint && npm run check && npm run testonly && npm run check:ts",
28-
"test:ci": "yarn check --integrity && npm run prettier:check && npm run lint -- --no-cache && npm run check && npm run testonly:cover && npm run check:ts && npm run build",
27+
"test": "npm run prettier:check && npm run lint && npm run check && npm run testonly && npm run check:ts && npm run check:spelling",
28+
"test:ci": "yarn check --integrity && npm run prettier:check && npm run lint -- --no-cache && npm run check && npm run testonly:cover && npm run check:ts && npm run check:spelling && npm run build",
2929
"testonly": "mocha --full-trace src/**/__tests__/**/*-test.js",
3030
"testonly:cover": "nyc npm run testonly",
3131
"lint": "eslint --cache src resources",
@@ -35,6 +35,7 @@
3535
"check": "flow check",
3636
"check:ts": "dtslint src",
3737
"check:cover": "node resources/check-cover.js && nyc report --nycrc-path .nycflowrc.yml",
38+
"check:spelling": "cspell \"./{src/**/,resources**/,}*.{js,ts,md,graphql}\"",
3839
"build": "node resources/build.js",
3940
"changelog": "node resources/gen-changelog.js",
4041
"preversion": ". ./resources/checkgit.sh",
@@ -52,6 +53,7 @@
5253
"@babel/register": "7.6.2",
5354
"babel-eslint": "10.0.3",
5455
"chai": "4.2.0",
56+
"cspell": "4.0.37",
5557
"dtslint": "2.0.2",
5658
"eslint": "6.7.2",
5759
"eslint-plugin-flowtype": "4.5.2",

0 commit comments

Comments
 (0)