@w5s/cspell-config 2.3.22 → 2.4.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.d.ts CHANGED
@@ -1,3 +1,5 @@
1
- import type { AdvancedCSpellSettings } from '@cspell/cspell-types';
1
+ import { AdvancedCSpellSettings } from '@cspell/cspell-types';
2
+
2
3
  declare const settings: AdvancedCSpellSettings;
3
- export = settings;
4
+
5
+ export { settings as default };
package/dist/index.js CHANGED
@@ -1,116 +1,100 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- // @ts-ignore CSpell config is not typed
6
- const cspell_default_config_js_1 = __importDefault(require("@cspell/cspell-bundled-dicts/cspell-default.config.js"));
7
- const toArray = (value) => (Array.isArray(value) ? value : value == null ? [] : [value]);
8
- const defaultSettings = cspell_default_config_js_1.default;
9
- const excludeImport = new Set([
10
- '@cspell/dict-ada/cspell-ext.json',
11
- '@cspell/dict-cpp/cspell-ext.json',
12
- '@cspell/dict-csharp/cspell-ext.json',
13
- '@cspell/dict-django/cspell-ext.json',
14
- '@cspell/dict-dotnet/cspell-ext.json',
15
- '@cspell/dict-elixir/cspell-ext.json',
16
- '@cspell/dict-fsharp/cspell-ext.json',
17
- '@cspell/dict-haskell/cspell-ext.json',
18
- '@cspell/dict-latex/cspell-ext.json',
19
- '@cspell/dict-lua/cspell-ext.json',
20
- '@cspell/dict-monkeyc/cspell-ext.json',
21
- '@cspell/dict-php/cspell-ext.json',
22
- '@cspell/dict-powershell/cspell-ext.json',
23
- '@cspell/dict-python/cspell-ext.json',
24
- '@cspell/dict-r/cspell-ext.json',
25
- '@cspell/dict-scala/cspell-ext.json',
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
26
8
  ]);
27
- const dictionaryDefinitions = [
28
- {
29
- addWords: false,
30
- name: 'w5s-filetypes',
31
- path: '../dict/filetypes.txt',
32
- description: 'Additional file types',
33
- },
34
- {
35
- addWords: false,
36
- name: 'w5s-fullstack',
37
- path: '../dict/fullstack.txt',
38
- description: 'Fullstack terms',
39
- },
40
- {
41
- addWords: false,
42
- name: 'w5s-typescript',
43
- path: '../dict/typescript.txt',
44
- description: 'Typescript keywords',
45
- },
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
+ }
40
+ ];
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),
46
79
  {
47
- addWords: false,
48
- name: 'w5s-names',
49
- path: '../dict/names.txt',
50
- description: 'Known names',
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: []
51
87
  },
52
88
  {
53
- addWords: false,
54
- name: 'w5s-npm',
55
- path: '../dict/npm.txt',
56
- description: 'NPM packages',
57
- },
58
- ];
59
- const settings = {
60
- ...defaultSettings,
61
- name: 'W5S default settings .js',
62
- id: 'w5s-default-js',
63
- language: 'en',
64
- description: 'Default cspell configuration.',
65
- words: [],
66
- flagWords: [],
67
- useGitignore: true,
68
- dictionaryDefinitions: [...toArray(defaultSettings.dictionaryDefinitions), ...dictionaryDefinitions],
69
- dictionaries: [
70
- ...toArray(defaultSettings.dictionaries),
71
- ...dictionaryDefinitions
72
- .map((dictionaryDefinition) => dictionaryDefinition.name)
73
- .filter((name) => !['w5s-typescript'].includes(name)),
74
- ],
75
- ignoreWords: [],
76
- import: toArray(defaultSettings.import).filter((dict) => !excludeImport.has(dict)),
77
- ignorePaths: [
78
- ...toArray(defaultSettings.ignorePaths),
79
- '**/CHANGELOG.md',
80
- '**/__snapshots__/**',
81
- // '**/.git/**',
82
- '**/.vscode/**',
83
- '**/*.snap',
84
- '**/dist/**',
85
- '**/node_modules/**',
86
- '**/package.json',
87
- '**/package-lock.json',
88
- '**/renovate.json',
89
- '**/vscode-extension/**',
90
- '**/yarn.lock',
91
- 'pnpm-lock.yaml',
92
- // Ignore common media files
93
- '**/*.svg',
94
- '**/*.webp',
95
- '**/*.webm',
96
- ],
97
- languageSettings: [
98
- ...toArray(defaultSettings.languageSettings),
99
- {
100
- languageId: 'typescript,javascript,typescriptreact,javascriptreact',
101
- locale: '*',
102
- includeRegExpList: [],
103
- ignoreRegExpList: ['js-hex-escape', 'js-unicode-escape', 'js-regexp-flags'],
104
- patterns: [],
105
- dictionaries: ['w5s-typescript'],
106
- dictionaryDefinitions: [],
107
- },
108
- {
109
- languageId: 'typescript,javascript,typescriptreact,javascriptreact',
110
- locale: '*',
111
- // eslint-disable-next-line unicorn/prefer-string-raw
112
- ignoreRegExpList: ['\\/\\* eslint-disable.+', '\\/\\/ eslint-disable.+'],
113
- },
114
- ],
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
+ ]
115
95
  };
