@cspell/eslint-plugin 6.30.1 → 6.31.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.
@@ -0,0 +1,90 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "additionalProperties": false,
4
+ "definitions": {},
5
+ "properties": {
6
+ "autoFix": {
7
+ "default": false,
8
+ "description": "Automatically fix common mistakes. This is only possible if a single preferred suggestion is available.",
9
+ "type": "boolean"
10
+ },
11
+ "checkComments": {
12
+ "default": true,
13
+ "description": "Spell check comments",
14
+ "type": "boolean"
15
+ },
16
+ "checkIdentifiers": {
17
+ "default": true,
18
+ "description": "Spell check identifiers (variables names, function names, class names, etc.)",
19
+ "type": "boolean"
20
+ },
21
+ "checkJSXText": {
22
+ "default": true,
23
+ "description": "Spell check JSX Text",
24
+ "type": "boolean"
25
+ },
26
+ "checkStringTemplates": {
27
+ "default": true,
28
+ "description": "Spell check template strings",
29
+ "type": "boolean"
30
+ },
31
+ "checkStrings": {
32
+ "default": true,
33
+ "description": "Spell check strings",
34
+ "type": "boolean"
35
+ },
36
+ "customWordListFile": {
37
+ "anyOf": [
38
+ {
39
+ "description": "Specify a path to a custom word list file",
40
+ "type": "string"
41
+ },
42
+ {
43
+ "additionalProperties": false,
44
+ "properties": {
45
+ "path": {
46
+ "description": "Path to word list file. File format: 1 word per line",
47
+ "type": "string"
48
+ }
49
+ },
50
+ "required": [
51
+ "path"
52
+ ],
53
+ "type": "object"
54
+ }
55
+ ],
56
+ "description": "Specify a path to a custom word list file.\n\nexample: ```js customWordListFile: \"./myWords.txt\" ```"
57
+ },
58
+ "debugMode": {
59
+ "default": false,
60
+ "description": "Output debug logs",
61
+ "type": "boolean"
62
+ },
63
+ "generateSuggestions": {
64
+ "default": true,
65
+ "description": "Generate suggestions",
66
+ "type": "boolean"
67
+ },
68
+ "ignoreImportProperties": {
69
+ "default": true,
70
+ "description": "Ignore the properties of imported variables, structures, and types.\n\nExample: ``` import { example } from 'third-party';\n\nconst msg = example.property; // `property` is not spell checked. ```",
71
+ "type": "boolean"
72
+ },
73
+ "ignoreImports": {
74
+ "default": true,
75
+ "description": "Ignore import and require names",
76
+ "type": "boolean"
77
+ },
78
+ "numSuggestions": {
79
+ "default": 8,
80
+ "description": "Number of spelling suggestions to make.",
81
+ "type": "number"
82
+ }
83
+ },
84
+ "required": [
85
+ "numSuggestions",
86
+ "generateSuggestions",
87
+ "autoFix"
88
+ ],
89
+ "type": "object"
90
+ }
@@ -90,3 +90,4 @@ export interface CustomWordListFile {
90
90
  export type WorkerOptions = RequiredOptions & {
91
91
  cwd: string;
92
92
  };
93
+ //# sourceMappingURL=options.d.ts.map
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=options.js.map
@@ -20,3 +20,4 @@ export declare const configs: {
20
20
  };
21
21
  };
22
22
  export {};
23
+ //# sourceMappingURL=cspell-eslint-plugin.d.ts.map
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.configs = exports.rules = void 0;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
7
6
  const synckit_1 = require("synckit");
8
- const options_schema_json_1 = __importDefault(require("../_auto_generated_/options.schema.json"));
9
7
  const defaultCheckOptions_1 = require("./defaultCheckOptions");
10
- const schema = options_schema_json_1.default;
8
+ const optionsSchema = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../assets/options.schema.json'), 'utf8'));
9
+ const schema = optionsSchema;
11
10
  const spellCheck = (0, synckit_1.createSyncFn)(require.resolve('../worker/worker.mjs'), undefined, 30000);
12
11
  const messages = {
13
12
  wordUnknown: 'Unknown word: "{{word}}"',
@@ -120,3 +119,4 @@ exports.configs = {
120
119
  },
121
120
  },
122
121
  };
