@w5s/cspell-config 3.1.17 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/config.ts +1 -1
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/config.ts","../src/meta.ts"],"sourcesContent":["import type { AdvancedCSpellSettings } from '@cspell/cspell-types';\n\n// @ts-ignore CSpell config is not typed\nimport cSpellSettings from '@cspell/cspell-bundled-dicts/cspell-default.config.js';\n\nconst toArray = <T>(value: T | T
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/config.ts","../src/meta.ts"],"sourcesContent":["import type { AdvancedCSpellSettings } from '@cspell/cspell-types';\n\n// @ts-ignore CSpell config is not typed\nimport cSpellSettings from '@cspell/cspell-bundled-dicts/cspell-default.config.js';\n\nconst toArray = <T>(value: Array<T> | T | undefined) => (Array.isArray(value) ? value : value == null ? [] : [value]);\nconst defaultSettings = cSpellSettings as AdvancedCSpellSettings;\n// eslint-disable-next-line unicorn/no-useless-collection-argument\nconst excludeImport = new Set<string>([\n // Put here the imports you want to exclude\n]);\nconst dictionaryDefinitions: AdvancedCSpellSettings['dictionaryDefinitions'] = [\n {\n addWords: false,\n description: 'Additional file types',\n name: 'w5s-filetypes',\n path: '../dict/filetypes.txt',\n },\n {\n addWords: false,\n description: 'Fullstack terms',\n name: 'w5s-fullstack',\n path: '../dict/fullstack.txt',\n },\n {\n addWords: false,\n description: 'Typescript keywords',\n name: 'w5s-typescript',\n path: '../dict/typescript.txt',\n },\n {\n addWords: false,\n description: 'Known names',\n name: 'w5s-names',\n path: '../dict/names.txt',\n },\n {\n addWords: false,\n description: 'NPM packages',\n name: 'w5s-npm',\n path: '../dict/npm.txt',\n },\n];\n\nexport const config: AdvancedCSpellSettings = {\n ...defaultSettings,\n description: 'Default cspell configuration.',\n dictionaries: [\n ...toArray(defaultSettings.dictionaries),\n ...dictionaryDefinitions\n .map((dictionaryDefinition) => dictionaryDefinition.name)\n .filter((name) => !['w5s-typescript'].includes(name)),\n ],\n dictionaryDefinitions: [...toArray(defaultSettings.dictionaryDefinitions), ...dictionaryDefinitions],\n flagWords: [],\n id: 'w5s-default-js',\n ignorePaths: [\n ...toArray(defaultSettings.ignorePaths),\n '**/CHANGELOG.md',\n '**/__snapshots__/**',\n // '**/.git/**',\n '**/.vscode/**',\n '**/*.snap',\n '**/dist/**',\n '**/node_modules/**',\n '**/package.json',\n '**/package-lock.json',\n '**/renovate.json',\n '**/vscode-extension/**',\n '**/yarn.lock',\n '**/pnpm-lock.yaml',\n\n // Ignore common media files\n '**/*.svg',\n '**/*.webp',\n '**/*.webm',\n ],\n ignoreWords: [],\n import: toArray(defaultSettings.import).filter((dict) => !excludeImport.has(dict)),\n language: 'en',\n languageSettings: [\n ...toArray(defaultSettings.languageSettings),\n {\n dictionaries: ['w5s-typescript'],\n dictionaryDefinitions: [],\n ignoreRegExpList: ['js-hex-escape', 'js-unicode-escape', 'js-regexp-flags'],\n includeRegExpList: [],\n languageId: 'typescript,javascript,typescriptreact,javascriptreact',\n locale: '*',\n patterns: [],\n },\n {\n // eslint-disable-next-line unicorn/prefer-string-raw\n ignoreRegExpList: ['\\\\/\\\\* eslint-disable.+', '\\\\/\\\\/ eslint-disable.+'],\n languageId: 'typescript,javascript,typescriptreact,javascriptreact',\n locale: '*',\n },\n ],\n name: 'W5S default settings .js',\n useGitignore: true,\n words: [],\n};\n","export const meta = Object.freeze({\n // @ts-ignore - these variables are injected at build time\n buildNumber: 1 as number, // (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n // @ts-ignore - these variables are injected at build time\n name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,\n // @ts-ignore - these variables are injected at build time\n version: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,\n});\n"],"mappings":";;AAKA,MAAM,WAAc,UAAqC,MAAM,QAAQ,KAAK,IAAI,QAAQ,SAAS,OAAO,CAAC,IAAI,CAAC,KAAK;AACnH,MAAM,kBAAkB;AAExB,MAAM,gCAAgB,IAAI,IAAY,CAEtC,CAAC;AACD,MAAM,wBAAyE;CAC7E;EACE,UAAU;EACV,aAAa;EACb,MAAM;EACN,MAAM;CACR;CACA;EACE,UAAU;EACV,aAAa;EACb,MAAM;EACN,MAAM;CACR;CACA;EACE,UAAU;EACV,aAAa;EACb,MAAM;EACN,MAAM;CACR;CACA;EACE,UAAU;EACV,aAAa;EACb,MAAM;EACN,MAAM;CACR;CACA;EACE,UAAU;EACV,aAAa;EACb,MAAM;EACN,MAAM;CACR;AACF;AAEA,MAAa,SAAiC;CAC5C,GAAG;CACH,aAAa;CACb,cAAc,CACZ,GAAG,QAAQ,gBAAgB,YAAY,GACvC,GAAG,sBACA,KAAK,yBAAyB,qBAAqB,IAAI,CAAC,CACxD,QAAQ,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAC,SAAS,IAAI,CAAC,CACxD;CACA,uBAAuB,CAAC,GAAG,QAAQ,gBAAgB,qBAAqB,GAAG,GAAG,qBAAqB;CACnG,WAAW,CAAC;CACZ,IAAI;CACJ,aAAa;EACX,GAAG,QAAQ,gBAAgB,WAAW;EACtC;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;CACF;CACA,aAAa,CAAC;CACd,QAAQ,QAAQ,gBAAgB,MAAM,CAAC,CAAC,QAAQ,SAAS,CAAC,cAAc,IAAI,IAAI,CAAC;CACjF,UAAU;CACV,kBAAkB;EAChB,GAAG,QAAQ,gBAAgB,gBAAgB;EAC3C;GACE,cAAc,CAAC,gBAAgB;GAC/B,uBAAuB,CAAC;GACxB,kBAAkB;IAAC;IAAiB;IAAqB;GAAiB;GAC1E,mBAAmB,CAAC;GACpB,YAAY;GACZ,QAAQ;GACR,UAAU,CAAC;EACb;EACA;GAEE,kBAAkB,CAAC,2BAA2B,yBAAyB;GACvE,YAAY;GACZ,QAAQ;EACV;CACF;CACA,MAAM;CACN,cAAc;CACd,OAAO,CAAC;AACV;;;ACrGA,MAAa,OAAO,OAAO,OAAO;CAEhC,aAAa;CAEb,MAAA;CAEA,SAAA;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/cspell-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "CSpell configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cspell"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
57
|
"sideEffect": false,
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "2d215d8f8c7c57653b9f0ef5674ffc2e7beeea5c"
|
|
59
59
|
}
|
package/src/config.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { AdvancedCSpellSettings } from '@cspell/cspell-types';
|
|
|
3
3
|
// @ts-ignore CSpell config is not typed
|
|
4
4
|
import cSpellSettings from '@cspell/cspell-bundled-dicts/cspell-default.config.js';
|
|
5
5
|
|
|
6
|
-
const toArray = <T>(value: T | T
|
|
6
|
+
const toArray = <T>(value: Array<T> | T | undefined) => (Array.isArray(value) ? value : value == null ? [] : [value]);
|
|
7
7
|
const defaultSettings = cSpellSettings as AdvancedCSpellSettings;
|
|
8
8
|
// eslint-disable-next-line unicorn/no-useless-collection-argument
|
|
9
9
|
const excludeImport = new Set<string>([
|