From 6202ab5bcdbad832b9d3676f68cf61ac8bdfd58a Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Tue, 29 Nov 2022 11:35:00 -0700 Subject: [PATCH 1/3] feat: Use Svelte dictionary **Minor Breakage** - remove compatibility words. This might cause a few names to show up as misspellings. --- .../compatibility-words.txt | 17 --------------- .../compatibility-words.txt.gz | Bin 150 -> 0 bytes .../cspell-compatibility.json | 15 ------------- .../cspell-default.config.js | 6 +----- .../cspell-default.config.ts | 6 +----- packages/cspell-bundled-dicts/package.json | 1 + .../cspell/src/__snapshots__/app.test.ts.snap | 20 +++++++++--------- pnpm-lock.yaml | 6 ++++++ 8 files changed, 19 insertions(+), 52 deletions(-) delete mode 100644 packages/cspell-bundled-dicts/compatibility-words.txt delete mode 100644 packages/cspell-bundled-dicts/compatibility-words.txt.gz delete mode 100644 packages/cspell-bundled-dicts/cspell-compatibility.json diff --git a/packages/cspell-bundled-dicts/compatibility-words.txt b/packages/cspell-bundled-dicts/compatibility-words.txt deleted file mode 100644 index f85efd8e79a..00000000000 --- a/packages/cspell-bundled-dicts/compatibility-words.txt +++ /dev/null @@ -1,17 +0,0 @@ -# These words were added for backwards compatibility reasons. -# These are valid words / names, but are not yet found in any dictionaries. - -déjà -Éric -Español -Français -François -Inglés -Jérôme -Kévin -naïve -Noël -Orléans -René -Renée -Română diff --git a/packages/cspell-bundled-dicts/compatibility-words.txt.gz b/packages/cspell-bundled-dicts/compatibility-words.txt.gz deleted file mode 100644 index a1a5ed8071335ccff2d0ac717dfb207be37fcbf6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQdpiwFP!000006D`TH2?9Y7M&bOg;=p(tFjr7P;W}8(L00ExmYw4oFtQ6V zk;Om+I~WV|K$FJ@53{DTOw3_WWt%rAq8z$t)QASloCaWFIr>W(%M!)!G1*@_X(b2t zYFK+M{_Y7IuVWHy)gO#qnPwD2OXBrcLaV*s(Q@}=+BYhmy$Ys0jBl4sFMHy E0Ky?cy#N3J diff --git a/packages/cspell-bundled-dicts/cspell-compatibility.json b/packages/cspell-bundled-dicts/cspell-compatibility.json deleted file mode 100644 index 1e762ddb736..00000000000 --- a/packages/cspell-bundled-dicts/cspell-compatibility.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", - "version": "0.2", - "name": "cspell compatibility settings Json", - "id": "cspell-compatibility-json", - "readonly": true, - "dictionaryDefinitions": [ - { - "path": "./compatibility-words.txt.gz", - "description": "Some words with accents that should be considered correct.", - "name": "backwards-compatibility" - } - ], - "dictionaries": ["backwards-compatibility"] -} diff --git a/packages/cspell-bundled-dicts/cspell-default.config.js b/packages/cspell-bundled-dicts/cspell-default.config.js index 51e964beff3..0ebd5ea407e 100644 --- a/packages/cspell-bundled-dicts/cspell-default.config.js +++ b/packages/cspell-bundled-dicts/cspell-default.config.js @@ -50,10 +50,6 @@ const settings = { languageId: 'typescript,typescriptreact,mdx', dictionaries: ['typescript', 'node', 'npm'], }, - { - languageId: 'svelte', - dictionaries: ['typescript', 'npm', 'html', 'html-symbol-entities', 'css', 'fonts'], - }, { languageId: 'javascriptreact,typescriptreact,mdx', dictionaries: ['html', 'html-symbol-entities', 'css', 'fonts'], @@ -105,7 +101,6 @@ const settings = { ], enableFiletypes: ['svelte'], import: [ - './cspell-compatibility.json', '@cspell/dict-ada/cspell-ext.json', '@cspell/dict-aws/cspell-ext.json', '@cspell/dict-bash/cspell-ext.json', @@ -145,6 +140,7 @@ const settings = { '@cspell/dict-scala/cspell-ext.json', '@cspell/dict-sql/cspell-ext.json', '@cspell/dict-software-terms/cspell-ext.json', + '@cspell/dict-svelte/cspell-ext.json', '@cspell/dict-swift/cspell-ext.json', '@cspell/dict-typescript/cspell-ext.json', '@cspell/dict-vue/cspell-ext.json', diff --git a/packages/cspell-bundled-dicts/cspell-default.config.ts b/packages/cspell-bundled-dicts/cspell-default.config.ts index b23d3f764fc..009ed7fcf7a 100644 --- a/packages/cspell-bundled-dicts/cspell-default.config.ts +++ b/packages/cspell-bundled-dicts/cspell-default.config.ts @@ -53,10 +53,6 @@ const settings: AdvancedCSpellSettings = { languageId: 'typescript,typescriptreact,mdx', dictionaries: ['typescript', 'node', 'npm'], }, - { - languageId: 'svelte', - dictionaries: ['typescript', 'npm', 'html', 'html-symbol-entities', 'css', 'fonts'], - }, { languageId: 'javascriptreact,typescriptreact,mdx', dictionaries: ['html', 'html-symbol-entities', 'css', 'fonts'], @@ -108,7 +104,6 @@ const settings: AdvancedCSpellSettings = { ], enableFiletypes: ['svelte'], import: [ - './cspell-compatibility.json', '@cspell/dict-ada/cspell-ext.json', '@cspell/dict-aws/cspell-ext.json', '@cspell/dict-bash/cspell-ext.json', @@ -148,6 +143,7 @@ const settings: AdvancedCSpellSettings = { '@cspell/dict-scala/cspell-ext.json', '@cspell/dict-sql/cspell-ext.json', '@cspell/dict-software-terms/cspell-ext.json', + '@cspell/dict-svelte/cspell-ext.json', '@cspell/dict-swift/cspell-ext.json', '@cspell/dict-typescript/cspell-ext.json', '@cspell/dict-vue/cspell-ext.json', diff --git a/packages/cspell-bundled-dicts/package.json b/packages/cspell-bundled-dicts/package.json index 22479a8558b..fc981cca3ab 100644 --- a/packages/cspell-bundled-dicts/package.json +++ b/packages/cspell-bundled-dicts/package.json @@ -84,6 +84,7 @@ "@cspell/dict-scala": "^3.0.0", "@cspell/dict-software-terms": "^3.0.5", "@cspell/dict-sql": "^2.0.0", + "@cspell/dict-svelte": "^1.0.0", "@cspell/dict-swift": "^2.0.0", "@cspell/dict-typescript": "^3.0.1", "@cspell/dict-vue": "^3.0.0" diff --git a/packages/cspell/src/__snapshots__/app.test.ts.snap b/packages/cspell/src/__snapshots__/app.test.ts.snap index d106798fc65..6672d5a0f7f 100644 --- a/packages/cspell/src/__snapshots__/app.test.ts.snap +++ b/packages/cspell/src/__snapshots__/app.test.ts.snap @@ -338,7 +338,7 @@ info info Checking: ./src/app.test.ts, File type: auto, Language: default info Checked: ./src/app.test.ts, File type: typescript, Language: en ... Issues: 0 0.00S info Config file Used: ./cspell.json -info Dictionaries Used: backwards-compatibility, companies, filetypes, public-licenses, softwareTerms, workspace, aws, cryptocurrencies, en_us, fullstack, node, npm, typescript +info Dictionaries Used: companies, filetypes, public-licenses, softwareTerms, workspace, aws, cryptocurrencies, en_us, fullstack, node, npm, typescript error 0.00ms error CSpell: Files checked: 1, Issues found: 0 in 0 files" `; @@ -395,7 +395,7 @@ info info Checking: ./fixtures/issue-2998/fix-words.txt, File type: fix, Language: default info Checked: ./fixtures/issue-2998/fix-words.txt, File type: fix, Language: en ... Issues: 0 0.00S info Config file Used: ./fixtures/issue-2998/cspell.json -info Dictionaries Used: backwards-compatibility, companies, filetypes, public-licenses, softwareTerms, aws, cryptocurrencies, en_us, fixture +info Dictionaries Used: companies, filetypes, public-licenses, softwareTerms, aws, cryptocurrencies, en_us, fixture error 0.00ms error CSpell: Files checked: 1, Issues found: 0 in 0 files" `; @@ -726,7 +726,6 @@ café - [ignoreWords]* From Settings \`ignoreWords\` café - [words]* From Settings \`words\` café - ada ../../node_modules/.pnpm...ell/dict-ada/dict/ada.txt café - aws* ../../node_modules/.pnpm...spell/dict-aws/aws.txt.gz -café - backwards-compatibi* ../cspell-bundled-dicts/compatibility-words.txt.gz café - bash ../../node_modules/.pnpm...-bash/dict/bash-words.txt café - companies* ../../node_modules/.pnpm...panies/dict/companies.txt café - cpp ../../node_modules/.pnpm...spell/dict-cpp/cpp.txt.gz @@ -766,6 +765,7 @@ café - rust ../../node_modules/.pnpm...ell/dict-rust/rust.txt. café - scala ../../node_modules/.pnpm...l/dict-scala/scala.txt.gz café - softwareTerms* ../../node_modules/.pnpm...ms/dict/softwareTerms.txt café - sql ../../node_modules/.pnpm...spell/dict-sql/sql.txt.gz +café - svelte ../../node_modules/.pnpm...ct-svelte/dict/svelte.txt café - swift ../../node_modules/.pnpm...l/dict-swift/swift.txt.gz café - typescript ../../node_modules/.pnpm...cript/dict/typescript.txt café - workspace* ../../cspell-dict.txt" @@ -780,7 +780,6 @@ hello - [ignoreWords]* From Settings \`ignoreWords\` hello - [words]* From Settings \`words\` hello - ada ../../node_modules/.pnpm...ll/dict-ada/dict/ada.txt hello - aws* ../../node_modules/.pnpm...pell/dict-aws/aws.txt.gz -hello - backwards-compatibi* ../cspell-bundled-dicts/compatibility-words.txt.gz hello - bash ../../node_modules/.pnpm...bash/dict/bash-words.txt hello - companies* ../../node_modules/.pnpm...anies/dict/companies.txt hello * cpp ../../node_modules/.pnpm...pell/dict-cpp/cpp.txt.gz @@ -820,6 +819,7 @@ hello - rust ../../node_modules/.pnpm...ll/dict-rust/rust.txt.gz hello - scala ../../node_modules/.pnpm.../dict-scala/scala.txt.gz hello - softwareTerms* ../../node_modules/.pnpm...s/dict/softwareTerms.txt hello - sql ../../node_modules/.pnpm...pell/dict-sql/sql.txt.gz +hello - svelte ../../node_modules/.pnpm...t-svelte/dict/svelte.txt hello - swift ../../node_modules/.pnpm.../dict-swift/swift.txt.gz hello - typescript ../../node_modules/.pnpm...ript/dict/typescript.txt hello - workspace* ../../cspell-dict.txt" @@ -834,7 +834,6 @@ hello - [ignoreWords]* From Settings \`ignoreWords\` hello - [words]* From Settings \`words\` hello - ada ../../node_modules/.pnpm...ll/dict-ada/dict/ada.txt hello - aws* ../../node_modules/.pnpm...pell/dict-aws/aws.txt.gz -hello - backwards-compatibi* ../cspell-bundled-dicts/compatibility-words.txt.gz hello - bash ../../node_modules/.pnpm...bash/dict/bash-words.txt hello - companies* ../../node_modules/.pnpm...anies/dict/companies.txt hello * cpp ../../node_modules/.pnpm...pell/dict-cpp/cpp.txt.gz @@ -874,6 +873,7 @@ hello - rust ../../node_modules/.pnpm...ll/dict-rust/rust.txt.gz hello - scala ../../node_modules/.pnpm.../dict-scala/scala.txt.gz hello - softwareTerms* ../../node_modules/.pnpm...s/dict/softwareTerms.txt hello - sql ../../node_modules/.pnpm...pell/dict-sql/sql.txt.gz +hello - svelte ../../node_modules/.pnpm...t-svelte/dict/svelte.txt hello - swift ../../node_modules/.pnpm.../dict-swift/swift.txt.gz hello - typescript ../../node_modules/.pnpm...ript/dict/typescript.txt hello - workspace* ../../cspell-dict.txt" @@ -1049,7 +1049,6 @@ café - [ignoreWords]* From Settings \`ignoreWords\` café - [words]* From Settings \`words\` café - ada ../../node_modules/.pnpm...ell/dict-ada/dict/ada.txt café - aws* ../../node_modules/.pnpm...spell/dict-aws/aws.txt.gz -café - backwards-compatibi* ../cspell-bundled-dicts/compatibility-words.txt.gz café - bash ../../node_modules/.pnpm...-bash/dict/bash-words.txt café - companies* ../../node_modules/.pnpm...panies/dict/companies.txt café - cpp ../../node_modules/.pnpm...spell/dict-cpp/cpp.txt.gz @@ -1089,6 +1088,7 @@ café - rust ../../node_modules/.pnpm...ell/dict-rust/rust.txt. café - scala ../../node_modules/.pnpm...l/dict-scala/scala.txt.gz café - softwareTerms* ../../node_modules/.pnpm...ms/dict/softwareTerms.txt café - sql ../../node_modules/.pnpm...spell/dict-sql/sql.txt.gz +café - svelte ../../node_modules/.pnpm...ct-svelte/dict/svelte.txt café - swift ../../node_modules/.pnpm...l/dict-swift/swift.txt.gz café - typescript ../../node_modules/.pnpm...cript/dict/typescript.txt café - workspace* ../../cspell-dict.txt" @@ -1103,7 +1103,6 @@ hello - [ignoreWords]* From Settings \`ignoreWords\` hello - [words]* From Settings \`words\` hello - ada ../../node_modules/.pnpm...ll/dict-ada/dict/ada.txt hello - aws* ../../node_modules/.pnpm...pell/dict-aws/aws.txt.gz -hello - backwards-compatibi* ../cspell-bundled-dicts/compatibility-words.txt.gz hello - bash ../../node_modules/.pnpm...bash/dict/bash-words.txt hello - companies* ../../node_modules/.pnpm...anies/dict/companies.txt hello * cpp ../../node_modules/.pnpm...pell/dict-cpp/cpp.txt.gz @@ -1143,6 +1142,7 @@ hello - rust ../../node_modules/.pnpm...ll/dict-rust/rust.txt.gz hello - scala ../../node_modules/.pnpm.../dict-scala/scala.txt.gz hello - softwareTerms* ../../node_modules/.pnpm...s/dict/softwareTerms.txt hello - sql ../../node_modules/.pnpm...pell/dict-sql/sql.txt.gz +hello - svelte ../../node_modules/.pnpm...t-svelte/dict/svelte.txt hello - swift ../../node_modules/.pnpm.../dict-swift/swift.txt.gz hello - typescript ../../node_modules/.pnpm...ript/dict/typescript.txt hello - workspace* ../../cspell-dict.txt" @@ -1157,7 +1157,6 @@ hello - [ignoreWords]* From Settings \`ignoreWords\` hello - [words]* From Settings \`words\` hello - ada ../../node_modules/.pnpm...ll/dict-ada/dict/ada.txt hello - aws* ../../node_modules/.pnpm...pell/dict-aws/aws.txt.gz -hello - backwards-compatibi* ../cspell-bundled-dicts/compatibility-words.txt.gz hello - bash ../../node_modules/.pnpm...bash/dict/bash-words.txt hello - companies* ../../node_modules/.pnpm...anies/dict/companies.txt hello * cpp ../../node_modules/.pnpm...pell/dict-cpp/cpp.txt.gz @@ -1197,6 +1196,7 @@ hello - rust ../../node_modules/.pnpm...ll/dict-rust/rust.txt.gz hello - scala ../../node_modules/.pnpm.../dict-scala/scala.txt.gz hello - softwareTerms* ../../node_modules/.pnpm...s/dict/softwareTerms.txt hello - sql ../../node_modules/.pnpm...pell/dict-sql/sql.txt.gz +hello - svelte ../../node_modules/.pnpm...t-svelte/dict/svelte.txt hello - swift ../../node_modules/.pnpm.../dict-swift/swift.txt.gz hello - typescript ../../node_modules/.pnpm...ript/dict/typescript.txt hello - workspace* ../../cspell-dict.txt" @@ -1239,7 +1239,6 @@ hello - [ignoreWords]* From Settings \`ignoreWords\` hello - [words]* From Settings \`words\` hello - ada ../../node_modules/.pnpm...ll/dict-ada/dict/ada.txt hello - aws* ../../node_modules/.pnpm...pell/dict-aws/aws.txt.gz -hello - backwards-compatibi* ../cspell-bundled-dicts/compatibility-words.txt.gz hello - bash ../../node_modules/.pnpm...bash/dict/bash-words.txt hello - companies* ../../node_modules/.pnpm...anies/dict/companies.txt hello * cpp ../../node_modules/.pnpm...pell/dict-cpp/cpp.txt.gz @@ -1281,6 +1280,7 @@ hello - rust ../../node_modules/.pnpm...ll/dict-rust/rust.txt.gz hello - scala ../../node_modules/.pnpm.../dict-scala/scala.txt.gz hello - softwareTerms* ../../node_modules/.pnpm...s/dict/softwareTerms.txt hello - sql ../../node_modules/.pnpm...pell/dict-sql/sql.txt.gz +hello - svelte ../../node_modules/.pnpm...t-svelte/dict/svelte.txt hello - swift ../../node_modules/.pnpm.../dict-swift/swift.txt.gz hello - typescript ../../node_modules/.pnpm...ript/dict/typescript.txt hello - workspace* ../../cspell-dict.txt" @@ -1295,7 +1295,6 @@ not-in-any-dictionary - [ignoreWords]* From Settings \`ignoreWords\` not-in-any-dictionary - [words]* From Settings \`words\` not-in-any-dictionary - ada ../../node_modul...ada/dict/ada.txt not-in-any-dictionary - aws* ../../node_modul...t-aws/aws.txt.gz -not-in-any-dictionary - backwards-compatibi* ../cspell-bundle...ity-words.txt.gz not-in-any-dictionary - bash ../../node_modul...t/bash-words.txt not-in-any-dictionary - companies* ../../node_modul...ct/companies.txt not-in-any-dictionary - cpp ../../node_modul...t-cpp/cpp.txt.gz @@ -1335,6 +1334,7 @@ not-in-any-dictionary - rust ../../node_modul...rust/rust.txt.gz not-in-any-dictionary - scala ../../node_modul...ala/scala.txt.gz not-in-any-dictionary - softwareTerms* ../../node_modul...oftwareTerms.txt not-in-any-dictionary - sql ../../node_modul...t-sql/sql.txt.gz +not-in-any-dictionary - svelte ../../node_modul.../dict/svelte.txt not-in-any-dictionary - swift ../../node_modul...ift/swift.txt.gz not-in-any-dictionary - typescript ../../node_modul...t/typescript.txt not-in-any-dictionary - workspace* ../../cspell-dict.txt" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49c33663a41..f93ec7d0a65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -217,6 +217,7 @@ importers: '@cspell/dict-scala': ^3.0.0 '@cspell/dict-software-terms': ^3.0.5 '@cspell/dict-sql': ^2.0.0 + '@cspell/dict-svelte': ^1.0.0 '@cspell/dict-swift': ^2.0.0 '@cspell/dict-typescript': ^3.0.1 '@cspell/dict-vue': ^3.0.0 @@ -260,6 +261,7 @@ importers: '@cspell/dict-scala': 3.0.0 '@cspell/dict-software-terms': 3.0.5 '@cspell/dict-sql': 2.0.0 + '@cspell/dict-svelte': 1.0.0 '@cspell/dict-swift': 2.0.0 '@cspell/dict-typescript': 3.0.1 '@cspell/dict-vue': 3.0.0 @@ -2504,6 +2506,10 @@ packages: resolution: {integrity: sha512-J3X8VSgWpc/4McQEs138abtBw/SO3Z+vGaYi5X7XV1pKPBxjupHTTNQHSS/HWUDmVWj6fR3OV+ZGptcmvv3Clg==} dev: false + /@cspell/dict-svelte/1.0.0: + resolution: {integrity: sha512-5mE1bPMv+0Zdv6fiaHw86kZ47FhqNy9waUyGOT/wSWf6M5lxCZ3ze15rDruit6/62DaYo7A4/1dgKxpRo6/ZBQ==} + dev: false + /@cspell/dict-swift/2.0.0: resolution: {integrity: sha512-VStJ0fKPPNIXKmxJrbGH6vKNtJCwAnQatfSH0fVj+Unf3QHHlmuLKRG0cN0aVgEIolpRkxNXJcSB3CPbYr0Xhw==} dev: false From e5cf6ceae77d02579db3141ecb2b6b5d3c2ad60b Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Tue, 29 Nov 2022 12:07:49 -0700 Subject: [PATCH 2/3] Update cspell-default.config.ts --- .../cspell-default.config.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/cspell-bundled-dicts/cspell-default.config.ts b/packages/cspell-bundled-dicts/cspell-default.config.ts index 009ed7fcf7a..16cb0350a27 100644 --- a/packages/cspell-bundled-dicts/cspell-default.config.ts +++ b/packages/cspell-bundled-dicts/cspell-default.config.ts @@ -7,7 +7,22 @@ const settings: AdvancedCSpellSettings = { readonly: true, language: 'en', description: 'Default cspell configuration.', - words: [], + words: [ + 'déjà', + 'Éric', + 'Español', + 'Français', + 'François', + 'Inglés', + 'Jérôme', + 'Kévin', + 'naïve', + 'Noël', + 'Orléans', + 'René', + 'Renée', + 'Română', + ], flagWords: [], maxNumberOfProblems: 10000, ignorePaths: [], From dfd7459f967b04214796b722da8f42e2bf39df58 Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Tue, 29 Nov 2022 12:48:51 -0700 Subject: [PATCH 3/3] Update cspell-default.config.js --- .../cspell-default.config.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/cspell-bundled-dicts/cspell-default.config.js b/packages/cspell-bundled-dicts/cspell-default.config.js index 0ebd5ea407e..f5665ccc386 100644 --- a/packages/cspell-bundled-dicts/cspell-default.config.js +++ b/packages/cspell-bundled-dicts/cspell-default.config.js @@ -6,7 +6,22 @@ const settings = { readonly: true, language: 'en', description: 'Default cspell configuration.', - words: [], + words: [ + 'déjà', + 'Éric', + 'Español', + 'Français', + 'François', + 'Inglés', + 'Jérôme', + 'Kévin', + 'naïve', + 'Noël', + 'Orléans', + 'René', + 'Renée', + 'Română', + ], flagWords: [], maxNumberOfProblems: 10000, ignorePaths: [],