122
+ //# sourceMappingURL=cspell-eslint-plugin.js.map
@@ -2,3 +2,4 @@ import type { Check, Options, RequiredOptions, WorkerOptions } from '../common/o
2
2
  export declare const defaultCheckOptions: Required<Check>;
3
3
  export declare const defaultOptions: RequiredOptions;
4
4
  export declare function normalizeOptions(opts: Options | undefined, cwd: string): WorkerOptions;
5
+ //# sourceMappingURL=defaultCheckOptions.d.ts.map
@@ -23,3 +23,4 @@ function normalizeOptions(opts, cwd) {
23
23
  return options;
24
24
  }
25
25
  exports.normalizeOptions = normalizeOptions;
26
+ //# sourceMappingURL=defaultCheckOptions.js.map
@@ -1,2 +1,3 @@
1
1
  export type { Options } from '../common/options';
2
2
  export { configs, rules } from './cspell-eslint-plugin';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -4,3 +4,4 @@ exports.rules = exports.configs = void 0;
4
4
  var cspell_eslint_plugin_1 = require("./cspell-eslint-plugin");
5
5
  Object.defineProperty(exports, "configs", { enumerable: true, get: function () { return cspell_eslint_plugin_1.configs; } });
6
6
  Object.defineProperty(exports, "rules", { enumerable: true, get: function () { return cspell_eslint_plugin_1.rules; } });
7
+ //# sourceMappingURL=index.js.map
@@ -6,3 +6,4 @@ export type ASTNode = (Node | Comment | JSXText) & {
6
6
  parent?: Node;
7
7
  };
8
8
  export type NodeType = ASTNode['type'];
9
+ //# sourceMappingURL=ASTNode.d.mts.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=ASTNode.mjs.map
@@ -15,3 +15,4 @@ type SpellCheckFn = typeof spellCheck;
15
15
  export type SpellCheckSyncFn = (...p: Parameters<SpellCheckFn>) => Awaited<ReturnType<SpellCheckFn>>;
16
16
  export declare function spellCheck(filename: string, text: string, root: Node, options: WorkerOptions): Promise<Issue[]>;
17
17
  export {};
18
+ //# sourceMappingURL=spellCheck.d.mts.map
@@ -338,3 +338,4 @@ function normalizeSuggestions(suggestions, nodeType) {
338
338
  return s;
339
339
  });
340
340
  }
341
+ //# sourceMappingURL=spellCheck.mjs.map
@@ -2,3 +2,4 @@ import type { ASTNode } from './ASTNode.mjs';
2
2
  type Key = string | number | symbol | null | undefined;
3
3
  export declare function walkTree(node: ASTNode, enter: (node: ASTNode, parent: ASTNode | undefined, key: Key) => void): void;
4
4
  export {};
5
+ //# sourceMappingURL=walkTree.d.mts.map
@@ -12,3 +12,4 @@ export function walkTree(node, enter) {
12
12
  },
13
13
  });
14
14
  }
15
+ //# sourceMappingURL=walkTree.mjs.map
@@ -1,3 +1,4 @@
1
1
  export type Node = import('estree').Node;
2
2
  export type Issue = import('./spellCheck.mjs').Issue;
3
3
  export type WorkerOptions = import('../common/options.js').WorkerOptions;
4
+ //# sourceMappingURL=worker.d.mts.map
@@ -25,3 +25,4 @@ async (filename, text, root, options) => {
25
25
  }
26
26
  return spellChecker.spellCheck(filename, text, root, options);
27
27
  });
28
+ //# sourceMappingURL=worker.mjs.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "6.30.1",
6
+ "version": "6.31.0",
7
7
  "description": "CSpell ESLint plugin",
