From 9bbe6907665c839542c231e8ca156a15082803b5 Mon Sep 17 00:00:00 2001 From: Ian Maddaus Date: Mon, 16 Oct 2023 14:22:39 -0400 Subject: [PATCH] Update cspell config (#4189) * Update cspell config Signed-off-by: Ian Maddaus * update file name in text Signed-off-by: Ian Maddaus --------- Signed-off-by: Ian Maddaus --- .github/workflows/lint.yml | 4 +-- Makefile | 2 +- cspell.json | 51 -------------------------------------- cspell.yaml | 49 ++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 54 deletions(-) delete mode 100644 cspell.json create mode 100644 cspell.yaml 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