@w5s/cspell-config 3.0.5 → 3.1.1

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 CHANGED
@@ -1,100 +1,101 @@
1
- import cSpellSettings from '@cspell/cspell-bundled-dicts/cspell-default.config.js';
2
-
3
- // src/index.ts
4
- var toArray = (value) => Array.isArray(value) ? value : value == null ? [] : [value];
5
- var defaultSettings = cSpellSettings;
6
- var excludeImport = /* @__PURE__ */ new Set([
7
- // Put here the imports you want to exclude
8
- ]);
9
- var dictionaryDefinitions = [
10
- {
11
- addWords: false,
12
- name: "w5s-filetypes",
13
- path: "../dict/filetypes.txt",
14
- description: "Additional file types"
15
- },
16
- {
17
- addWords: false,
18
- name: "w5s-fullstack",
19
- path: "../dict/fullstack.txt",
20
- description: "Fullstack terms"
21
- },
22
- {
23
- addWords: false,
24
- name: "w5s-typescript",
25
- path: "../dict/typescript.txt",
26
- description: "Typescript keywords"
27
- },
28
- {
29
- addWords: false,
30
- name: "w5s-names",
31
- path: "../dict/names.txt",
32
- description: "Known names"
33
- },
34
- {
35
- addWords: false,
36
- name: "w5s-npm",
37
- path: "../dict/npm.txt",
38
- description: "NPM packages"
39
- }
1
+ import cSpellSettings from "@cspell/cspell-bundled-dicts/cspell-default.config.js";
2
+ //#region src/meta.ts
3
+ const meta = Object.freeze({
4
+ name: "@w5s/cspell-config",
5
+ version: "3.1.1",
6
+ buildNumber: 1
7
+ });
8
+ //#endregion
9
+ //#region src/config.ts
10
+ const toArray = (value) => Array.isArray(value) ? value : value == null ? [] : [value];
11
+ const defaultSettings = cSpellSettings;
12
+ const excludeImport = /* @__PURE__ */ new Set([]);
13
+ const dictionaryDefinitions = [
14
+ {
15
+ addWords: false,
16
+ name: "w5s-filetypes",
17
+ path: "../dict/filetypes.txt",
18
+ description: "Additional file types"
19
+ },
20
+ {
21
+ addWords: false,
22
+ name: "w5s-fullstack",
23
+ path: "../dict/fullstack.txt",
24
+ description: "Fullstack terms"
25
+ },
26
+ {
27
+ addWords: false,
28
+ name: "w5s-typescript",
29
+ path: "../dict/typescript.txt",
30
+ description: "Typescript keywords"
31
+ },
32
+ {
33
+ addWords: false,
34
+ name: "w5s-names",
35
+ path: "../dict/names.txt",
36
+ description: "Known names"
37
+ },
38
+ {
39
+ addWords: false,
40
+ name: "w5s-npm",
41
+ path: "../dict/npm.txt",
42
+ description: "NPM packages"
43
+ }
40
44
  ];
41
- var settings = {
42
- ...defaultSettings,
43
- name: "W5S default settings .js",
44
- id: "w5s-default-js",
45
- language: "en",
46
- description: "Default cspell configuration.",
47
- words: [],
48
- flagWords: [],
49
- useGitignore: true,
50
- dictionaryDefinitions: [...toArray(defaultSettings.dictionaryDefinitions), ...dictionaryDefinitions],
51
- dictionaries: [
52
- ...toArray(defaultSettings.dictionaries),
53
- ...dictionaryDefinitions.map((dictionaryDefinition) => dictionaryDefinition.name).filter((name) => !["w5s-typescript"].includes(name))
54
- ],
55
- ignoreWords: [],
56
- import: toArray(defaultSettings.import).filter((dict) => !excludeImport.has(dict)),
57
- ignorePaths: [
58
- ...toArray(defaultSettings.ignorePaths),
59
- "**/CHANGELOG.md",
60
- "**/__snapshots__/**",
61
- // '**/.git/**',
62
- "**/.vscode/**",
63
- "**/*.snap",
64
- "**/dist/**",
65
- "**/node_modules/**",
66
- "**/package.json",
67
- "**/package-lock.json",
68
- "**/renovate.json",
69
- "**/vscode-extension/**",
70
- "**/yarn.lock",
71
- "**/pnpm-lock.yaml",
72
- // Ignore common media files
73
- "**/*.svg",
74
- "**/*.webp",
75
- "**/*.webm"
76
- ],
77
- languageSettings: [
78
- ...toArray(defaultSettings.languageSettings),
79
- {
80
- languageId: "typescript,javascript,typescriptreact,javascriptreact",
81
- locale: "*",
82
- includeRegExpList: [],
83
- ignoreRegExpList: ["js-hex-escape", "js-unicode-escape", "js-regexp-flags"],
84
- patterns: [],
85
- dictionaries: ["w5s-typescript"],
86
- dictionaryDefinitions: []
87
- },
88
- {
89
- languageId: "typescript,javascript,typescriptreact,javascriptreact",
90
- locale: "*",
91
- // eslint-disable-next-line unicorn/prefer-string-raw
92
- ignoreRegExpList: ["\\/\\* eslint-disable.+", "\\/\\/ eslint-disable.+"]
93
- }
94
- ]
45
+ const config = {
46
+ ...defaultSettings,
47
+ name: "W5S default settings .js",
48
+ id: "w5s-default-js",
49
+ language: "en",
50
+ description: "Default cspell configuration.",
51
+ words: [],
52
+ flagWords: [],
53
+ useGitignore: true,
54
+ dictionaryDefinitions: [...toArray(defaultSettings.dictionaryDefinitions), ...dictionaryDefinitions],
55
+ dictionaries: [...toArray(defaultSettings.dictionaries), ...dictionaryDefinitions.map((dictionaryDefinition) => dictionaryDefinition.name).filter((name) => !["w5s-typescript"].includes(name))],
56
+ ignoreWords: [],
57
+ import: toArray(defaultSettings.import).filter((dict) => !excludeImport.has(dict)),
58
+ ignorePaths: [
59
+ ...toArray(defaultSettings.ignorePaths),
60
+ "**/CHANGELOG.md",
61
+ "**/__snapshots__/**",
62
+ "**/.vscode/**",
63
+ "**/*.snap",
64
+ "**/dist/**",
65
+ "**/node_modules/**",
66
+ "**/package.json",
67
+ "**/package-lock.json",
68
+ "**/renovate.json",
69
+ "**/vscode-extension/**",
70
+ "**/yarn.lock",
71
+ "**/pnpm-lock.yaml",
72
+ "**/*.svg",
73
+ "**/*.webp",
74
+ "**/*.webm"
75
+ ],
76
+ languageSettings: [
77
+ ...toArray(defaultSettings.languageSettings),
78
+ {
79
+ languageId: "typescript,javascript,typescriptreact,javascriptreact",
80
+ locale: "*",
81
+ includeRegExpList: [],
82
+ ignoreRegExpList: [
83
+ "js-hex-escape",
84
+ "js-unicode-escape",
85
+ "js-regexp-flags"
86
+ ],
87
+ patterns: [],
88
+ dictionaries: ["w5s-typescript"],
89
+ dictionaryDefinitions: []
90
+ },
91
+ {
92
+ languageId: "typescript,javascript,typescriptreact,javascriptreact",
93
+ locale: "*",
94
+ ignoreRegExpList: ["\\/\\* eslint-disable.+", "\\/\\/ eslint-disable.+"]
95
+ }
96
+ ]
95
97
  };
96
- var index_default = settings;
98
+ //#endregion
99
+ export { config as default, meta };
97
100
 
98
- export { index_default as default };
99
- //# sourceMappingURL=index.js.map
100
101
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"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","file":"index.js","sourcesContent":["import type { AdvancedCSpellSettings } from '@cspell/cspell-types';\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[] | 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 name: 'w5s-filetypes',\n path: '../dict/filetypes.txt',\n description: 'Additional file types',\n },\n {\n addWords: false,\n name: 'w5s-fullstack',\n path: '../dict/fullstack.txt',\n description: 'Fullstack terms',\n },\n {\n addWords: false,\n name: 'w5s-typescript',\n path: '../dict/typescript.txt',\n description: 'Typescript keywords',\n },\n {\n addWords: false,\n name: 'w5s-names',\n path: '../dict/names.txt',\n description: 'Known names',\n },\n {\n addWords: false,\n name: 'w5s-npm',\n path: '../dict/npm.txt',\n description: 'NPM packages',\n },\n];\n\nconst settings: AdvancedCSpellSettings = {\n ...defaultSettings,\n name: 'W5S default settings .js',\n id: 'w5s-default-js',\n language: 'en',\n description: 'Default cspell configuration.',\n words: [],\n flagWords: [],\n useGitignore: true,\n dictionaryDefinitions: [...toArray(defaultSettings.dictionaryDefinitions), ...dictionaryDefinitions],\n dictionaries: [\n ...toArray(defaultSettings.dictionaries),\n ...dictionaryDefinitions\n .map((dictionaryDefinition) => dictionaryDefinition.name)\n .filter((name) => !['w5s-typescript'].includes(name)),\n ],\n ignoreWords: [],\n import: toArray(defaultSettings.import).filter((dict) => !excludeImport.has(dict)),\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 languageSettings: [\n ...toArray(defaultSettings.languageSettings),\n {\n languageId: 'typescript,javascript,typescriptreact,javascriptreact',\n locale: '*',\n includeRegExpList: [],\n ignoreRegExpList: ['js-hex-escape', 'js-unicode-escape', 'js-regexp-flags'],\n patterns: [],\n dictionaries: ['w5s-typescript'],\n dictionaryDefinitions: [],\n },\n {\n languageId: 'typescript,javascript,typescriptreact,javascriptreact',\n locale: '*',\n // eslint-disable-next-line unicorn/prefer-string-raw\n ignoreRegExpList: ['\\\\/\\\\* eslint-disable.+', '\\\\/\\\\/ eslint-disable.+'],\n },\n ],\n};\n\nexport default settings;\n"]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/meta.ts","../src/config.ts"],"sourcesContent":["export const meta = Object.freeze({\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 // @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});\n","import type { AdvancedCSpellSettings } from '@cspell/cspell-types';\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[] | 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 name: 'w5s-filetypes',\n path: '../dict/filetypes.txt',\n description: 'Additional file types',\n },\n {\n addWords: false,\n name: 'w5s-fullstack',\n path: '../dict/fullstack.txt',\n description: 'Fullstack terms',\n },\n {\n addWords: false,\n name: 'w5s-typescript',\n path: '../dict/typescript.txt',\n description: 'Typescript keywords',\n },\n {\n addWords: false,\n name: 'w5s-names',\n path: '../dict/names.txt',\n description: 'Known names',\n },\n {\n addWords: false,\n name: 'w5s-npm',\n path: '../dict/npm.txt',\n description: 'NPM packages',\n },\n];\n\nexport const config: AdvancedCSpellSettings = {\n ...defaultSettings,\n name: 'W5S default settings .js',\n id: 'w5s-default-js',\n language: 'en',\n description: 'Default cspell configuration.',\n words: [],\n flagWords: [],\n useGitignore: true,\n dictionaryDefinitions: [...toArray(defaultSettings.dictionaryDefinitions), ...dictionaryDefinitions],\n dictionaries: [\n ...toArray(defaultSettings.dictionaries),\n ...dictionaryDefinitions\n .map((dictionaryDefinition) => dictionaryDefinition.name)\n .filter((name) => !['w5s-typescript'].includes(name)),\n ],\n ignoreWords: [],\n import: toArray(defaultSettings.import).filter((dict) => !excludeImport.has(dict)),\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 languageSettings: [\n ...toArray(defaultSettings.languageSettings),\n {\n languageId: 'typescript,javascript,typescriptreact,javascriptreact',\n locale: '*',\n includeRegExpList: [],\n ignoreRegExpList: ['js-hex-escape', 'js-unicode-escape', 'js-regexp-flags'],\n patterns: [],\n dictionaries: ['w5s-typescript'],\n dictionaryDefinitions: [],\n },\n {\n languageId: 'typescript,javascript,typescriptreact,javascriptreact',\n locale: '*',\n // eslint-disable-next-line unicorn/prefer-string-raw\n ignoreRegExpList: ['\\\\/\\\\* eslint-disable.+', '\\\\/\\\\/ eslint-disable.+'],\n },\n ],\n};\n"],"mappings":";;AAAA,MAAa,OAAO,OAAO,OAAO;CAEhC,MAAA;CAEA,SAAA;CAEA,aAAa;CACd,CAAC;;;ACHF,MAAM,WAAc,UAAgC,MAAM,QAAQ,MAAM,GAAG,QAAQ,SAAS,OAAO,EAAE,GAAG,CAAC,MAAM;AAC/G,MAAM,kBAAkB;AAExB,MAAM,gCAAgB,IAAI,IAAY,EAErC,CAAC;AACF,MAAM,wBAAyE;CAC7E;EACE,UAAU;EACV,MAAM;EACN,MAAM;EACN,aAAa;EACd;CACD;EACE,UAAU;EACV,MAAM;EACN,MAAM;EACN,aAAa;EACd;CACD;EACE,UAAU;EACV,MAAM;EACN,MAAM;EACN,aAAa;EACd;CACD;EACE,UAAU;EACV,MAAM;EACN,MAAM;EACN,aAAa;EACd;CACD;EACE,UAAU;EACV,MAAM;EACN,MAAM;EACN,aAAa;EACd;CACF;AAED,MAAa,SAAiC;CAC5C,GAAG;CACH,MAAM;CACN,IAAI;CACJ,UAAU;CACV,aAAa;CACb,OAAO,EAAE;CACT,WAAW,EAAE;CACb,cAAc;CACd,uBAAuB,CAAC,GAAG,QAAQ,gBAAgB,sBAAsB,EAAE,GAAG,sBAAsB;CACpG,cAAc,CACZ,GAAG,QAAQ,gBAAgB,aAAa,EACxC,GAAG,sBACA,KAAK,yBAAyB,qBAAqB,KAAK,CACxD,QAAQ,SAAS,CAAC,CAAC,iBAAiB,CAAC,SAAS,KAAK,CAAC,CACxD;CACD,aAAa,EAAE;CACf,QAAQ,QAAQ,gBAAgB,OAAO,CAAC,QAAQ,SAAS,CAAC,cAAc,IAAI,KAAK,CAAC;CAClF,aAAa;EACX,GAAG,QAAQ,gBAAgB,YAAY;EACvC;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACD;CACD,kBAAkB;EAChB,GAAG,QAAQ,gBAAgB,iBAAiB;EAC5C;GACE,YAAY;GACZ,QAAQ;GACR,mBAAmB,EAAE;GACrB,kBAAkB;IAAC;IAAiB;IAAqB;IAAkB;GAC3E,UAAU,EAAE;GACZ,cAAc,CAAC,iBAAiB;GAChC,uBAAuB,EAAE;GAC1B;EACD;GACE,YAAY;GACZ,QAAQ;GAER,kBAAkB,CAAC,2BAA2B,0BAA0B;GACzE;EACF;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/cspell-config",
3
- "version": "3.0.5",
3
+ "version": "3.1.1",
4
4
  "description": "CSpell configuration presets",
5
5
  "keywords": [
6
6
  "cspell"
@@ -23,10 +23,9 @@
23
23
  "./dist/*": "./dist/*",
24
24
  "./dict/*": "./dict/*"
25
25
  },
26
- "typings": "./dist/index.d.ts",
26
+ "typings": "./dist/index.d.mts",
27
27
  "files": [
28
28
  "cspell-ext.json",
29
- "dict/",
30
29
  "dist/",
31
30
  "src/",
32
31
  "index.js",
@@ -36,36 +35,11 @@
36
35
  "!**/__tests__/**"
37
36
  ],
38
37
  "scripts": {
39
- "__build:dict": "cd dict;cspell-tools-cli compile filetypes.txt",
40
- "build": "npx run-p \"build:*\"",
41
- "build:tsc": "npx tsup",
42
- "clean": "npx run-p \"clean:*\"",
43
- "clean:tsc": "rm -rf dist",
44
- "docs": "node ../../markdown.mjs",
45
- "format": "npx run-p \"format:*\"",
46
- "format:src": "eslint . --fix",
47
- "lint": "npx run-p \"lint:*\"",
48
- "lint:src": "eslint .",
49
- "postpack": "npx clean-package restore",
50
- "prepack": "npx clean-package",
51
- "prepare": "npx run-p \"prepare:*\"",
52
- "prepare:empty": ":",
53
- "prepublishOnly": "npm run clean;npm run build",
54
- "spellcheck": "cspell --no-progress '**'",
55
- "test": "npx run-p \"test:*\"",
56
- "test:src": "vitest run"
38
+ "postpack": "clean-package restore"
57
39
  },
58
40
  "dependencies": {
59
41
  "@cspell/cspell-bundled-dicts": "^9.0.0"
60
42
  },
61
- "devDependencies": {
62
- "@cspell/cspell-bundled-dicts": "9.6.4",
63
- "@cspell/cspell-tools": "9.6.4",
64
- "@cspell/cspell-types": "9.6.4",
65
- "@w5s/tsup-config": "2.0.4",
66
- "vite": "7.3.1",
67
- "vitest": "4.0.18"
68
- },
69
43
  "peerDependencies": {
70
44
  "cspell": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0"
71
45
  },
@@ -74,7 +48,6 @@
74
48
  "optional": true
75
49
  }
76
50
  },
77
- "clean-package": "../../clean-package.config.mjs",
78
51
  "engines": {
79
52
  "node": ">=20.0.0"
80
53
  },
@@ -82,5 +55,5 @@
82
55
  "access": "public"
83
56
  },
84
57
  "sideEffect": false,
85
- "gitHead": "550810ad9a8d35378bb00361cd0080bd67058fc5"
58
+ "gitHead": "202a665e3ce20aabf1eff51af6b0eb013c179e0a"
86
59
  }