8
8
  "keywords": [
9
9
  "cspell",
@@ -25,6 +25,7 @@
25
25
  "main": "dist/plugin/index.js",
26
26
  "types": "dist/plugin/index.d.ts",
27
27
  "files": [
28
+ "assets",
28
29
  "dist",
29
30
  "!**/__mocks__",
30
31
  "!**/*.tsbuildInfo",
@@ -35,7 +36,7 @@
35
36
  "scripts": {
36
37
  "build": "pnpm build:schema && pnpm build:src",
37
38
  "build:src": "tsc -b ./tsconfig.json",
38
- "build:schema": "ts-json-schema-generator --no-top-ref --expose none --path src/common/options.ts --type Options -o ./src/_auto_generated_/options.schema.json",
39
+ "build:schema": "ts-json-schema-generator --no-top-ref --expose none --path src/common/options.ts --type Options -o ./assets/options.schema.json",
39
40
  "watch": "tsc -p . --watch",
40
41
  "clean": "shx rm -rf dist coverage .tsbuildinfo",
41
42
  "clean-build": "pnpm run clean && pnpm run build",
@@ -54,20 +55,20 @@
54
55
  "node": ">=14"
55
56
  },
56
57
  "devDependencies": {
57
- "@types/eslint": "^8.21.2",
58
+ "@types/eslint": "^8.21.3",
58
59
  "@types/estree": "^1.0.0",
59
- "@typescript-eslint/parser": "^5.55.0",
60
- "@typescript-eslint/types": "^5.55.0",
61
- "@typescript-eslint/typescript-estree": "^5.55.0",
60
+ "@typescript-eslint/parser": "^5.56.0",
61
+ "@typescript-eslint/types": "^5.56.0",
62
+ "@typescript-eslint/typescript-estree": "^5.56.0",
62
63
  "eslint": "^8.36.0",
63
64
  "eslint-plugin-react": "^7.32.2",
64
65
  "mocha": "^10.2.0",
65
66
  "ts-json-schema-generator": "^1.2.0"
66
67
  },
67
68
  "dependencies": {
68
- "cspell-lib": "6.30.1",
69
+ "cspell-lib": "6.31.0",
69
70
  "estree-walker": "^3.0.3",
70
71
  "synckit": "^0.8.5"
71
72
  },
72
- "gitHead": "3352b82591cd0cb27e5cd04dea93773e98a606df"
73
+ "gitHead": "1c0c3eb875bc1aab334bd56d952c0d0964468b7a"
73
74
  }
@@ -1,90 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "additionalProperties": false,
4
- "definitions": {},
5
- "properties": {
6
- "autoFix": {
7
- "default": false,
8
- "description": "Automatically fix common mistakes. This is only possible if a single preferred suggestion is available.",
9
- "type": "boolean"
10
- },
11
- "checkComments": {
12
- "default": true,
13
- "description": "Spell check comments",
14
- "type": "boolean"
15
- },
16
- "checkIdentifiers": {
17
- "default": true,
18
- "description": "Spell check identifiers (variables names, function names, class names, etc.)",
19
- "type": "boolean"
20
- },
21
- "checkJSXText": {
22
- "default": true,
23
- "description": "Spell check JSX Text",
24
- "type": "boolean"
25
- },
26
- "checkStringTemplates": {
27
- "default": true,
28
- "description": "Spell check template strings",
29
- "type": "boolean"
30
- },
31
- "checkStrings": {
32
- "default": true,
33
- "description": "Spell check strings",
34
- "type": "boolean"
35
- },
36
- "customWordListFile": {
37
- "anyOf": [
38
- {
39
- "description": "Specify a path to a custom word list file",
40
- "type": "string"
41
- },
42
- {
43
- "additionalProperties": false,
44
- "properties": {
45
- "path": {
46
- "description": "Path to word list file. File format: 1 word per line",
47
- "type": "string"
48
- }
49
- },
50
- "required": [
51
- "path"
52
- ],
53
- "type": "object"
54
- }
55
- ],
56
- "description": "Specify a path to a custom word list file.\n\nexample: ```js customWordListFile: \"./myWords.txt\" ```"
57
- },
58
- "debugMode": {
59
- "default": false,
60
- "description": "Output debug logs",
61
- "type": "boolean"
62
- },
63
- "generateSuggestions": {
64
- "default": true,
65
- "description": "Generate suggestions",
66
- "type": "boolean"
67
- },
68
- "ignoreImportProperties": {
69
- "default": true,
70
- "description": "Ignore the properties of imported variables, structures, and types.\n\nExample: ``` import { example } from 'third-party';\n\nconst msg = example.property; // `property` is not spell checked. ```",
71
- "type": "boolean"
72
- },
73
- "ignoreImports": {
74
- "default": true,
75
- "description": "Ignore import and require names",
76
- "type": "boolean"
77
- },
78
- "numSuggestions": {
79
- "default": 8,
80
- "description": "Number of spelling suggestions to make.",
81
- "type": "number"
82
- }
83
- },
84
- "required": [
85
- "numSuggestions",
86
- "generateSuggestions",
87
- "autoFix"
88
- ],
89
- "type": "object"
90
- }