Skip to content

Commit 32ca9cb

Browse files
committed
Add cspell
1 parent 5d13c00 commit 32ca9cb

File tree

8 files changed

+2653
-193
lines changed

8 files changed

+2653
-193
lines changed

cspell.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
language: en
2+
useGitignore: true
3+
ignorePaths:
4+
# Excluded from spelling check
5+
- cspell.yml
6+
- package.json
7+
dictionaries:
8+
- fullstack
9+
10+
overrides:
11+
- filename: '**/*.svg'
12+
dictionaries:
13+
- html
14+
- fonts
15+
16+
- filename: 'README.md'
17+
dictionaries:
18+
- docker
19+
20+
words:
21+
- DDTHH
22+
- SFNS
23+
- Graphi # GraphiQL
24+
- SWAPI
25+
- markselection
26+
- foldmarker
27+
- foldgutter
28+
- guttermarker
29+
- activeline
30+
- lastline
31+
- nargs
32+
- keymap
33+
34+
- apisguru
35+
# Upstream
36+
- proxied
37+
- proxying
38+
- typeahead
39+
- scrollbars
40+
- subword
41+
- graphiql
42+
- iban

package-lock.json

Lines changed: 2597 additions & 180 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"node": ">= 12.x"
2222
},
2323
"scripts": {
24-
"preversion": "npm ci --ignore-scripts && npm test",
25-
"test": "npm run check && npm run prettier:check",
24+
"test": "npm run check && npm run prettier:check && npm run check:spelling",
2625
"check": "tsc --noEmit",
2726
"start": "nodemon src/index.ts",
2827
"debug": "ts-node --inspect --compilerOptions '{\"inlineSources\":true}' src/index.ts",
@@ -33,7 +32,8 @@
3332
"copy:editor": "mkdir \"dist/editor\" && cp src/editor/*.html dist/editor && cp src/editor/*.js dist/editor && cp src/editor/*.css dist/editor && cp src/editor/*.svg dist/editor",
3433
"build:all": "rm -rf dist && mkdir dist && npm run build:editor && npm run build:typescript && npm run copy:graphql && npm run copy:editor",
3534
"prettier": "prettier --cache --cache-strategy metadata --ignore-path .gitignore --write --list-different .",
36-
"prettier:check": "prettier --cache --cache-strategy metadata --ignore-path .gitignore --check ."
35+
"prettier:check": "prettier --cache --cache-strategy metadata --ignore-path .gitignore --check .",
36+
"check:spelling": "cspell --cache --no-progress '**/*'"
3737
},
3838
"dependencies": {
3939
"body-parser": "1.19.0",
@@ -59,6 +59,7 @@
5959
"classnames": "2.3.1",
6060
"codemirror": "5.60.0",
6161
"codemirror-graphql": "0.11.6",
62+
"cspell": "6.31.1",
6263
"css-loader": "3.5.3",
6364
"graphiql": "0.17.5",
6465
"marked": "1.1.0",

src/editor/GraphQLEditor/GraphQLEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default class GraphQLEditor extends React.Component<GraphQLEditorProps> {
114114
}
115115

116116
componentDidUpdate(prevProps) {
117-
// Ensure the changes caused by this update are not interpretted as
117+
// Ensure the changes caused by this update are not interpreted as
118118
// user-input changes which could otherwise result in an infinite
119119
// event loop.
120120
this.ignoreChangeEvent = true;

src/editor/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<title>GraphQL Faker</title>
1414
</head>
1515
<body>
16-
<div id="container" clsss="app-container"></div>
16+
<div id="container" class="app-container"></div>
1717
<script src="main.js"></script>
1818
</body>
1919
</html>

src/fake_definition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const fakeDefinitionAST = parse(/* GraphQL */ `
9191
dbEngine
9292
9393
"""
94-
By default returns dates beetween 2000-01-01 and 2030-01-01.
94+
By default returns dates between 2000-01-01 and 2030-01-01.
9595
Configure date format with options \`dateFormat\` \`dateFrom\` \`dateTo\`.
9696
"""
9797
date

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ parseCLI((options) => {
4343
.then((schema) => {
4444
const remoteSDL = new Source(
4545
printSchema(schema),
46-
`Inrospection from "${extendURL}"`,
46+
`Introspection from "${extendURL}"`,
4747
);
4848

4949
if (!userSDL) {
@@ -188,8 +188,8 @@ function prettyPrintValidationErrors(validationErrors: ValidationErrors) {
188188
log(
189189
chalk.red(
190190
subErrors.length > 1
191-
? `\nYour schema constains ${subErrors.length} validation errors: \n`
192-
: `\nYour schema constains a validation error: \n`,
191+
? `\nYour schema contains ${subErrors.length} validation errors: \n`
192+
: `\nYour schema contains a validation error: \n`,
193193
),
194194
);
195195

src/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ export function graphqlRequest(
5555
query,
5656
variables,
5757
}),
58-
}).then((responce) => {
59-
if (responce.ok) return responce.json();
60-
return responce.text().then((body) => {
61-
throw Error(`${responce.status} ${responce.statusText}\n${body}`);
58+
}).then((response) => {
59+
if (response.ok) return response.json();
60+
return response.text().then((body) => {
61+
throw Error(`${response.status} ${response.statusText}\n${body}`);
6262
});
6363
});
6464
}

0 commit comments

Comments
 (0)