package/src/config.ts ADDED
@@ -0,0 +1,101 @@
1
+ import type { AdvancedCSpellSettings } from '@cspell/cspell-types';
2
+ // @ts-ignore CSpell config is not typed
3
+ import cSpellSettings from '@cspell/cspell-bundled-dicts/cspell-default.config.js';
4
+
5
+ const toArray = <T>(value: T | T[] | undefined) => (Array.isArray(value) ? value : value == null ? [] : [value]);
6
+ const defaultSettings = cSpellSettings as AdvancedCSpellSettings;
7
+ // eslint-disable-next-line unicorn/no-useless-collection-argument
8
+ const excludeImport = new Set<string>([
9
+ // Put here the imports you want to exclude
10
+ ]);
11
+ const dictionaryDefinitions: AdvancedCSpellSettings['dictionaryDefinitions'] = [
12
+ {
13
+ addWords: false,
14
+ name: 'w5s-filetypes',
15
+ path: '../dict/filetypes.txt',
16
+ description: 'Additional file types',
17
+ },
18
+ {
19
+ addWords: false,
20
+ name: 'w5s-fullstack',
21
+ path: '../dict/fullstack.txt',
22
+ description: 'Fullstack terms',
23
+ },
24
+ {
25
+ addWords: false,
26
+ name: 'w5s-typescript',
27
+ path: '../dict/typescript.txt',
28
+ description: 'Typescript keywords',
29
+ },
30
+ {
31
+ addWords: false,
32
+ name: 'w5s-names',
33
+ path: '../dict/names.txt',
34
+ description: 'Known names',
35
+ },
36
+ {
37
+ addWords: false,
38
+ name: 'w5s-npm',
39
+ path: '../dict/npm.txt',
40
+ description: 'NPM packages',
41
+ },
42
+ ];
43
+
44
+ export const config: AdvancedCSpellSettings = {
45
+ ...defaultSettings,
46
+ name: 'W5S default settings .js',
47
+ id: 'w5s-default-js',
48
+ language: 'en',
49
+ description: 'Default cspell configuration.',
50
+ words: [],
51
+ flagWords: [],
52
+ useGitignore: true,
53
+ dictionaryDefinitions: [...toArray(defaultSettings.dictionaryDefinitions), ...dictionaryDefinitions],
54
+ dictionaries: [
55
+ ...toArray(defaultSettings.dictionaries),
56
+ ...dictionaryDefinitions
57
+ .map((dictionaryDefinition) => dictionaryDefinition.name)
58
+ .filter((name) => !['w5s-typescript'].includes(name)),
59
+ ],
60
+ ignoreWords: [],
61
+ import: toArray(defaultSettings.import).filter((dict) => !excludeImport.has(dict)),
62
+ ignorePaths: [
63
+ ...toArray(defaultSettings.ignorePaths),
64
+ '**/CHANGELOG.md',
65
+ '**/__snapshots__/**',
66
+ // '**/.git/**',
67
+ '**/.vscode/**',
68
+ '**/*.snap',
69
+ '**/dist/**',
70
+ '**/node_modules/**',
71
+ '**/package.json',
72
+ '**/package-lock.json',
73
+ '**/renovate.json',
74
+ '**/vscode-extension/**',
75
+ '**/yarn.lock',
76
+ '**/pnpm-lock.yaml',
77
+
78
+ // Ignore common media files
79
+ '**/*.svg',
80
+ '**/*.webp',
81
+ '**/*.webm',
82
+ ],
83
+ languageSettings: [
84
+ ...toArray(defaultSettings.languageSettings),
85
+ {
86
+ languageId: 'typescript,javascript,typescriptreact,javascriptreact',
87
+ locale: '*',
88
+ includeRegExpList: [],
89
+ ignoreRegExpList: ['js-hex-escape', 'js-unicode-escape', 'js-regexp-flags'],
90
+ patterns: [],
91
+ dictionaries: ['w5s-typescript'],
92
+ dictionaryDefinitions: [],
93
+ },
94
+ {
95
+ languageId: 'typescript,javascript,typescriptreact,javascriptreact',
96
+ locale: '*',
97
+ // eslint-disable-next-line unicorn/prefer-string-raw
98
+ ignoreRegExpList: ['\\/\\* eslint-disable.+', '\\/\\/ eslint-disable.+'],
99
+ },
100
+ ],
101
+ };
package/src/index.ts CHANGED
@@ -1,103 +1,2 @@
1
- import type { AdvancedCSpellSettings } from '@cspell/cspell-types';
2
- // @ts-ignore CSpell config is not typed
3
- import cSpellSettings from '@cspell/cspell-bundled-dicts/cspell-default.config.js';
4
-
5
- const toArray = <T>(value: T | T[] | undefined) => (Array.isArray(value) ? value : value == null ? [] : [value]);
6
- const defaultSettings = cSpellSettings as AdvancedCSpellSettings;
7
- // eslint-disable-next-line unicorn/no-useless-collection-argument
8
- const excludeImport = new Set<string>([
9
- // Put here the imports you want to exclude
10
- ]);
11
- const dictionaryDefinitions: AdvancedCSpellSettings['dictionaryDefinitions'] = [
12
- {
13
- addWords: false,
14
- name: 'w5s-filetypes',
15
- path: '../dict/filetypes.txt',
16
- description: 'Additional file types',
17
- },
18
- {
19
- addWords: false,
20
- name: 'w5s-fullstack',
21
- path: '../dict/fullstack.txt',
22
- description: 'Fullstack terms',
23
- },
24
- {
25
- addWords: false,
26
- name: 'w5s-typescript',
27
- path: '../dict/typescript.txt',
28
- description: 'Typescript keywords',
29
- },
30
- {
31
- addWords: false,
32
- name: 'w5s-names',
33
- path: '../dict/names.txt',
34
- description: 'Known names',
35
- },
36
- {
37
- addWords: false,
38
- name: 'w5s-npm',
39
- path: '../dict/npm.txt',
40
- description: 'NPM packages',
41
- },
42
- ];
43
-
44
- const settings: AdvancedCSpellSettings = {
45
- ...defaultSettings,
46
- name: 'W5S default settings .js',
47
- id: 'w5s-default-js',
48
- language: 'en',
49
- description: 'Default cspell configuration.',
50
- words: [],
51
- flagWords: [],
52
- useGitignore: true,
53
- dictionaryDefinitions: [...toArray(defaultSettings.dictionaryDefinitions), ...dictionaryDefinitions],
54
- dictionaries: [
55
- ...toArray(defaultSettings.dictionaries),
56
- ...dictionaryDefinitions
57
- .map((dictionaryDefinition) => dictionaryDefinition.name)
58
- .filter((name) => !['w5s-typescript'].includes(name)),
59
- ],
60
- ignoreWords: [],
61
- import: toArray(defaultSettings.import).filter((dict) => !excludeImport.has(dict)),
62
- ignorePaths: [
63
- ...toArray(defaultSettings.ignorePaths),
64
- '**/CHANGELOG.md',
65
- '**/__snapshots__/**',
66
- // '**/.git/**',
67
- '**/.vscode/**',
68
- '**/*.snap',
69
- '**/dist/**',
70
- '**/node_modules/**',
71
- '**/package.json',
72
- '**/package-lock.json',
73
- '**/renovate.json',
74
- '**/vscode-extension/**',
75
- '**/yarn.lock',
76
- '**/pnpm-lock.yaml',
77
-
78
- // Ignore common media files
79
- '**/*.svg',
80
- '**/*.webp',
81
- '**/*.webm',
82
- ],
83
- languageSettings: [
84
- ...toArray(defaultSettings.languageSettings),
85
- {
86
- languageId: 'typescript,javascript,typescriptreact,javascriptreact',
87
- locale: '*',
88
- includeRegExpList: [],
89
- ignoreRegExpList: ['js-hex-escape', 'js-unicode-escape', 'js-regexp-flags'],
90
- patterns: [],
91
- dictionaries: ['w5s-typescript'],
92
- dictionaryDefinitions: [],
93
- },
94
- {
95
- languageId: 'typescript,javascript,typescriptreact,javascriptreact',
96
- locale: '*',
97
- // eslint-disable-next-line unicorn/prefer-string-raw
98
- ignoreRegExpList: ['\\/\\* eslint-disable.+', '\\/\\/ eslint-disable.+'],
99
- },
100
- ],
101
- };
102
-
103
- export default settings;
1
+ export * from './meta.js';
2
+ export { config as default } from './config.js';
package/src/meta.ts ADDED
@@ -0,0 +1,8 @@
1
+ export const meta = Object.freeze({
2
+ // @ts-ignore - these variables are injected at build time
3
+ name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,
4
+ // @ts-ignore - these variables are injected at build time
5
+ version: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,
6
+ // @ts-ignore - these variables are injected at build time
7
+ buildNumber: 1 as number, // (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,
8
+ });
@@ -1,9 +0,0 @@
1
- cjsx
2
- ctsx
3
- dangerfile
4
- eslintcache
5
- mdwn
6
- mtsx
7
- pcss
8
- plopfile
9
- tsbuildinfo
@@ -1,23 +0,0 @@
1
- autodevops
2
- automerge
3
- bigdecimal
4
- camelcase
5
- CODEOWNERS
6
- datasource
7
- datasources
8
- editorconfig
9
- esnext
10
- frontends
11
- githooks
12
- gitmoji
13
- gitmojis
14
- healthcheck
15
- interruptible
16
- macOS
17
- monoid
18
- npmjs
19
- postpack
20
- prepack
21
- stylesheet
22
- subpackage
23
- templating
package/dict/names.txt DELETED
@@ -1,19 +0,0 @@
1
- circleci
2
- dbaeumer
3
- espree
4
- github
5
- gitlab
6
- Infima
7
- jpolo
8
- nuxt
9
- plop
10
- plopjs
11
- Raygun
12
- rubygems
13
- rushstack
14
- seatonjiang
15
- strictsoftware
16
- Stroustrup
17
- tsup
18
- typecript
19
- VueJS
package/dict/npm.txt DELETED
@@ -1,8 +0,0 @@
1
- browserslist
2
- commitlint
3
- esbuild
4
- pinia
5
- stylelint
6
- stylelintrc
7
- typedoc
8
- typescript
@@ -1,7 +0,0 @@
1
- # cspell-tools: keep-case no-split
2
-
3
- fcontext
4
- fdescribe
5
- ts-nocheck
6
- xcontext
7
- xdescribe