116
- module.exports = settings;
96
+ var index_default = settings;
97
+
98
+ export { index_default as default };
99
+ //# sourceMappingURL=index.js.map
100
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;AAIA,IAAM,OAAA,GAAU,CAAI,KAAA,KAAgC,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,GAAI,KAAA,GAAQ,KAAA,IAAS,IAAA,GAAO,EAAC,GAAI,CAAC,KAAK,CAAA;AAC9G,IAAM,eAAA,GAAkB,cAAA;AACxB,IAAM,aAAA,uBAAoB,GAAA,CAAY;AAAA;AAEtC,CAAC,CAAA;AACD,IAAM,qBAAA,GAAyE;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,CAAA,CAAE,QAAA,CAAS,IAAI,CAAC;AAAA,GACxD;AAAA,EACA,aAAa,EAAC;AAAA,EACd,MAAA,EAAQ,OAAA,CAAQ,eAAA,CAAgB,MAAM,CAAA,CAAE,MAAA,CAAO,CAAC,IAAA,KAAS,CAAC,aAAA,CAAc,GAAA,CAAI,IAAI,CAAC,CAAA;AAAA,EACjF,WAAA,EAAa;AAAA,IACX,GAAG,OAAA,CAAQ,eAAA,CAAgB,WAAW,CAAA;AAAA,IACtC,iBAAA;AAAA,IACA,qBAAA;AAAA;AAAA,IAEA,eAAA;AAAA,IACA,WAAA;AAAA,IACA,YAAA;AAAA,IACA,oBAAA;AAAA,IACA,iBAAA;AAAA,IACA,sBAAA;AAAA,IACA,kBAAA;AAAA,IACA,wBAAA;AAAA,IACA,cAAA;AAAA,IACA,gBAAA;AAAA;AAAA,IAGA,UAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,gBAAA,EAAkB;AAAA,IAChB,GAAG,OAAA,CAAQ,eAAA,CAAgB,gBAAgB,CAAA;AAAA,IAC3C;AAAA,MACE,UAAA,EAAY,uDAAA;AAAA,MACZ,MAAA,EAAQ,GAAA;AAAA,MACR,mBAAmB,EAAC;AAAA,MACpB,gBAAA,EAAkB,CAAC,eAAA,EAAiB,mBAAA,EAAqB,iBAAiB,CAAA;AAAA,MAC1E,UAAU,EAAC;AAAA,MACX,YAAA,EAAc,CAAC,gBAAgB,CAAA;AAAA,MAC/B,uBAAuB;AAAC,KAC1B;AAAA,IACA;AAAA,MACE,UAAA,EAAY,uDAAA;AAAA,MACZ,MAAA,EAAQ,GAAA;AAAA;AAAA,MAER,gBAAA,EAAkB,CAAC,yBAAA,EAA2B,yBAAyB;AAAA;AACzE;AAEJ,CAAA;AAGA,IAAO,aAAA,GAAQ","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;\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\n// eslint-disable-next-line import/no-default-export\nexport default settings;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/cspell-config",
3
- "version": "2.3.22",
3
+ "version": "2.4.1",
4
4
  "description": "CSpell configuration presets",
