@cspell/eslint-plugin 7.0.1 → 7.0.2

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.
@@ -6,4 +6,4 @@ exports.defaultOptions = {
6
6
  generateSuggestions: true,
7
7
  autoFix: false,
8
8
  };
9
- //# sourceMappingURL=options.js.map
9
+ //# sourceMappingURL=options.cjs.map
@@ -101,4 +101,4 @@ export type WorkerOptions = RequiredOptions & {
101
101
  };
102
102
  export declare const defaultOptions: Options;
103
103
  export {};
104
- //# sourceMappingURL=options.d.ts.map
104
+ //# sourceMappingURL=options.d.cts.map
@@ -4,7 +4,7 @@ exports.configs = exports.rules = void 0;
4
4
  const fs_1 = require("fs");
5
5
  const path_1 = require("path");
6
6
  const synckit_1 = require("synckit");
7
- const defaultCheckOptions_1 = require("./defaultCheckOptions");
7
+ const defaultCheckOptions_cjs_1 = require("./defaultCheckOptions.cjs");
8
8
  const optionsSchema = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../assets/options.schema.json'), 'utf8'));
9
9
  const schema = optionsSchema;
10
10
  const spellCheck = (0, synckit_1.createSyncFn)(require.resolve('../worker/worker.mjs'), undefined, 30000);
@@ -34,7 +34,7 @@ function nullFix() {
34
34
  return null;
35
35
  }
36
36
  function create(context) {
37
- const options = (0, defaultCheckOptions_1.normalizeOptions)(context.options[0], context.getCwd());
37
+ const options = (0, defaultCheckOptions_cjs_1.normalizeOptions)(context.options[0], context.getCwd());
38
38
  const autoFix = options.autoFix;
39
39
  isDebugMode = options.debugMode || false;
40
40
  isDebugMode && logContext(context);
@@ -120,4 +120,4 @@ exports.configs = {
120
120
  },
121
121
  },
122
122
  };
123
- //# sourceMappingURL=cspell-eslint-plugin.js.map
123
+ //# sourceMappingURL=cspell-eslint-plugin.cjs.map
@@ -20,4 +20,4 @@ export declare const configs: {
20
20
  };
21
21
  };
22
22
  export {};
23
- //# sourceMappingURL=cspell-eslint-plugin.d.ts.map
23
+ //# sourceMappingURL=cspell-eslint-plugin.d.cts.map
@@ -28,4 +28,4 @@ function normalizeOptions(opts, cwd) {
28
28
  return options;
29
29
  }
30
30
  exports.normalizeOptions = normalizeOptions;
31
- //# sourceMappingURL=defaultCheckOptions.js.map
31
+ //# sourceMappingURL=defaultCheckOptions.cjs.map
@@ -1,5 +1,5 @@
1
- import type { Check, Options, RequiredOptions, WorkerOptions } from '../common/options';
1
+ import type { Check, Options, RequiredOptions, WorkerOptions } from '../common/options.cjs';
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
5
+ //# sourceMappingURL=defaultCheckOptions.d.cts.map
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.rules = exports.configs = void 0;
4
- var cspell_eslint_plugin_1 = require("./cspell-eslint-plugin");
5
- Object.defineProperty(exports, "configs", { enumerable: true, get: function () { return cspell_eslint_plugin_1.configs; } });
6
- Object.defineProperty(exports, "rules", { enumerable: true, get: function () { return cspell_eslint_plugin_1.rules; } });
7
- //# sourceMappingURL=index.js.map
4
+ var cspell_eslint_plugin_cjs_1 = require("./cspell-eslint-plugin.cjs");
5
+ Object.defineProperty(exports, "configs", { enumerable: true, get: function () { return cspell_eslint_plugin_cjs_1.configs; } });
6
+ Object.defineProperty(exports, "rules", { enumerable: true, get: function () { return cspell_eslint_plugin_cjs_1.rules; } });
7
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,3 @@
1
+ export type { Options } from '../common/options.cjs';
2
+ export { configs, rules } from './cspell-eslint-plugin.cjs';
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ASTNode.cjs.map
@@ -6,4 +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.ts.map
9
+ //# sourceMappingURL=ASTNode.d.cts.map
@@ -1,5 +1,5 @@
1
1
  import type { Node } from 'estree';
2
- import type { WorkerOptions } from '../common/options.js';
3
- import type { Issue } from './types.js';
2
+ import type { WorkerOptions } from '../common/options.cjs';
3
+ import type { Issue } from './types.cjs';
4
4
  export declare function spellCheck(filename: string, text: string, root: Node, options: WorkerOptions): Promise<Issue[]>;
5
5
  //# sourceMappingURL=spellCheck.d.mts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.cjs.map
@@ -1,6 +1,6 @@
1
1
  import type { Node } from 'estree';
