From 8179af1e502977958f8eef8f39bd856aa672d3c9 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Mon, 7 Oct 2024 19:09:14 -0400 Subject: [PATCH 01/12] Reorganize custom dictionaries, better spell checking infra --- .github/workflows/auto-cleanup-bot.yml | 4 +- .github/workflows/pr-check_cspell_lists.yml | 3 +- .lintstagedrc.js | 10 +- .vscode/code-entities.txt | 809 +++ .vscode/cspell.json | 90 +- .vscode/cultural-words.txt | 73 + .vscode/ignore-list.txt | 5596 +------------------ .vscode/non-english.txt | 83 + .vscode/proper-names.txt | 631 +++ .vscode/terms-abbreviations.txt | 948 +++- scripts/sort_and_unique_file_lines.js | 71 +- tests/front-matter_test_files/values.md | 1 + 12 files changed, 2642 insertions(+), 5677 deletions(-) create mode 100644 .vscode/code-entities.txt create mode 100644 .vscode/cultural-words.txt create mode 100644 .vscode/non-english.txt create mode 100644 .vscode/proper-names.txt diff --git a/.github/workflows/auto-cleanup-bot.yml b/.github/workflows/auto-cleanup-bot.yml index 620555d775b641a..e7fe1a0cae163c0 100644 --- a/.github/workflows/auto-cleanup-bot.yml +++ b/.github/workflows/auto-cleanup-bot.yml @@ -31,8 +31,8 @@ jobs: yarn content fix-flaws yarn fix:md yarn fix:fm - node scripts/sort_and_unique_file_lines.js .vscode/ignore-list.txt - node scripts/sort_and_unique_file_lines.js .vscode/terms-abbreviations.txt + node scripts/sort_and_unique_file_lines.js .vscode/*.txt + node scripts/sort_and_unique_file_lines.js .vscode/*.txt - name: Create PR with only fixable issues if: success() diff --git a/.github/workflows/pr-check_cspell_lists.yml b/.github/workflows/pr-check_cspell_lists.yml index a40d41797fd9669..97d3aeace799443 100644 --- a/.github/workflows/pr-check_cspell_lists.yml +++ b/.github/workflows/pr-check_cspell_lists.yml @@ -29,5 +29,4 @@ jobs: - name: Check if cSpell word lists are in correct order run: | - node scripts/sort_and_unique_file_lines.js .vscode/ignore-list.txt --check - node scripts/sort_and_unique_file_lines.js .vscode/terms-abbreviations.txt --check + node scripts/sort_and_unique_file_lines.js --check .vscode/*.txt diff --git a/.lintstagedrc.js b/.lintstagedrc.js index decfb9664873fbd..aa53e4acf590cdd 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -17,10 +17,8 @@ export default { `yarn filecheck ${filenames.join(" ")}`, ], "*": (filenames) => [`node scripts/log-url-issues.js`], - ".vscode/ignore-list.txt": (filenames) => [ - `node scripts/sort_and_unique_file_lines.js .vscode/ignore-list.txt`, - ], - ".vscode/terms-abbreviations.txt": (filenames) => [ - `node scripts/sort_and_unique_file_lines.js .vscode/terms-abbreviations.txt`, - ], + ".vscode/{code-entities,ignore-list,non-english,proper-names,terms-abbreviations}.txt": + (filenames) => [ + `node scripts/sort_and_unique_file_lines.js ${filenames.join(" ")}`, + ], }; diff --git a/.vscode/code-entities.txt b/.vscode/code-entities.txt new file mode 100644 index 000000000000000..c873112b13ad5d0 --- /dev/null +++ b/.vscode/code-entities.txt @@ -0,0 +1,809 @@ +-moz-activehyperlinktext +-moz-buttondefault +-moz-buttonhoverface +-moz-buttonhovertext +-moz-cellhighlight +-moz-cellhighlighttext +-moz-dragtargetzone +-moz-fieldtext +-moz-hyperlinktext +-moz-lwtheme +-moz-lwtheme-brighttext +-moz-lwtheme-darktext +-moz-mac-accentdarkestshadow +-moz-mac-accentdarkshadow +-moz-mac-accentface +-moz-mac-accentlightesthighlight +-moz-mac-accentlightshadow +-moz-mac-accentregularhighlight +-moz-mac-accentregularshadow +-moz-mac-menuselect +-moz-mac-menushadow +-moz-mac-menutextselect +-moz-maemo-classic +-moz-menuhover +-moz-menuhovertext +-moz-nativehyperlinktext +-moz-pagebreak +-moz-pagecontent +-moz-samplesize +-moz-styleeditor-transitioning +-moz-visitedhyperlinktext +-moz-win-communicationstext +-moz-win-mediatext +accentcolor +accentcolortext +Accept-EncodXng +accessibility.disablecache +acodec +activetitlebarcolor +addstream +adduser +adlm +advertisementreceived +afrc +afterscriptexecute +alaw +allowdirs +allowdropevent +allowevents +ALLOWFROM +alternatingbackground +ALTGR +amssymb +android-safetynet +animalfound +anonid +apacheconf +apachectl +appcache +APPCOMMAND_MEDIA_PREVIOUSTRACK +appinstalled +appshell +appversion +appworld +arabext +armeabi +armn +armnlow +armv81 +arrowpanel +assetlinks +associationlist +associationlistitemkey +associationlistitemvalue +attributionsrc +audiocontext +authorid +backdrag +backgroundfetchabort +backgroundfetchclick +backgroundfetchfail +backgroundfetchsuccess +BACKTAB +Basetime +bbaw +beforeevicted +beforeinput +beforeinstallprompt +beforematch +beforescriptexecute +beforetoggle +beforexrselect +BGRX +bhks +bmatrix +BPPV1 +Brai +braillelabel +brailleroledescription +browser-bottombox +browser.safebrowsing +browser.sessionhistory +browsingtopics +bstack +buttondisabledaccept +CACHEDIR +cakm +canmakepayment +canvas.hitregions +cbcs +cdylib +certerror +characterboundsupdate +characteristicvaluechanged +chargingchange +chargingtimechange +chromedir +chromedriver +chromemargin +chromeos +chws +clipboardchange +clon +cnonce +colindextext +color-CBDT +color-colrv0 +color-colrv1 +color-sbix +colorMaskiOES +compositionend +compositionstart +compositionupdate +congres +Congrès +connectionavailable +contentaccessible +contentdelete +contentvisibilityautostatechange +contextlost +contextrestored +controlslist +cookiechange +cpanel-dcv +cqmax +cqmin +cros +crossdomain.xml +Crsel +cryptomining +csiso +csrfmiddlewaretoken +CSRFTOKEN +CSS_RGBCOLOR +csslint +cssruleview +ctron +ctrz +Cubehelix +currententrychange +currentscreenchange +cwrap +daala +dangi +deviceproximity +devtools.aboutdebugging +devtools.errorconsole +devtools.inspector.ruleview +devtools.netmonitor +devtools.webconsole +dialogheight +dialogleft +dialogtext +dialogtop +dialogwidth +diffe +disablechrome +disablefastfind +disableiOES +disablepictureinpicture +disableremoteplayback +dischargingtimechange +docbook +documentboundary +dom.abortablepromise +dom.element.customstateset +dom.input.dirpicker +dom.keyboardevent +dom.media.webcodecs +dom.screenorientation +dom.shadowdom +dom.webcomponents +dom.webcomponents.customelements +dom.webcomponents.shadowdom +dom.webnotifications.requireinteraction +dom.webnotifications.requireuserinteraction +dom.webshare +domxref +downdiagonalstrike +DPAD +DRAGDDROP +dragdrop +draggesture +drawintitlebar +dropmarker +ducet +dweb +ebuttm +ebutts +ECLF +ehtml +EISU +elementname +elementtiming +emcc +emconfigure +emmake +emodeng +emptytext +emsdk +enable-tracejit +enableiOES +enterpictureinpicture +equalsize +EquationiOES +ethi +ethioaa +exitpictureinpicture +exnref +Exsel +externref +fangsong +fencedframe +filecheck +FILLMODE_FILL_WINDOW +finishedtransferringdata +fiuv +font.mathfont-family +fontconfig +fontobject +fonts-lmodern +forloop.last +formdata +freearc +fullpage +fullscreenbutton +fullwide +FunciOES +funcref +fwdred +fwid +gattserverdisconnected +geometrychange +geor +gesturechange +gestureend +gesturestart +GETMATCHEDRULES +gfx.offscreencanvas +Glat +globoff +Gloc +gonm +GPOS +Grek +greklow +GSUB +gujr +gulpfile +hanidays +hanidec +hansfin +hantfin +hebr +highp +HMDVRDevice +hmng +hmnp +horizontalstrike +hsides +HTMLWBRElement +HTTPWG +hvline +iarc_rating_id +icccolor +IDOM +ifequal +ifnotequal +IIRFilter +imageset +imghp +imgur +implicit_jscontext +importmap +imscjs +inactivetitlebarcolor +indexeddb-examples +inputreport +inputsourceschange +intl.uidirection.locale +intrinsicsize +ipados +ipns +ircs +isarticle +islamic-rgsa +islamic-tbla +islamic-umalqura +islamicc +itts +IXML +jpan +jpanfin +jpanyear +jsapi.h +jscript +jsdouble +jspubtd.h +jsval +kaios +kerx +Key_Codeinput +KEY_dead_abovecomma +KEY_dead_abovedot +KEY_dead_abovereversedcomma +KEY_dead_abovering +KEY_dead_belowbreve +KEY_dead_belowcircumflex +KEY_dead_belowcomma +KEY_dead_belowdiaeresis +KEY_dead_belowdot +KEY_dead_belowmacron +KEY_dead_belowring +KEY_dead_belowtilde +KEY_dead_dasia +KEY_dead_doubleacute +KEY_dead_doublegrave +KEY_dead_invertedbreve +KEY_dead_perispomeni +KEY_dead_psili +KEY_dead_semivoiced_sound +keybase.txt +KEYCODE_ENDCALL +KEYCODE_HEADSETHOOK +KEYCODE_SYSRQ +keyids +keyint_min +keywordsearch +khmr +KIND_NONHEAP +knda +lanatham +laoo +largeop +latexmlc +Latf +layers.offmainthreadcomposition +leavepictureinpicture +legacycaller +lepc +levelchange +libfdk_aac +libvorbis +libvpx +libwebp +libwww +lineboundary +livescript +loadingdone +loadingerror +localecho +localstore +longdiv +longtask +lowdelay +lowp +lquote +ltrh +mathbb +mathbold +mathdbl +mathit +mathml +mathmono +mathrm +mathsanb +mathsans +mathtt +max-smbps +maxplaybackrate +media.autoplay.block-webaudio +media.getusermedia +media.mediasource +media.peerconnection +media.peerconnection.rtpsourcesapi +media.rvfc +media.setsinkid +media.webspeech +mediaelement +mediastream +mediummathspace +mediump +menupanel +merchantvalidation +meterbar +meterchunk +midimessage +miplevel +mkactivity +mkcol +mkvirtualenv +mlabeledtr +mlym +Mobi +mod_autoindex +modif +moof +moov +morx +movablelimits +movflags +mozactionhint +mozallowfullscreen +mozapp +mozbrowserlocationchange +mozconfig +mozvisibilitychanged +mpkg +mroo +mspowerpoint +msvideo +msword +mtei +mths +mymr +mymrshan +mymrtlng +nacl_arch +nalt +navigateerror +navigatesuccess +negativemediummathspace +negativethickmathspace +negativethinmathspace +negativeverythickmathspace +negativeverythinmathspace +negativeveryverythickmathspace +negativeveryverythinmathspace +neterror +network.http.referer.defaultPolicy.pbmode +newtab +nextslide +nexttrack +nkoo +noarchive +noautohide +nodownload +nofullscreen +noimageindex +nolint +noremoteplayback +notecard +notif +notificationbox +NPNVdocumentOrigin +NPNVDOM +NPNVprivateModeBool +NPNVserviceManager +NS_ERROR_SOCIALTRACKING_URI +NS_NOINTERFACE +nsIDNS +nsIINI +nsIJRI +nsISyncJPAKE +nsIUDP +nsIURI +nsIURL +nsIXSLT +nslookup +nsPIDOMWindow +nsresult +OEM_CUSEL +OEM_ENLW +oggz +Okhsl +Okhsv +olck +oldstyle +onbeforematch +onbeforetoggle +oncanmakepayment +oncharacterboundsupdate +oncontentvisibilityautostatechange +oncontextlost +oncontextrestored +oncurrententrychange +oncurrentscreenchange +ondequeue +ondispose +onefive +ongesturestart +onnavigate +onnavigateerror +onnavigatesuccess +onpagereveal +onpageswap +onpaymentrequest +onpointerrawupdate +onrtctransform +onscreenschange +onscrollend +onsinkchange +ontextformatupdate +ontextupdate +onuncapturederror +opendocument +openidconnect +openpgp4fpr +opensearchdescription +openxmlformats-officedocument +operatorname +org.mozilla.geckoview_example +org.w3.clearkey +ornm +orya +oscpu +osma +outbound-rtpp +overlayinfo +packetlossperc +pacparser +pactester +pagereveal +pageswap +paragraphboundary +parsererror +pasteintact +pastetofirst +payerdetailchange +paymentmethodchange +paymentrequest +pcast +peerjs +periodicsync +permessage +personaltoolbar +phonebk +PHPSESSID +PINGOTHER +pjpeg +PlatformNaclArch +platformversion +pmatrix +pnum +pointerrawupdate +popcnt +popovertarget +popovertargetaction +postactivate +postmkproject +powerefficient +prefwindow +premkproject +prerenderingchange +presentationml +prettyping +previousslide +previoustrack +prioritychange +privacy.antitracking.enableWebcompat +privacy.clearsitedata +privacy.globalprivacycontrol +privacy.restrict3rdpartystorage +privatebrowsingmode +prophoto-rgb +PUNCHTHROUGH +purgecaches +PVRTC +pwid +pythonanywhere +pyxpidl +quicktime +rcap +readingerror +readwriteflush +reflectionchange +removestream +replacewithcommas +replacewithspaces +RGBX +RGUI +richlistbox +rmvirtualenv +rohg +roletype +romanlow +rotr +roundedbox +rowindextext +rport +rquote +rspadd +RTCICECandidatePairStats +rtctransform +rtpmap +rustc +rustup +safariextz +SAMEORIGIN +samplerate +samr +sansserif +saucelabs +saur +scalethumbend +scalethumbstart +scalethumbtick +screenschange +scrollend +scts +sdcard +sdch +searchjl +searchplugins +sectionhead +security.insecure_connection_text.pbmode +seekbackward +seekforward +seekto +seeother +selectchange +selectend +seltype +sentenceboundary +SeparateiOES +serialno +serviceworker +setenvif +sharpyuv +shrd +shtm +Silf +sinkchange +sizemodechange +skipad +slnt +slotchange +smpl +smsto +SPACEBAR +speculationrules +spreadsheetml +sprop-parameter-sets +squeezeend +squeezestart +srgba8 +stackoverflow_url +streamfilter +stripsurroundingwhitespace +SUBDOCUMENT +sund +superspeed +SVGDOMElement +SVGHKernElement +SVGMPathElement +SVGVKernElement +svgz +swsh +tabbox +tabbrowser +tabs-closebutton +takr +talu +taml +tamldec +taskattribution +telu +testingbot-api +texlive +texlive-fontsextra +textformatupdate +textupdate +TEXTUREI +thickmathspace +thinmathspace +tibt +Timecount +tirh +titl +todoapp +togglecamera +togglemicrophone +toolbar-bgalignment +toolbar-bgimage +toolbaritem +toolbarpalette +toolboxid +topojson +topsrcdir +touchenter +touchleave +traditio +transferringdata +treecol +TYPE_IMAGESET +UBORed +uidb64 +ulaw +ulpfec +ultrafast +uncapturederror +unic +unihan +unixcksum +unixsum +updiagonalstrike +urange +urlbar +urlclassifier.trackingAnnotationTable +urpmi +usedtx +useinbandfec +usercontext-content +userhash +userproximity +utterleft +uvec +vaii +validlink +vcard +vcdiff +verticalstrike +verythickmathspace +verythinmathspace +veryverythickmathspace +veryverythinmathspace +videooutput +viewsource.css +VIRTUALENVWRAPPER +virtualkeyboardpolicy +VK_CRSEL +VK_EREOF +VK_EXSEL +VK_JUNJA +VK_LCONTROL +VK_LMENU +VK_LWIN +VK_MODECHANGE +VK_NONCONVERT +VK_NUMLOCK +VK_PINP +VK_PROCESSKEY +VK_RCONTROL +VK_RWIN +VK_WIN_OEM_FJ_JISHO +VK_WIN_OEM_FJ_LOYA +VK_WIN_OEM_FJ_MASSHOU +VK_WIN_OEM_FJ_ROYA +VK_WIN_OEM_FJ_TOUROKU +VK_WIN_OEM_WSCTRL +vmatrix +Vplugin +vrml +vsides +wara +wcho +wdth +weba +webappmanifest +webauthn +webbundle +webcal +webglcontextcreationerror +webglcontextlost +webglcontextrestored +webgpu +webidentity +webidl +webkitmouseforcechanged +webkitmouseforcedown +webkitmouseforceup +webkitmouseforcewillbegin +webmv +webrtc +webRTCIPHandlingPolicy +webshell +webtransport +WEBVTT +webxr +wentaway +wght +wimax +WM_MOUSEHWHEEL +WM_MOUSEWHEEL +wordprocessingml +workon +WORKON_HOME +writingsuggestions +wtai +x-abiword +X-cept-Encoding +x-ms-aria-flowfrom +xbitmap +xhgt +xloc +xpcnativewrappers +xpidl +xpinstall +xywh diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 0710edc9c1e1465..7c4b487fac107c9 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -6,6 +6,10 @@ "useGitignore": true, "dictionaries": [ "terms-abbreviations", + "cultural-words", + "proper-names", + "non-english", + "code-entities", "ignore-list", "bash", "css", @@ -32,16 +36,31 @@ ], "ignoreRegExpList": [ // macros - "{{\\s?\\w*\\(", - "{{EmbedInteractiveExample\\(.*\\)}}", - "{{EmbedLiveSample\\(.*\\)}}", - "{{EmbedYouTube\\(\"[\\w-]*\"\\)}}", - // TODO - add some details what these match - "\\(#\\w*\\)", + "{{\\s?\\w*", + "{{\\s*EmbedInteractiveExample\\(.*\\)\\s*}}", + "{{\\s*EmbedLiveSample\\(.*\\)\\s*}}", + "{{\\s*EmbedYouTube\\(.*\\)\\s*}}", + "{{\\s*EmbedGHLiveSample\\(.*\\)\\s*}}", + // Markdown links "\\]\\(\\S*\\)", - "\\*\\*\\w\\*\\*\\w*", - "\\*\\w\\*\\w*", + // Website references + "[\\w\\-.]+\\.(com|net|org|ac\\.uk)\\b", + // Things like "**J**ava**S**cript" + "\\*\\*\\w+\\*\\*\\w*", + "\\*\\w+\\*\\w*", "#[À-ž\\w-]*", + // Old Firefox interfaces + "nsIDOM\\w+", + // Don't check other scripts + "[\\u0370-\\u03FF]+", // Greek + "[\\u0400-\\u04FF]+", // Cyrillic + "[\\u0590-\\u05FF]+", // Hebrew + "[\\u0600-\\u06FF]+", // Arabic + "(\\uD835[\\uDC00-\\uDFFF])+", // Mathematical Alphanumeric Symbols + "(\\uD83A[\\uDD00-\\uDD5F])+", // Adlam script + // Percent-encoding + "[A-Za-z]*%[A-F0-9]{2}[A-Za-z]*", + // Various HTML attributes that often have non-word values "aria-activedescendant=\"(?:[^\\\"]+|\\.)*\"", "aria-controls=\"(?:[^\\\"]+|\\.)*\"", "aria-describedby=\"(?:[^\\\"]+|\\.)*\"", @@ -50,29 +69,76 @@ "aria-flowto=\"(?:[^\\\"]+|\\.)*\"", "aria-labelledby=\"(?:[^\\\"]+|\\.)*\"", "aria-owns=\"(?:[^\\\"]+|\\.)*\"", - "Base64", "class=\"(?:[^\\\"]+|\\.)*\"", "data-test-id=\"(?:[^\\\"]+|\\.)*\"", "for=\"(?:[^\\\"]+|\\.)*\"", - "HexValues", + "pattern=\"(?:[^\\\"]+|\\.)*\"", "href=\"(?:[^\\\"]+|\\.)*\"", - "(?<=id)=\"(?:[^\\\"]+|\\.)*\"", + "(?.* [--check]", + "Usage:\n\tnode scripts/sort_and_unique_file_lines.js [--check] [...filePaths]", ); process.exit(1); +} else { + const invalidFiles = filePaths.filter((filePath) => !fs.existsSync(filePath)); + if (invalidFiles.length) { + console.error(`Invalid file paths: ${invalidFiles.join(", ")}`); + process.exit(1); + } } const equalsIgnoreCase = (a, b) => a?.toLowerCase() === b?.toLowerCase(); -const uniq = []; -const content = fs.readFileSync(filePath, "utf-8"); -const lines = content.split("\n").sort((a, b) => { - a = a.toLowerCase(); - b = b.toLowerCase(); - return a < b ? -1 : a > b ? 1 : 0; -}); -for (let i = 0; i < lines.length; ) { - const line = lines[i]; - if (line.trim() !== "") { - uniq.push(line); - while (equalsIgnoreCase(line, lines[++i])); - } else { - i++; +for (const filePath of filePaths) { + const uniq = []; + const content = fs.readFileSync(filePath, "utf-8"); + const lines = content.split("\n").sort((a, b) => { + a = a.toLowerCase(); + b = b.toLowerCase(); + return a < b ? -1 : a > b ? 1 : 0; + }); + + for (let i = 0; i < lines.length; ) { + const line = lines[i]; + if (line.trim() !== "") { + uniq.push(line); + while (equalsIgnoreCase(line, lines[++i])); + } else { + i++; + } } -} -const sortedContent = uniq.join("\n") + "\n"; -if (check) { - if (content !== sortedContent) { - console.error( - `The file is not formatted properly. Run 'node scripts/sort_and_unique_file_lines.js ${filePath}' to format the file.`, - ); - process.exit(1); + const sortedContent = uniq.join("\n") + "\n"; + if (check) { + if (content !== sortedContent) { + console.error( + `The file is not formatted properly. Run 'node scripts/sort_and_unique_file_lines.js ${filePath}' to format the file.`, + ); + process.exitCode = 1; + } else { + console.log("The file looks good."); + } } else { - console.log("The file looks good."); - process.exit(0); + fs.writeFileSync(filePath, sortedContent); } } - -fs.writeFileSync(filePath, sortedContent); diff --git a/tests/front-matter_test_files/values.md b/tests/front-matter_test_files/values.md index 2e656fb66996295..5e70ce7e8df81c9 100644 --- a/tests/front-matter_test_files/values.md +++ b/tests/front-matter_test_files/values.md @@ -3,6 +3,7 @@ title: some api method() short-title: method() page-type: api-method1 status: + # cSpell:ignore depreceted - depreceted browser-compat: api.method spec-urls: .w3c.org/api/method From ca893c96720048ec2a9be7a5d6871e0583573d7b Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 9 Oct 2024 01:50:23 -0400 Subject: [PATCH 02/12] Update scripts/sort_and_unique_file_lines.js --- scripts/sort_and_unique_file_lines.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sort_and_unique_file_lines.js b/scripts/sort_and_unique_file_lines.js index d40a0d376d3345f..cc8d27da5ee1b1b 100644 --- a/scripts/sort_and_unique_file_lines.js +++ b/scripts/sort_and_unique_file_lines.js @@ -6,7 +6,7 @@ const filePaths = process.argv.slice(2); if (!filePaths.length) { console.error(`No file paths provided.`); console.warn( - "Usage:\n\tnode scripts/sort_and_unique_file_lines.js [--check] [...filePaths]", + "Usage:\n\tnode scripts/sort_and_unique_file_lines.js [--check] [filePaths...]", ); process.exit(1); } else { From 8cc54abb8d37b58da15644ff813d33b838c458b1 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 9 Oct 2024 01:54:18 -0400 Subject: [PATCH 03/12] Reorg files --- .github/workflows/auto-cleanup-bot.yml | 3 +-- .github/workflows/pr-check_cspell_lists.yml | 2 +- .github/workflows/spelling-check-bot.yml | 2 +- .lintstagedrc.js | 7 +++---- .vscode/cspell.json | 12 ++++++------ .vscode/{ => dictionaries}/code-entities.txt | 0 .vscode/{ => dictionaries}/cultural-words.txt | 0 .vscode/{ => dictionaries}/ignore-list.txt | 0 .vscode/{ => dictionaries}/non-english.txt | 0 .vscode/{ => dictionaries}/proper-names.txt | 0 .vscode/{ => dictionaries}/terms-abbreviations.txt | 0 scripts/sort_and_unique_file_lines.js | 2 +- 12 files changed, 13 insertions(+), 15 deletions(-) rename .vscode/{ => dictionaries}/code-entities.txt (100%) rename .vscode/{ => dictionaries}/cultural-words.txt (100%) rename .vscode/{ => dictionaries}/ignore-list.txt (100%) rename .vscode/{ => dictionaries}/non-english.txt (100%) rename .vscode/{ => dictionaries}/proper-names.txt (100%) rename .vscode/{ => dictionaries}/terms-abbreviations.txt (100%) diff --git a/.github/workflows/auto-cleanup-bot.yml b/.github/workflows/auto-cleanup-bot.yml index e7fe1a0cae163c0..f84438867f4e453 100644 --- a/.github/workflows/auto-cleanup-bot.yml +++ b/.github/workflows/auto-cleanup-bot.yml @@ -31,8 +31,7 @@ jobs: yarn content fix-flaws yarn fix:md yarn fix:fm - node scripts/sort_and_unique_file_lines.js .vscode/*.txt - node scripts/sort_and_unique_file_lines.js .vscode/*.txt + node scripts/sort_and_unique_file_lines.js .vscode/dictionaries/*.txt - name: Create PR with only fixable issues if: success() diff --git a/.github/workflows/pr-check_cspell_lists.yml b/.github/workflows/pr-check_cspell_lists.yml index 97d3aeace799443..bcdc0f96b71588d 100644 --- a/.github/workflows/pr-check_cspell_lists.yml +++ b/.github/workflows/pr-check_cspell_lists.yml @@ -29,4 +29,4 @@ jobs: - name: Check if cSpell word lists are in correct order run: | - node scripts/sort_and_unique_file_lines.js --check .vscode/*.txt + node scripts/sort_and_unique_file_lines.js --check .vscode/dictionaries/*.txt diff --git a/.github/workflows/spelling-check-bot.yml b/.github/workflows/spelling-check-bot.yml index f8eacc8444f979d..50e4544b20a1717 100644 --- a/.github/workflows/spelling-check-bot.yml +++ b/.github/workflows/spelling-check-bot.yml @@ -51,4 +51,4 @@ jobs: ${{ env.OUTPUT }} > [!TIP] - > To exclude words from the spellchecker, you can add valid words (web technology terms or abbreviations) to the [terms-abbreviations.txt](https://github.com/mdn/content/blob/main/.vscode/terms-abbreviations.txt) dictionary for IDE autocompletion. To ignore strings that are not words (\`AABBCC\` in code, for instance), you can add them to [ignore-list.txt](https://github.com/mdn/content/blob/main/.vscode/ignore-list.txt). + > If the word is actually valid, consider adding it to one of the dictionaries under `.vscode/dictionaries`. diff --git a/.lintstagedrc.js b/.lintstagedrc.js index aa53e4acf590cdd..838a8de976078ac 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -17,8 +17,7 @@ export default { `yarn filecheck ${filenames.join(" ")}`, ], "*": (filenames) => [`node scripts/log-url-issues.js`], - ".vscode/{code-entities,ignore-list,non-english,proper-names,terms-abbreviations}.txt": - (filenames) => [ - `node scripts/sort_and_unique_file_lines.js ${filenames.join(" ")}`, - ], + ".vscode/dictionaries/*.txt": (filenames) => [ + `node scripts/sort_and_unique_file_lines.js ${filenames.join(" ")}`, + ], }; diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 7c4b487fac107c9..eb7729e792b7448 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -97,13 +97,13 @@ "dictionaryDefinitions": [ { "name": "terms-abbreviations", - "path": "./terms-abbreviations.txt", + "path": "./dictionaries/terms-abbreviations.txt", "description": "Anything that may be used throughout the content: compound words, abbreviations, etc. They are considered as real words and will be suggested.", "addWords": true }, { "name": "cultural-words", - "path": "./cultural-words.txt", + "path": "./dictionaries/cultural-words.txt", "description": "Culture-specific names: currencies, calendars, languages, big cities, countries, etc.", "addWords": true }, @@ -116,28 +116,28 @@ // We recommend assessing applicability in the order the dictionaries are listed. { "name": "proper-names", - "path": "./proper-names.txt", + "path": "./dictionaries/proper-names.txt", "description": "Proper names: people, small towns, companies, products, fonts, online platform handles.", "addWords": false, "noSuggest": true }, { "name": "non-english", - "path": "./non-english.txt", + "path": "./dictionaries/non-english.txt", "description": "Non-English words. Note that some non-English words denote well-known concepts, such as \"Adlam script\" or \"Adis Ababa\", in which case they should be placed in cultural-words. This dictionary is intended for entire scripts for demonstrating non-English languages.", "addWords": false, "noSuggest": true }, { "name": "code-entities", - "path": "./code-entities.txt", + "path": "./dictionaries/code-entities.txt", "description": "This list contains compound words that aren't properly capitalized or obscure abbreviations that are only utilized by particular web APIs (e.g. HTML attributes, language codes, event names, etc.). Only include entities defined by standards or libraries here; variable names, strings, etc. that are created by MDN code examples should be added to ignore-list.", "addWords": false, "noSuggest": true }, { "name": "ignore-list", - "path": "./ignore-list.txt", + "path": "./dictionaries/ignore-list.txt", "description": "Other gibberish words that are used for specific purposes. For example, placeholder identifiers, random strings, URLs (all lowercase), hashes, filler texts, etc. For purposefully misspelled words and/or words that are likely typos in other contexts, consider using cSpell:ignore instead.", "addWords": false, "noSuggest": true diff --git a/.vscode/code-entities.txt b/.vscode/dictionaries/code-entities.txt similarity index 100% rename from .vscode/code-entities.txt rename to .vscode/dictionaries/code-entities.txt diff --git a/.vscode/cultural-words.txt b/.vscode/dictionaries/cultural-words.txt similarity index 100% rename from .vscode/cultural-words.txt rename to .vscode/dictionaries/cultural-words.txt diff --git a/.vscode/ignore-list.txt b/.vscode/dictionaries/ignore-list.txt similarity index 100% rename from .vscode/ignore-list.txt rename to .vscode/dictionaries/ignore-list.txt diff --git a/.vscode/non-english.txt b/.vscode/dictionaries/non-english.txt similarity index 100% rename from .vscode/non-english.txt rename to .vscode/dictionaries/non-english.txt diff --git a/.vscode/proper-names.txt b/.vscode/dictionaries/proper-names.txt similarity index 100% rename from .vscode/proper-names.txt rename to .vscode/dictionaries/proper-names.txt diff --git a/.vscode/terms-abbreviations.txt b/.vscode/dictionaries/terms-abbreviations.txt similarity index 100% rename from .vscode/terms-abbreviations.txt rename to .vscode/dictionaries/terms-abbreviations.txt diff --git a/scripts/sort_and_unique_file_lines.js b/scripts/sort_and_unique_file_lines.js index cc8d27da5ee1b1b..b6580d8070ed34b 100644 --- a/scripts/sort_and_unique_file_lines.js +++ b/scripts/sort_and_unique_file_lines.js @@ -1,7 +1,7 @@ import fs from "node:fs"; const check = process.argv[2] === "--check"; -const filePaths = process.argv.slice(2); +const filePaths = process.argv.slice(check ? 3 : 2); if (!filePaths.length) { console.error(`No file paths provided.`); From 3c9558ec58985caa8ea62d3c33f8e24adbcda404 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Mon, 28 Oct 2024 11:43:05 -0400 Subject: [PATCH 04/12] Updates --- .github/workflows/pr-check_cspell_lists.yml | 2 ++ .vscode/dictionaries/code-entities.txt | 9 +++++++++ .vscode/dictionaries/proper-names.txt | 1 + .vscode/dictionaries/terms-abbreviations.txt | 10 +++++++--- .../cross_browser_testing/automated_testing/index.md | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-check_cspell_lists.yml b/.github/workflows/pr-check_cspell_lists.yml index bcdc0f96b71588d..49a54ac665e50dc 100644 --- a/.github/workflows/pr-check_cspell_lists.yml +++ b/.github/workflows/pr-check_cspell_lists.yml @@ -30,3 +30,5 @@ jobs: - name: Check if cSpell word lists are in correct order run: | node scripts/sort_and_unique_file_lines.js --check .vscode/dictionaries/*.txt + # Let the shell expand the glob pattern for us + shell: bash diff --git a/.vscode/dictionaries/code-entities.txt b/.vscode/dictionaries/code-entities.txt index c873112b13ad5d0..d1cfbae09be8524 100644 --- a/.vscode/dictionaries/code-entities.txt +++ b/.vscode/dictionaries/code-entities.txt @@ -59,6 +59,7 @@ apachectl appcache APPCOMMAND_MEDIA_PREVIOUSTRACK appinstalled +appium_logs_url appshell appversion appworld @@ -128,6 +129,7 @@ color-colrv0 color-colrv1 color-sbix colorMaskiOES +commandfor compositionend compositionstart compositionupdate @@ -183,6 +185,7 @@ dischargingtimechange docbook documentboundary dom.abortablepromise +dom.closewatcher dom.element.customstateset dom.input.dirpicker dom.keyboardevent @@ -345,6 +348,7 @@ KEYCODE_HEADSETHOOK KEYCODE_SYSRQ keyids keyint_min +keyschange keywordsearch khmr KIND_NONHEAP @@ -509,6 +513,8 @@ onpointerrawupdate onrtctransform onscreenschange onscrollend +onscrollsnapchange +onscrollsnapchanging onsinkchange ontextformatupdate ontextupdate @@ -617,6 +623,8 @@ scalethumbstart scalethumbtick screenschange scrollend +scrollsnapchange +scrollsnapchanging scts sdcard sdch @@ -704,6 +712,7 @@ transferringdata treecol TYPE_IMAGESET UBORed +ufloat uidb64 ulaw ulpfec diff --git a/.vscode/dictionaries/proper-names.txt b/.vscode/dictionaries/proper-names.txt index da6c2fabbc1c292..c00abd4393cfec1 100644 --- a/.vscode/dictionaries/proper-names.txt +++ b/.vscode/dictionaries/proper-names.txt @@ -599,6 +599,7 @@ Wirfs wisedog Wolenetz Wrox +XAMPP Xiluodu Xiowan XITS diff --git a/.vscode/dictionaries/terms-abbreviations.txt b/.vscode/dictionaries/terms-abbreviations.txt index 5d2cc6bdec03bf0..0055db8f851c8fe 100644 --- a/.vscode/dictionaries/terms-abbreviations.txt +++ b/.vscode/dictionaries/terms-abbreviations.txt @@ -23,10 +23,10 @@ antialiasing antitracking APNG appcontent -arccosh +arcosh arcseconds -arcsinh -arctanh +arsinh +artanh ASCAP ascendingly ASCIIID @@ -70,6 +70,7 @@ bitstream bitstreams blackbox blackboxing +blendable blitting blockable blockified @@ -460,6 +461,7 @@ phishable phonebook phonorecord phonorecords +pillarboxed pingback pingbacks pingpong @@ -582,6 +584,7 @@ scopable screencast screenful scriptable +scrollers scrollport SECAM secp256r1 @@ -712,6 +715,7 @@ syncbase tablists tabstrip tada +Tanuki targetable taskbars taskboard diff --git a/files/en-us/learn/tools_and_testing/cross_browser_testing/automated_testing/index.md b/files/en-us/learn/tools_and_testing/cross_browser_testing/automated_testing/index.md index f0a29d12b7853df..42658b3c596da71 100644 --- a/files/en-us/learn/tools_and_testing/cross_browser_testing/automated_testing/index.md +++ b/files/en-us/learn/tools_and_testing/cross_browser_testing/automated_testing/index.md @@ -369,7 +369,7 @@ The available features vary depending on what browser is loaded, and can include - Accessing browser DevTools - Changing reported location - Throttling the network -- Accessing screenreaders +- Accessing screen readers #### Advanced: The BrowserStack API From f4ab66745a082c2a291fb12124ebc8076b381baf Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Mon, 28 Oct 2024 11:52:30 -0400 Subject: [PATCH 05/12] Apply suggestions from code review Co-authored-by: Onkar Khadangale <87750369+OnkarRuikar@users.noreply.github.com> --- .github/workflows/spelling-check-bot.yml | 2 +- .vscode/cspell.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/spelling-check-bot.yml b/.github/workflows/spelling-check-bot.yml index 50e4544b20a1717..6869ba085cfeee5 100644 --- a/.github/workflows/spelling-check-bot.yml +++ b/.github/workflows/spelling-check-bot.yml @@ -51,4 +51,4 @@ jobs: ${{ env.OUTPUT }} > [!TIP] - > If the word is actually valid, consider adding it to one of the dictionaries under `.vscode/dictionaries`. + > If the word is actually valid or it is required to be ignored, consider adding it to one of the dictionaries under [`.vscode/dictionaries`](https://github.com/mdn/content/tree/main/.vscode/dictionaries). diff --git a/.vscode/cspell.json b/.vscode/cspell.json index eb7729e792b7448..c1a4bc8ae91cae5 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -91,7 +91,6 @@ "csrftoken=\\w+", "csrfmiddlewaretoken=\\w+", "widget_session=\\w+", - "Urls", "ucaf:.*\"" ], "dictionaryDefinitions": [ From 998dc7cbfc122a22f499eea668b7ceca25705a8d Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Tue, 29 Oct 2024 09:07:33 -0400 Subject: [PATCH 06/12] Typo --- .vscode/dictionaries/code-entities.txt | 1 - .vscode/dictionaries/non-english.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/dictionaries/code-entities.txt b/.vscode/dictionaries/code-entities.txt index d1cfbae09be8524..7ea5888e3b5f4d0 100644 --- a/.vscode/dictionaries/code-entities.txt +++ b/.vscode/dictionaries/code-entities.txt @@ -134,7 +134,6 @@ compositionend compositionstart compositionupdate congres -Congrès connectionavailable contentaccessible contentdelete diff --git a/.vscode/dictionaries/non-english.txt b/.vscode/dictionaries/non-english.txt index 01047a55c2bfe62..b5b7b57a8d1eec0 100644 --- a/.vscode/dictionaries/non-english.txt +++ b/.vscode/dictionaries/non-english.txt @@ -7,6 +7,7 @@ canadien Català Ceci communiqué +Congrès contenido couleur dans From b60649a103a60eff93f23a9309247dc67775ce55 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Tue, 29 Oct 2024 09:11:21 -0400 Subject: [PATCH 07/12] Fix action --- .github/workflows/auto-cleanup-bot.yml | 2 +- .github/workflows/pr-check_cspell_lists.yml | 4 +--- scripts/sort_and_unique_file_lines.js | 17 +++++++++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-cleanup-bot.yml b/.github/workflows/auto-cleanup-bot.yml index f84438867f4e453..c3e23c58576680b 100644 --- a/.github/workflows/auto-cleanup-bot.yml +++ b/.github/workflows/auto-cleanup-bot.yml @@ -31,7 +31,7 @@ jobs: yarn content fix-flaws yarn fix:md yarn fix:fm - node scripts/sort_and_unique_file_lines.js .vscode/dictionaries/*.txt + node scripts/sort_and_unique_file_lines.js .vscode/dictionaries - name: Create PR with only fixable issues if: success() diff --git a/.github/workflows/pr-check_cspell_lists.yml b/.github/workflows/pr-check_cspell_lists.yml index 49a54ac665e50dc..fc8da7e5e212b66 100644 --- a/.github/workflows/pr-check_cspell_lists.yml +++ b/.github/workflows/pr-check_cspell_lists.yml @@ -29,6 +29,4 @@ jobs: - name: Check if cSpell word lists are in correct order run: | - node scripts/sort_and_unique_file_lines.js --check .vscode/dictionaries/*.txt - # Let the shell expand the glob pattern for us - shell: bash + node scripts/sort_and_unique_file_lines.js --check .vscode/dictionaries diff --git a/scripts/sort_and_unique_file_lines.js b/scripts/sort_and_unique_file_lines.js index b6580d8070ed34b..6afa757d592ef24 100644 --- a/scripts/sort_and_unique_file_lines.js +++ b/scripts/sort_and_unique_file_lines.js @@ -1,22 +1,31 @@ import fs from "node:fs"; const check = process.argv[2] === "--check"; -const filePaths = process.argv.slice(check ? 3 : 2); +const inputPaths = process.argv.slice(check ? 3 : 2); -if (!filePaths.length) { +if (!inputPaths.length) { console.error(`No file paths provided.`); console.warn( - "Usage:\n\tnode scripts/sort_and_unique_file_lines.js [--check] [filePaths...]", + "Usage:\n\tnode scripts/sort_and_unique_file_lines.js [--check] [inputPaths...]", ); process.exit(1); } else { - const invalidFiles = filePaths.filter((filePath) => !fs.existsSync(filePath)); + const invalidFiles = inputPaths.filter( + (filePath) => !fs.existsSync(filePath), + ); if (invalidFiles.length) { console.error(`Invalid file paths: ${invalidFiles.join(", ")}`); process.exit(1); } } +const filePaths = inputPaths.flatMap((arg) => { + if (fs.statSync(arg).isDirectory()) { + return fs.readdirSync(arg).map((file) => `${arg}/${file}`); + } + return arg; +}); + const equalsIgnoreCase = (a, b) => a?.toLowerCase() === b?.toLowerCase(); for (const filePath of filePaths) { From 00bf45cbddcf4fcf05107a33bfd986026d98381c Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Tue, 29 Oct 2024 09:24:43 -0400 Subject: [PATCH 08/12] Fix checkout --- .github/workflows/pr-check_cspell_lists.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-check_cspell_lists.yml b/.github/workflows/pr-check_cspell_lists.yml index fc8da7e5e212b66..eb3139a842d4953 100644 --- a/.github/workflows/pr-check_cspell_lists.yml +++ b/.github/workflows/pr-check_cspell_lists.yml @@ -5,8 +5,7 @@ on: branches: - main paths: - - .vscode/ignore-list.txt - - .vscode/terms-abbreviations.txt + - .vscode/dictionaries/* jobs: docs: @@ -16,8 +15,7 @@ jobs: with: sparse-checkout-cone-mode: false sparse-checkout: | - .vscode/ignore-list.txt - .vscode/terms-abbreviations.txt + .vscode/dictionaries/* .nvmrc package.json scripts/sort_and_unique_file_lines.js From 0c1c8db00cf191e510640c35cd1e53b9cf8ca2c2 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 30 Oct 2024 01:15:28 -0400 Subject: [PATCH 09/12] Update scripts/sort_and_unique_file_lines.js Co-authored-by: Onkar Khadangale <87750369+OnkarRuikar@users.noreply.github.com> --- scripts/sort_and_unique_file_lines.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sort_and_unique_file_lines.js b/scripts/sort_and_unique_file_lines.js index 6afa757d592ef24..c146edff4fb244d 100644 --- a/scripts/sort_and_unique_file_lines.js +++ b/scripts/sort_and_unique_file_lines.js @@ -55,7 +55,7 @@ for (const filePath of filePaths) { ); process.exitCode = 1; } else { - console.log("The file looks good."); + console.log(`The file ${filePath} looks good.`); } } else { fs.writeFileSync(filePath, sortedContent); From 90687d7b75ec609e597b7c4de952f7376a82c3df Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 30 Oct 2024 01:15:52 -0400 Subject: [PATCH 10/12] Update .vscode/cspell.json Co-authored-by: Onkar Khadangale <87750369+OnkarRuikar@users.noreply.github.com> --- .vscode/cspell.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index c1a4bc8ae91cae5..1aa417cc71e0a57 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -108,11 +108,11 @@ }, // Dictionaries below will not be suggested. // We are not dogmatic about where to put a word: for example, - // sometimes proper names are in terms-abbreviations because you are likely to use it. + // sometimes proper names are in terms-abbreviations dictionary because you are likely to use them. // There's no difference between these dictionaries; they only provide rough // divisions for easier management. For example, a proper name can be non-English, // and non-English words may be code entities. - // We recommend assessing applicability in the order the dictionaries are listed. + // We recommend assessing applicability in the order in which the dictionaries are listed. { "name": "proper-names", "path": "./dictionaries/proper-names.txt", From 847123336a52e62ea5fff08bb7c87bd0ab60139f Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 30 Oct 2024 01:23:37 -0400 Subject: [PATCH 11/12] Add docs --- .vscode/cspell.json | 14 ++++++++++---- .../writing_style_guide/index.md | 8 ++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 1aa417cc71e0a57..16154a9e2b0f183 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -94,6 +94,10 @@ "ucaf:.*\"" ], "dictionaryDefinitions": [ + // Note: when adding words to these lists, be as specific and contextualized + // as possible, to avoid typos being masked elsewhere. For example, all FF + // preferences should include prefixes: `dom.abortablepromise` instead of + // just `abortablepromise`, which may be missing a space in other contexts. { "name": "terms-abbreviations", "path": "./dictionaries/terms-abbreviations.txt", @@ -108,11 +112,13 @@ }, // Dictionaries below will not be suggested. // We are not dogmatic about where to put a word: for example, - // sometimes proper names are in terms-abbreviations dictionary because you are likely to use them. + // sometimes proper names are in terms-abbreviations dictionary because you + // are likely to use them. // There's no difference between these dictionaries; they only provide rough - // divisions for easier management. For example, a proper name can be non-English, - // and non-English words may be code entities. - // We recommend assessing applicability in the order in which the dictionaries are listed. + // divisions for easier management. For example, a proper name can be + // non-English, and non-English words may be code entities. + // We recommend assessing applicability in the order in which the + // dictionaries are listed. { "name": "proper-names", "path": "./dictionaries/proper-names.txt", diff --git a/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md b/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md index 92918a128e4b7dd..e98ac6da0f00ba5 100644 --- a/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md +++ b/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md @@ -373,6 +373,14 @@ Do not use variant spelling. - **Correct**: localize, behavior, color - **Incorrect**: localise, behaviour, colour +We have [cSpell](https://cspell.org/) installed to help you catch many spelling errors. It runs every week and generates a report of spelling errors in the repository. You can also run it locally via the following command: + +```bash +npx cspell --no-progress --gitignore --config .vscode/cspell.json "**/*.md" +``` + +In the repository, we maintain several word lists, located at [`.vscode/dictionaries`](https://github.com/mdn/content/tree/main/.vscode/dictionaries), that contain sanctioned words not in the default dictionaries. You can add more words to these lists if they are valid but reported by the spell checker. Read [`.vscode/cspell.json`](https://github.com/mdn/content/blob/main/.vscode/cspell.json) to understand what each dictionary contains and the details of our spell-checking configuration. + ### Terminology These are our recommendations for using certain technical terms: From 547262cb57c237ee1075f598ac07cbf634f662e2 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 30 Oct 2024 22:18:30 -0400 Subject: [PATCH 12/12] Update files/en-us/mdn/writing_guidelines/writing_style_guide/index.md Co-authored-by: Onkar Khadangale <87750369+OnkarRuikar@users.noreply.github.com> --- files/en-us/mdn/writing_guidelines/writing_style_guide/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md b/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md index e98ac6da0f00ba5..8dfeab4ea0e2a1f 100644 --- a/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md +++ b/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md @@ -373,7 +373,7 @@ Do not use variant spelling. - **Correct**: localize, behavior, color - **Incorrect**: localise, behaviour, colour -We have [cSpell](https://cspell.org/) installed to help you catch many spelling errors. It runs every week and generates a report of spelling errors in the repository. You can also run it locally via the following command: +We have [cSpell](https://cspell.org/) installed to catch spelling errors. It runs every week and generates [a report of spelling errors](https://github.com/mdn/content/issues?q=Weekly+spelling+check+is%3Aissue+in%3Atitle) in the repository. You can also run it locally via the following command: ```bash npx cspell --no-progress --gitignore --config .vscode/cspell.json "**/*.md"