Skip to content

Commit 7692c08

Browse files
committed
fix typos in code and comments
1 parent a476a41 commit 7692c08

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

content-testing/validators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const dateRangeValidator = string().test(
8787
(value, context) => {
8888
if (!value) return true;
8989

90-
// yup is too leniant with `.date()` and allows broken string date formats
90+
// yup is too lenient with `.date()` and allows broken string date formats
9191
// we only want to allow `yyyy-mm-dd` or a full ISO 8601 date in UTC
9292
// see https://github.com/jquense/yup/blob/master/src/util/isodate.js
9393

gatsby/utils.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const timestampToSeconds = (timestamp) => {
3535
};
3636

3737
/**
38-
* Add computed seconds to an array of Timestamp objets (creates a new array).
38+
* Add computed seconds to an array of Timestamp objects (creates a new array).
3939
* @param {{ time: string }[]} timestamps
4040
* @returns {{ time: string, seconds: number }[]} the timestamps with computed seconds
4141
*/

node-scripts/tags-transforms.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ const tagsCleanup = memoTagsCleanup(wordReplacements, tagTransforms);
2222
o.languages = languages;
2323
o.topics = topics;
2424

25-
const udpatedSource = await prettier.format(JSON.stringify(o), {
25+
const updatedSource = await prettier.format(JSON.stringify(o), {
2626
parser: 'json'
2727
});
2828

29-
await writeFile(path, udpatedSource);
29+
await writeFile(path, updatedSource);
3030

3131
count++;
3232
}

node-scripts/utils.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe('memoTagsCleanup()', () => {
6565

6666
it('transforms individual common key words', () => {
6767
expect(tagsCleanup(['3d'])).toStrictEqual(['3D']);
68-
expect(tagsCleanup(['3d at begining'])).toStrictEqual(['3D at begining']);
68+
expect(tagsCleanup(['3d at beginning'])).toStrictEqual(['3D at beginning']);
6969
expect(tagsCleanup(['middle 3d keyword'])).toStrictEqual([
7070
'middle 3D keyword'
7171
]);

node-scripts/yt-description.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function parseTrack(track) {
108108
trackFolder = videoDirs[0];
109109
} else {
110110
// find max used directory
111-
trackFolder = findMaxOccurences(videoDirs);
111+
trackFolder = findMaxOccurrences(videoDirs);
112112
}
113113

114114
return {
@@ -310,10 +310,10 @@ function resolveYTLink(url) {
310310
}
311311

312312
/**
313-
* Finds the most occuring item in an array
313+
* Finds the most occurring item in an array
314314
* @param {string[]} arr array of items
315315
*/
316-
function findMaxOccurences(arr) {
316+
function findMaxOccurrences(arr) {
317317
const counts = {};
318318
for (const item of arr) {
319319
if (counts[item]) {

0 commit comments

Comments
 (0)