@cspell/eslint-plugin 8.6.0 → 8.7.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.
|
@@ -43,7 +43,7 @@ function create(context) {
|
|
|
43
43
|
const data = {
|
|
44
44
|
word,
|
|
45
45
|
};
|
|
46
|
-
const code = context
|
|
46
|
+
const code = contextSourceCode(context);
|
|
47
47
|
const startPos = code.getLocFromIndex(start);
|
|
48
48
|
const endPos = code.getLocFromIndex(end);
|
|
49
49
|
const loc = { start: startPos, end: endPos };
|
|
@@ -106,10 +106,13 @@ function logContext(log, context) {
|
|
|
106
106
|
cwd: context.cwd,
|
|
107
107
|
filename: context.filename,
|
|
108
108
|
physicalFilename: context.physicalFilename,
|
|
109
|
-
scope: context.getScope().type,
|
|
109
|
+
// scope: context.getScope().type,
|
|
110
110
|
options: context.options.length === 1 ? context.options[0] : context.options,
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
+
function contextSourceCode(context) {
|
|
114
|
+
return context.sourceCode || context.getSourceCode();
|
|
115
|
+
}
|
|
113
116
|
exports.meta = { name: '@cspell' };
|
|
114
117
|
const recommended = {
|
|
115
118
|
plugins: ['@cspell'],
|
package/dist/worker/worker.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/* eslint-disable import/no-unresolved */
|
|
2
|
-
/* eslint-disable node/no-missing-import */
|
|
3
1
|
// @ts-check
|
|
2
|
+
/* eslint-disable n/no-missing-import */
|
|
4
3
|
/**
|
|
5
4
|
* @typedef {import('estree').Node} Node
|
|
6
5
|
* @typedef {import('./types.cjs').Issue} Issue
|
|
@@ -22,6 +21,7 @@ runAsWorker(
|
|
|
22
21
|
*/
|
|
23
22
|
async (filename, text, root, options) => {
|
|
24
23
|
if (!spellChecker) {
|
|
24
|
+
// eslint-disable-next-line import/no-unresolved
|
|
25
25
|
spellChecker = await import('./spellCheck.mjs');
|
|
26
26
|
}
|
|
27
27
|
return spellChecker.spellCheck(filename, text, root, options);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "8.
|
|
6
|
+
"version": "8.7.0",
|
|
7
7
|
"description": "CSpell ESLint plugin",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"cspell",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"!**/*.map"
|
|
52
52
|
],
|
|
53
53
|
"scripts": {
|
|
54
|
+
"bt": "pnpm build && pnpm test",
|
|
54
55
|
"build": "pnpm build:schema && pnpm build:src",
|
|
55
56
|
"build:src": "tsc -b ./tsconfig.json",
|
|
56
57
|
"build:schema": "ts-json-schema-generator --no-top-ref --expose none --path src/common/options.cts --type Options -o ./assets/options.schema.json",
|
|
@@ -59,11 +60,12 @@
|
|
|
59
60
|
"clean-build": "pnpm run clean && pnpm run build",
|
|
60
61
|
"coverage": "echo coverage",
|
|
61
62
|
"test-watch": "pnpm run test -- --watch",
|
|
62
|
-
"test": "npx mocha --timeout 10000 \"dist/**/*.test.
|
|
63
|
+
"test": "npx mocha --timeout 10000 \"dist/**/*.test.mjs\""
|
|
63
64
|
},
|
|
64
65
|
"repository": {
|
|
65
66
|
"type": "git",
|
|
66
|
-
"url": "
|
|
67
|
+
"url": "https://github.com/streetsidesoftware/cspell.git",
|
|
68
|
+
"directory": "packages/cspell-eslint-plugin"
|
|
67
69
|
},
|
|
68
70
|
"bugs": {
|
|
69
71
|
"url": "https://github.com/streetsidesoftware/cspell/labels/cspell-gitignore"
|
|
@@ -72,24 +74,30 @@
|
|
|
72
74
|
"node": ">=18"
|
|
73
75
|
},
|
|
74
76
|
"devDependencies": {
|
|
75
|
-
"@
|
|
77
|
+
"@eslint/eslintrc": "^3.0.2",
|
|
78
|
+
"@eslint/js": "^9.0.0",
|
|
76
79
|
"@types/estree": "^1.0.5",
|
|
77
80
|
"@types/mocha": "^10.0.6",
|
|
78
|
-
"@typescript-eslint/
|
|
79
|
-
"@typescript-eslint/
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"eslint": "^
|
|
83
|
-
"eslint-plugin-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
81
|
+
"@typescript-eslint/parser": "^7.6.0",
|
|
82
|
+
"@typescript-eslint/types": "^7.6.0",
|
|
83
|
+
"eslint": "^9.0.0",
|
|
84
|
+
"eslint-plugin-n": "^17.1.0",
|
|
85
|
+
"eslint-plugin-react": "^7.34.1",
|
|
86
|
+
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
87
|
+
"globals": "^15.0.0",
|
|
88
|
+
"mocha": "^10.4.0",
|
|
89
|
+
"ts-json-schema-generator": "^1.5.1",
|
|
90
|
+
"typescript": "^5.4.4",
|
|
91
|
+
"typescript-eslint": "^7.6.0"
|
|
87
92
|
},
|
|
88
93
|
"dependencies": {
|
|
89
|
-
"@cspell/cspell-types": "8.
|
|
90
|
-
"cspell-lib": "8.
|
|
94
|
+
"@cspell/cspell-types": "8.7.0",
|
|
95
|
+
"cspell-lib": "8.7.0",
|
|
91
96
|
"estree-walker": "^3.0.3",
|
|
92
97
|
"synckit": "^0.9.0"
|
|
93
98
|
},
|
|
94
|
-
"
|
|
99
|
+
"peerDependencies": {
|
|
100
|
+
"eslint": "^7 || ^8 || ^9"
|
|
101
|
+
},
|
|
102
|
+
"gitHead": "5318079ed11fe77e981287ecf1c40d6f28dd91ed"
|
|
95
103
|
}
|