@cspell/eslint-plugin 8.1.2 → 8.2.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.
|
@@ -32,7 +32,7 @@ function nullFix() {
|
|
|
32
32
|
function create(context) {
|
|
33
33
|
const logger = (0, logger_cjs_1.getDefaultLogger)();
|
|
34
34
|
const log = logger.log;
|
|
35
|
-
const options = (0, defaultCheckOptions_cjs_1.normalizeOptions)(context.options[0], context.cwd);
|
|
35
|
+
const options = (0, defaultCheckOptions_cjs_1.normalizeOptions)(context.options[0], context.cwd || context.getCwd());
|
|
36
36
|
const autoFix = options.autoFix;
|
|
37
37
|
isDebugMode = options.debugMode ?? isDebugMode;
|
|
38
38
|
logger.enabled = options.debugMode ?? (logger.enabled || isDebugMode);
|
|
@@ -43,7 +43,7 @@ function create(context) {
|
|
|
43
43
|
const data = {
|
|
44
44
|
word,
|
|
45
45
|
};
|
|
46
|
-
const code = context.sourceCode;
|
|
46
|
+
const code = context.sourceCode || context.getSourceCode();
|
|
47
47
|
const startPos = code.getLocFromIndex(start);
|
|
48
48
|
const endPos = code.getLocFromIndex(end);
|
|
49
49
|
const loc = { start: startPos, end: endPos };
|
|
@@ -81,8 +81,10 @@ function create(context) {
|
|
|
81
81
|
context.report(des);
|
|
82
82
|
}
|
|
83
83
|
function checkProgram() {
|
|
84
|
-
const sc = context.sourceCode;
|
|
85
|
-
|
|
84
|
+
const sc = context.sourceCode || context.getSourceCode();
|
|
85
|
+
if (!sc)
|
|
86
|
+
return;
|
|
87
|
+
const { issues, errors } = spellCheck(context.filename || context.getFilename(), sc.text, sc.ast, options);
|
|
86
88
|
if (errors && errors.length) {
|
|
87
89
|
log('errors: %o', errors.map((e) => e.message));
|
|
88
90
|
errors.forEach((error) => console.error('%s', error.message));
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "8.
|
|
6
|
+
"version": "8.2.0",
|
|
7
7
|
"description": "CSpell ESLint plugin",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"cspell",
|
|
@@ -60,24 +60,24 @@
|
|
|
60
60
|
"node": ">=18"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@types/eslint": "^8.
|
|
63
|
+
"@types/eslint": "^8.56.0",
|
|
64
64
|
"@types/estree": "^1.0.5",
|
|
65
65
|
"@types/mocha": "^10.0.6",
|
|
66
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
67
|
-
"@typescript-eslint/parser": "^6.
|
|
68
|
-
"@typescript-eslint/types": "^6.
|
|
69
|
-
"@typescript-eslint/typescript-estree": "^6.
|
|
70
|
-
"eslint": "^8.
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
|
67
|
+
"@typescript-eslint/parser": "^6.15.0",
|
|
68
|
+
"@typescript-eslint/types": "^6.15.0",
|
|
69
|
+
"@typescript-eslint/typescript-estree": "^6.15.0",
|
|
70
|
+
"eslint": "^8.56.0",
|
|
71
71
|
"eslint-plugin-react": "^7.33.2",
|
|
72
72
|
"mocha": "^10.2.0",
|
|
73
|
-
"ts-json-schema-generator": "^1.
|
|
74
|
-
"typescript": "^5.3.
|
|
73
|
+
"ts-json-schema-generator": "^1.5.0",
|
|
74
|
+
"typescript": "^5.3.3"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@cspell/cspell-types": "8.
|
|
78
|
-
"cspell-lib": "8.
|
|
77
|
+
"@cspell/cspell-types": "8.2.0",
|
|
78
|
+
"cspell-lib": "8.2.0",
|
|
79
79
|
"estree-walker": "^3.0.3",
|
|
80
80
|
"synckit": "^0.8.6"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "3bcd6430bb33fb221d07030a60a2d61a2479e7ae"
|
|
83
83
|
}
|