2
- import type { WorkerOptions } from '../common/options.js';
3
- import type { NodeType } from './ASTNode.js';
2
+ import type { WorkerOptions } from '../common/options.cjs';
3
+ import type { NodeType } from './ASTNode.cjs';
4
4
  interface ExtendedSuggestion {
5
5
  /**
6
6
  * The suggestion.
@@ -27,4 +27,4 @@ export interface Issue {
27
27
  type SpellCheckFn = (filename: string, text: string, root: Node, options: WorkerOptions) => Promise<Issue[]>;
28
28
  export type SpellCheckSyncFn = (...p: Parameters<SpellCheckFn>) => Awaited<ReturnType<SpellCheckFn>>;
29
29
  export {};
30
- //# sourceMappingURL=types.d.ts.map
30
+ //# sourceMappingURL=types.d.cts.map
@@ -1,4 +1,4 @@
1
- import type { ASTNode } from './ASTNode.js';
1
+ import type { ASTNode } from './ASTNode.cjs';
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 {};
@@ -1,4 +1,4 @@
1
1
  export type Node = import('estree').Node;
2
- export type Issue = import('./types.js').Issue;
3
- export type WorkerOptions = import('../common/options.js').WorkerOptions;
2
+ export type Issue = import('./types.cjs').Issue;
3
+ export type WorkerOptions = import('../common/options.cjs').WorkerOptions;
4
4
  //# sourceMappingURL=worker.d.mts.map
@@ -3,8 +3,8 @@
3
3
  // @ts-check
4
4
  /**
5
5
  * @typedef {import('estree').Node} Node
6
- * @typedef {import('./types.js').Issue} Issue
7
- * @typedef {import('../common/options.js').WorkerOptions} WorkerOptions
6
+ * @typedef {import('./types.cjs').Issue} Issue
7
+ * @typedef {import('../common/options.cjs').WorkerOptions} WorkerOptions
8
8
  */
9
9
  import { runAsWorker } from 'synckit';
10
10
  /**
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "7.0.1",
6
+ "version": "7.0.2",
7
7
  "description": "CSpell ESLint plugin",
8
8
  "keywords": [
9
9
  "cspell",
@@ -17,13 +17,14 @@
17
17
  "homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-eslint-plugin#readme",
18
18
  "license": "MIT",
19
19
  "exports": {
20
- "types": "./dist/plugin/index.d.ts",
21
- "require": "./dist/plugin/index.js",
22
- "default": "./dist/plugin/index.js"
20
+ "types": "./dist/plugin/index.d.cts",
21
+ "require": "./dist/plugin/index.cjs",
22
+ "import": "./dist/plugin/index.cjs",
23
+ "default": "./dist/plugin/index.cjs"
23
24
  },
24
- "type": "commonjs",
25
- "main": "dist/plugin/index.js",
26
- "types": "dist/plugin/index.d.ts",
25
+ "type": "module",
26
+ "main": "dist/plugin/index.cjs",
27
+ "types": "dist/plugin/index.d.cts",
27
28
  "files": [
28
29
  "assets",
29
30
  "dist",
@@ -36,13 +37,13 @@
36
37
  "scripts": {
37
38
  "build": "pnpm build:schema && pnpm build:src",
38
39
  "build:src": "tsc -b ./tsconfig.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",
40
+ "build:schema": "ts-json-schema-generator --no-top-ref --expose none --path src/common/options.cts --type Options -o ./assets/options.schema.json",
40
41
  "watch": "tsc -p . --watch",
41
42
  "clean": "shx rm -rf dist temp coverage \"*.tsbuildInfo\"",
42
43
  "clean-build": "pnpm run clean && pnpm run build",
43
44
  "coverage": "echo coverage",
44
45
  "test-watch": "pnpm run test -- --watch",
45
- "test": "npx mocha --timeout 10000 \"dist/**/*.test.js\""
46
+ "test": "npx mocha --timeout 10000 \"dist/**/*.test.cjs\""
46
47
  },
47
48
  "repository": {
48
49
  "type": "git",
@@ -59,18 +60,19 @@
59
60
  "@types/estree": "^1.0.1",
60
61
  "@types/mocha": "^10.0.1",
61
62
  "@typescript-eslint/parser": "^5.62.0",
62
- "@typescript-eslint/types": "^6.4.0",
63
+ "@typescript-eslint/types": "^6.4.1",
63
64
  "@typescript-eslint/typescript-estree": "^5.62.0",
64
- "eslint": "^8.47.0",
65
+ "eslint": "^8.48.0",
65
66
  "eslint-plugin-react": "^7.33.2",
66
67
  "mocha": "^10.2.0",
67
- "ts-json-schema-generator": "^1.3.0"
68
+ "ts-json-schema-generator": "^1.3.0",
69
+ "typescript": "^5.2.2"
68
70
  },
69
71
  "dependencies": {
70
- "@cspell/cspell-types": "7.0.1",
71
- "cspell-lib": "7.0.1",
72
+ "@cspell/cspell-types": "7.0.2",
73
+ "cspell-lib": "7.0.2",
72
74
  "estree-walker": "^3.0.3",
73
75
  "synckit": "^0.8.5"
74
76
  },
75
- "gitHead": "124eea257b724b8354d3bc38f48fe9529cf6f7be"
77
+ "gitHead": "25aa083421fc81e4d5b7cedb4755f9b327120cfc"
76
78
  }
@@ -1,3 +0,0 @@
1
- export type { Options } from '../common/options';
2
- export { configs, rules } from './cspell-eslint-plugin';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ASTNode.js.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map