@cspell/eslint-plugin 7.0.1 → 7.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/common/{options.js → options.cjs} +1 -1
- package/dist/common/{options.d.ts → options.d.cts} +1 -1
- package/dist/plugin/{cspell-eslint-plugin.js → cspell-eslint-plugin.cjs} +3 -3
- package/dist/plugin/{cspell-eslint-plugin.d.ts → cspell-eslint-plugin.d.cts} +1 -1
- package/dist/plugin/{defaultCheckOptions.js → defaultCheckOptions.cjs} +1 -1
- package/dist/plugin/{defaultCheckOptions.d.ts → defaultCheckOptions.d.cts} +2 -2
- package/dist/plugin/{index.js → index.cjs} +4 -4
- package/dist/plugin/index.d.cts +3 -0
- package/dist/worker/ASTNode.cjs +3 -0
- package/dist/worker/{ASTNode.d.ts → ASTNode.d.cts} +1 -1
- package/dist/worker/spellCheck.d.mts +2 -2
- package/dist/worker/types.cjs +3 -0
- package/dist/worker/{types.d.ts → types.d.cts} +3 -3
- package/dist/worker/walkTree.d.mts +1 -1
- package/dist/worker/worker.d.mts +2 -2
- package/dist/worker/worker.mjs +2 -2
- package/package.json +17 -15
- package/dist/plugin/index.d.ts +0 -3
- package/dist/worker/ASTNode.js +0 -2
- package/dist/worker/types.js +0 -2
|
@@ -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
|
|
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,
|
|
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.
|
|
123
|
+
//# sourceMappingURL=cspell-eslint-plugin.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.
|
|
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
|
|
5
|
-
Object.defineProperty(exports, "configs", { enumerable: true, get: function () { return
|
|
6
|
-
Object.defineProperty(exports, "rules", { enumerable: true, get: function () { return
|
|
7
|
-
//# sourceMappingURL=index.
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Node } from 'estree';
|
|
2
|
-
import type { WorkerOptions } from '../common/options.
|
|
3
|
-
import type { Issue } from './types.
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Node } from 'estree';
|
|
2
|
-
import type { WorkerOptions } from '../common/options.
|
|
3
|
-
import type { NodeType } from './ASTNode.
|
|
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.
|
|
30
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ASTNode } from './ASTNode.
|
|
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 {};
|
package/dist/worker/worker.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type Node = import('estree').Node;
|
|
2
|
-
export type Issue = import('./types.
|
|
3
|
-
export type WorkerOptions = import('../common/options.
|
|
2
|
+
export type Issue = import('./types.cjs').Issue;
|
|
3
|
+
export type WorkerOptions = import('../common/options.cjs').WorkerOptions;
|
|
4
4
|
//# sourceMappingURL=worker.d.mts.map
|
package/dist/worker/worker.mjs
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
// @ts-check
|
|
4
4
|
/**
|
|
5
5
|
* @typedef {import('estree').Node} Node
|
|
6
|
-
* @typedef {import('./types.
|
|
7
|
-
* @typedef {import('../common/options.
|
|
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.
|
|
6
|
+
"version": "7.1.1",
|
|
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.
|
|
21
|
-
"require": "./dist/plugin/index.
|
|
22
|
-
"
|
|
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": "
|
|
25
|
-
"main": "dist/plugin/index.
|
|
26
|
-
"types": "dist/plugin/index.d.
|
|
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.
|
|
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.
|
|
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.
|
|
63
|
+
"@typescript-eslint/types": "^6.4.1",
|
|
63
64
|
"@typescript-eslint/typescript-estree": "^5.62.0",
|
|
64
|
-
"eslint": "^8.
|
|
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.
|
|
71
|
-
"cspell-lib": "7.
|
|
72
|
+
"@cspell/cspell-types": "7.1.1",
|
|
73
|
+
"cspell-lib": "7.1.1",
|
|
72
74
|
"estree-walker": "^3.0.3",
|
|
73
75
|
"synckit": "^0.8.5"
|
|
74
76
|
},
|
|
75
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "2dafa5386c58637614034c7a6d0fa13c03b16e41"
|
|
76
78
|
}
|
package/dist/plugin/index.d.ts
DELETED
package/dist/worker/ASTNode.js
DELETED
package/dist/worker/types.js
DELETED