5
5
  "keywords": [
6
6
  "cspell"
@@ -16,14 +16,14 @@
16
16
  },
17
17
  "license": "MIT",
18
18
  "author": "Julien Polo <julien.polo@gmail.com>",
19
- "type": "commonjs",
19
+ "type": "module",
20
20
  "exports": {
21
21
  ".": "./cspell-ext.json",
22
22
  "./cspell-ext.json": "./cspell-ext.json",
23
23
  "./dist/*": "./dist/*",
24
24
  "./dict/*": "./dict/*"
25
25
  },
26
- "typings": "./index.d.ts",
26
+ "typings": "./dist/index.d.ts",
27
27
  "files": [
28
28
  "cspell-ext.json",
29
29
  "dict/",
@@ -39,10 +39,10 @@
39
39
  "postpack": "npx clean-package restore"
40
40
  },
41
41
  "dependencies": {
42
- "@cspell/cspell-bundled-dicts": "^8.0.0"
42
+ "@cspell/cspell-bundled-dicts": "^9.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "cspell": "^6.0.0 || ^7.0.0 || ^8.0.0"
45
+ "cspell": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "cspell": {
@@ -50,11 +50,11 @@
50
50
  }
51
51
  },
52
52
  "engines": {
53
- "node": ">=18.0.0"
53
+ "node": ">=20.0.0"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
58
  "sideEffect": false,
59
- "gitHead": "bb3e96c47e03b7a1a3caeed0bbdd35eee29c9837"
59
+ "gitHead": "199e9b150a80e22d21a35f924e19923aacfe3de3"
60
60
  }
package/src/index.ts CHANGED
@@ -4,23 +4,8 @@ import cSpellSettings from '@cspell/cspell-bundled-dicts/cspell-default.config.j
4
4
 
5
5
  const toArray = <T>(value: T | T[] | undefined) => (Array.isArray(value) ? value : value == null ? [] : [value]);
6
6
  const defaultSettings = cSpellSettings as AdvancedCSpellSettings;
7
- const excludeImport = new Set([
8
- '@cspell/dict-ada/cspell-ext.json',
9
- '@cspell/dict-cpp/cspell-ext.json',
10
- '@cspell/dict-csharp/cspell-ext.json',
11
- '@cspell/dict-django/cspell-ext.json',
12
- '@cspell/dict-dotnet/cspell-ext.json',
13
- '@cspell/dict-elixir/cspell-ext.json',
14
- '@cspell/dict-fsharp/cspell-ext.json',
15
- '@cspell/dict-haskell/cspell-ext.json',
16
- '@cspell/dict-latex/cspell-ext.json',
17
- '@cspell/dict-lua/cspell-ext.json',
18
- '@cspell/dict-monkeyc/cspell-ext.json',
19
- '@cspell/dict-php/cspell-ext.json',
20
- '@cspell/dict-powershell/cspell-ext.json',
21
- '@cspell/dict-python/cspell-ext.json',
22
- '@cspell/dict-r/cspell-ext.json',
23
- '@cspell/dict-scala/cspell-ext.json',
7
+ const excludeImport = new Set<string>([
8
+ // Put here the imports you want to exclude
24
9
  ]);
25
10
  const dictionaryDefinitions: AdvancedCSpellSettings['dictionaryDefinitions'] = [
26
11
  {
@@ -114,4 +99,5 @@ const settings: AdvancedCSpellSettings = {
114
99
  ],
115
100
  };
116
101
 
117
- export = settings;
102
+ // eslint-disable-next-line import/no-default-export
103
+ export default settings;
@@ -1 +0,0 @@
1
- {"root":["../src/index.ts"],"version":"5.8.2"}