diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f915ea08ce..c0cf06acb7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,8 +27,8 @@ jobs: incremental_files_only: true inline: error strict: true - # Path to `cspell.json` - config: 'cspell.json' + # Path to CSpell config file + config: 'cspell.yaml' markdownlint: runs-on: ubuntu-latest steps: diff --git a/Makefile b/Makefile index 04bdf3098f..6bbb4e2d80 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ lint: bundle ## See: ## - https://cspell.org/docs/getting-started/ ## - https://cspell.org/configuration/ -## - and cspell.json file. +## - and cspell.yaml file. spellcheck: cspell --no-progress "**/*.{md, html, js, yml, yaml, toml, json}" diff --git a/cspell.json b/cspell.json deleted file mode 100644 index 4feac995d7..0000000000 --- a/cspell.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - // Version of the setting file. Always 0.1 - "version": "0.2", - // language - current active spelling language - "language": "en_US", - "dictionaries": [ - "chef", - "docs" - ], - "dictionaryDefinitions": [ - { - "name": "chef", - "path": "https://raw.githubusercontent.com/chef/chef_dictionary/main/chef.txt", - "description": "Custom Chef Dictionary" - }, - { - "name": "docs", - "path": "https://raw.githubusercontent.com/chef/chef_dictionary/main/docs.txt", - "description": "Custom Docs Dictionary" - } - ], - // words - list of words to be always considered correct - // "words": [ - // ], - // flagWords - list of words to be always considered incorrect - // This is useful for offensive words and common spelling errors. - // For example "hte" should be "the" - "flagWords": [ - "hte" - ], - "ignorePaths": [ - ".expeditor/**/*", - "**/*.yml", - "**/*.toml", - "archetypes/*.md", - "_vendor/**/*", - "cspell.json", - "public/**", - "themes/docs-new/node_modules/**", - "resources/**" - ], - "ignoreRegExpList": [ - "/'s\\b/", - "/'d\\b/", - "/^\\s*```[\\s\\S]*?^\\s*```/gm", - "{{(.+)(?=}})" - ], - "words": [ - "Grammarly" - ] -} diff --git a/cspell.yaml b/cspell.yaml new file mode 100644 index 0000000000..878c215029 --- /dev/null +++ b/cspell.yaml @@ -0,0 +1,49 @@ +--- +# Version of the setting file. Always 0.2 +version: '0.2' + +# language - current active spelling language +language: en_US + +dictionaries: +- chef +- docs + +dictionaryDefinitions: +- name: chef + path: https://raw.githubusercontent.com/chef/chef_dictionary/main/chef.txt + description: Custom Chef Dictionary +- name: docs + path: https://raw.githubusercontent.com/chef/chef_dictionary/main/docs.txt + description: Custom Docs Dictionary + +# flagWords - list of words to be always considered incorrect +# This is useful for offensive words and common spelling errors. +# For example "hte" should be "the" + +flagWords: +- hte +ignorePaths: +- ".expeditor/**/*" +- "**/*.yml" +- "**/*.toml" +- archetypes/*.md +- _vendor/**/* +- cspell.yaml +- public/** +- themes/docs-new/node_modules/** +- resources/** + +# Ignore patterns list +# https://cspell.org/configuration/patterns/ +ignoreRegExpList: + # ignore URLs with predefined pattern - https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/lib/Settings/RegExpPatterns.ts#L3 +- Urls + # ignore URLs in a Markdown link +- "\\]\\([\\w|/|#|\\.|_|\\-]+\\)" +- "/'s\\b/" +- "/'d\\b/" +- "/^\\s*```[\\s\\S]*?^\\s*```/gm" +- "{{(.+)(?=}})" +words: +- Grammarly