Skip to content

Commit

Permalink
chore: Update cspell and fix issues
Browse files Browse the repository at this point in the history
- covert `cSpell.json` to `cspell.config.yaml`
- break up the word list into multiple dictionary files
- fix spelling issues
- Enable spell checking code for non-test files
  • Loading branch information
Jason3S committed Feb 14, 2024
1 parent fe1cff3 commit 4a7489a
Show file tree
Hide file tree
Showing 96 changed files with 996 additions and 848 deletions.
136 changes: 136 additions & 0 deletions .cspell/code-terms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# This file contains coding related terms
ALPHANUM
antiscript
APPLYCLASS
ARROWHEADSTYLE
ARROWTYPE
autonumber
axisl-line
Bigdecimal
birel
BIREL
bqstring
BQUOTE
bramp
BRKT
callbackargs
callbackname
classdef
classdefid
classentity
classname
COLONSEP
COMPOSIT_STATE
concat
controlx
controly
CSSCLASS
CYLINDEREND
CYLINDERSTART
datakey
DEND
descr
distp
distq
divs
docref
DOMID
doublecircle
DOUBLECIRCLEEND
DOUBLECIRCLESTART
DQUOTE
DSTART
edgesep
EMPTYSTR
enddate
ERDIAGRAM
flatmap
forwardable
frontmatter
funs
gantt
GENERICTYPE
getBoundarys
grammr
graphtype
interp
introdcued
INVTRAPEND
INVTRAPSTART
JDBC
jison
Kaufmann
keyify
LABELPOS
LABELTYPE
LEFTOF
Lexa
linebreak
LINETYPE
LINKSTYLE
LLABEL
loglevel
LOGMSG
lookaheads
mdast
minlen
Mstartx
MULT
NODIR
NSTR
Qcontrolx
reinit
rels
reqs
rewritelinks
rgba
RIGHTOF
sankey
sequencenumber
shrc
signaltype
someclass
SPACELINE
SPACELIST
STADIUMEND
STADIUMSTART
startdate
startx
starty
STMNT
stopx
stopy
strikethrough
stringifying
struct
STYLECLASS
STYLEOPTS
subcomponent
subcomponents
SUBROUTINEEND
SUBROUTINESTART
Subschemas
substr
TAGEND
TAGSTART
techn
TESTSTR
TEXTDATA
TEXTLENGTH
titlevalue
topbar
TRAPEND
TRAPSTART
ts-nocheck
tsdoc
typeof
typestr
unshift
verifymethod
VERIFYMTHD
WARN_DOCSDIR_DOESNT_MATCH
xhost
yaxis
yfunc
yytext
zenuml
8 changes: 8 additions & 0 deletions .cspell/contributors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributors to mermaidjs, one per line
cpettitt
Dong Cai
Nikolay Rozhkov
Peng Xiao
subhash-halder
Vinod Sidharth
Ashish Jain
52 changes: 52 additions & 0 deletions .cspell/cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json

$schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json

dictionaryDefinitions:
- name: code-terms
path: ./code-terms.txt
description: A list of coding related terms.
addWords: true
- name: mermaid-terms
path: ./mermaid-terms.txt
description: A list of terms related to the mermaid project.
addWords: true
- name: misc-terms
path: ./misc-terms.txt
description: A list of miscellaneous terms.
- name: 3rd-party-terms
path: ./libraries.txt
description: A list of 3rd party terms from dependencies.
addWords: true
- name: contributors
path: ./contributors.txt
description: A list of contributors to the mermaid project.
type: 'W'
addWords: true

# cspell:disable
- name: suggestions
words:
- none
suggestWords:
- seperator:separator
- vertice:vertex
# cspell:enable

patterns:
- name: character-set-cyrillic
pattern: '/\p{Script_Extensions=Cyrillic}+/gu'
- name: svg-block
pattern: '<svg[\S\s]+?</svg>'
- name: json-property
pattern: '/"[\w/@-]+":/g'

dictionaries:
- mermaid-terms
- suggestions
- contributors

ignorePaths:
- '*.txt' # do not spell check local dictionaries

# cspell:dictionary misc-terms
69 changes: 69 additions & 0 deletions .cspell/libraries.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Add third party library terms below
acyclicer
Antlr
Appli
applitools
Asciidoctor
Astah
automerge
bilkent
bisheng
codedoc
Codemia
codepaths
csstree
cytoscape
cytoscape-cose-bilkent
dagre
dagre-d3
Deepdwn
Docsify
Docsy
DokuWiki
dompurify
elkjs
fontawesome
Foswiki
Gitea
graphlib
Grav
iconify
Inkdrop
jiti
jsdocs
jsfiddle
jsonschema
katex
khroma
mathml
matplotlib
mdbook
Mermerd
mkdocs
Nextra
nodenext
npmjs
pageview
pathe
phpbb
pixelmatch
Podlite
presetAttributify
pyplot
redmine
rehype
rscratch
sparkline
sphinxcontrib
ssim
stylis
Swimm
tsbuildinfo
Tuleap
Typora
unocss
unplugin
unstub
vite
vitest
Zune
39 changes: 39 additions & 0 deletions .cspell/mermaid-terms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Adamiecki
arrowend
bmatrix
braintree
catmull
compositTitleSize
doublecircle
elems
gantt
gitgraph
gzipped
knsv
Knut
marginx
marginy
Markdownish
mermaidjs
mindmap
mindmaps
multigraph
nodesep
NOTEGROUP
Pinterest
rankdir
ranksep
rect
rects
sandboxed
siebling
statediagram
substate
Sveidqvist
unfixable
Viewbox
viewports
visio
vitepress
xlink
xychart
4 changes: 4 additions & 0 deletions .cspell/misc-terms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
colour
colours
mitigations
newbranch
19 changes: 16 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ module.exports = {
'@cspell/spellchecker': [
'error',
{
checkIdentifiers: false,
checkStrings: false,
checkStringTemplates: false,
checkIdentifiers: true,
checkStrings: true,
checkStringTemplates: true,
},
],
'no-empty': [
Expand Down Expand Up @@ -159,6 +159,19 @@ module.exports = {
'@typescript-eslint/no-unused-vars': 'off',
},
},
{
files: ['*.spec.{ts,js}', 'tests/**', 'cypress/**/*.js'],
rules: {
'@cspell/spellchecker': [
'error',
{
checkIdentifiers: false,
checkStrings: false,
checkStringTemplates: false,
},
],
},
},
{
files: ['*.html', '*.md', '**/*.md/*'],
rules: {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ C -->|Two| E[Result 2]
```
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
loop HealthCheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
Expand All @@ -132,7 +132,7 @@ Bob-->>John: Jolly good!
```mermaid
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
loop HealthCheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ C -->|Two| E[Result 2]
```
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
loop HealthCheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
Expand All @@ -105,7 +105,7 @@ Bob-->>John: Jolly good!
```mermaid
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
loop HealthCheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
Expand Down
Loading

0 comments on commit 4a7489a

Please sign in to comment.