@codacy/tools-eslint-9 0.11.0 → 0.13.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.
- package/dist/index.js +52 -9
- package/dist/metadata.js +25 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -30582,7 +30582,10 @@ var pattern_mappings_default = {
|
|
|
30582
30582
|
]
|
|
30583
30583
|
},
|
|
30584
30584
|
Angular: {
|
|
30585
|
-
prefixes: ["
|
|
30585
|
+
prefixes: ["ESLint9_@angular-eslint_"]
|
|
30586
|
+
},
|
|
30587
|
+
AngularJS: {
|
|
30588
|
+
prefixes: ["ESLint9_angular_"]
|
|
30586
30589
|
},
|
|
30587
30590
|
TypeScript: {
|
|
30588
30591
|
prefixes: ["ESLint9_@typescript-eslint_"]
|
|
@@ -30648,6 +30651,27 @@ var pattern_mappings_default = {
|
|
|
30648
30651
|
},
|
|
30649
30652
|
WebdriverIO: {
|
|
30650
30653
|
prefixes: ["ESLint9_wdio_"]
|
|
30654
|
+
},
|
|
30655
|
+
TanStack: {
|
|
30656
|
+
prefixes: ["ESLint9_@tanstack_"]
|
|
30657
|
+
},
|
|
30658
|
+
Shopify: {
|
|
30659
|
+
prefixes: ["ESLint9_@shopify_"]
|
|
30660
|
+
},
|
|
30661
|
+
"Lightning Web Components": {
|
|
30662
|
+
prefixes: ["ESLint9_@lwc_"]
|
|
30663
|
+
},
|
|
30664
|
+
Salesforce: {
|
|
30665
|
+
prefixes: ["ESLint9_@salesforce_"]
|
|
30666
|
+
},
|
|
30667
|
+
Meteor: {
|
|
30668
|
+
prefixes: ["ESLint9_meteor_"]
|
|
30669
|
+
},
|
|
30670
|
+
SuiteScript: {
|
|
30671
|
+
prefixes: ["ESLint9_suitescript_"]
|
|
30672
|
+
},
|
|
30673
|
+
"ESLint Plugin": {
|
|
30674
|
+
prefixes: ["ESLint9_eslint-plugin_"]
|
|
30651
30675
|
}
|
|
30652
30676
|
};
|
|
30653
30677
|
|
|
@@ -30757,6 +30781,11 @@ function removeRuleFromFlatConfig(config, ruleId) {
|
|
|
30757
30781
|
function isParserServicesError(message) {
|
|
30758
30782
|
return /requires parserServices|parserOptions\.project|requires type information/.test(message);
|
|
30759
30783
|
}
|
|
30784
|
+
function isConfigLoadError(message) {
|
|
30785
|
+
return /Cannot find package|Cannot find module|ERR_MODULE_NOT_FOUND|ERR_REQUIRE_ESM|Failed to load config|Could not find config file|Cannot read config file/i.test(
|
|
30786
|
+
message
|
|
30787
|
+
);
|
|
30788
|
+
}
|
|
30760
30789
|
function rulePluginPrefix(ruleId) {
|
|
30761
30790
|
const slashIdx = ruleId.indexOf("/");
|
|
30762
30791
|
if (slashIdx <= 0) return void 0;
|
|
@@ -30936,7 +30965,10 @@ var adapter = {
|
|
|
30936
30965
|
return (0, import_tooling.buildResult)(TOOL_ID2, startedAt, completedAt2, issues, errors, ctx.targetFiles.length);
|
|
30937
30966
|
}
|
|
30938
30967
|
const eslintOptions = { cwd: ctx.repositoryRoot };
|
|
30939
|
-
|
|
30968
|
+
const usingLocalConfig = Boolean(
|
|
30969
|
+
codacyConfig.useLocalConfigurationFile && codacyConfig.localConfigurationFile
|
|
30970
|
+
);
|
|
30971
|
+
if (usingLocalConfig) {
|
|
30940
30972
|
const projectESLint = await resolveProjectESLint(ctx.repositoryRoot);
|
|
30941
30973
|
if (projectESLint) {
|
|
30942
30974
|
ESLintClass = projectESLint.ESLintClass;
|
|
@@ -31160,13 +31192,24 @@ var adapter = {
|
|
|
31160
31192
|
}
|
|
31161
31193
|
}
|
|
31162
31194
|
} catch (err) {
|
|
31163
|
-
|
|
31164
|
-
|
|
31165
|
-
|
|
31166
|
-
|
|
31167
|
-
|
|
31168
|
-
|
|
31169
|
-
|
|
31195
|
+
const rawMessage = err instanceof Error ? err.message : String(err);
|
|
31196
|
+
if (usingLocalConfig && isConfigLoadError(rawMessage)) {
|
|
31197
|
+
errors.push({
|
|
31198
|
+
toolId: TOOL_ID2,
|
|
31199
|
+
phase: "toolConfig",
|
|
31200
|
+
kind: "ConfigLoadError",
|
|
31201
|
+
message: `Local ESLint configuration file "${codacyConfig.localConfigurationFile}" failed to load. This usually means the config imports plugins or presets that are not installed in the project (install the project's dependencies, e.g. \`npm install\` or \`pnpm install\`, and try again), or the config file is missing or unreadable. Underlying error: ${truncateForError(rawMessage)}`,
|
|
31202
|
+
level: "error"
|
|
31203
|
+
});
|
|
31204
|
+
} else {
|
|
31205
|
+
errors.push({
|
|
31206
|
+
toolId: TOOL_ID2,
|
|
31207
|
+
phase: "toolInvoke",
|
|
31208
|
+
kind: "InvocationError",
|
|
31209
|
+
message: `ESLint failed: ${rawMessage}`,
|
|
31210
|
+
level: "error"
|
|
31211
|
+
});
|
|
31212
|
+
}
|
|
31170
31213
|
}
|
|
31171
31214
|
const completedAt = /* @__PURE__ */ new Date();
|
|
31172
31215
|
const durationMs = Date.now() - startMs;
|
package/dist/metadata.js
CHANGED
|
@@ -44,7 +44,10 @@ var pattern_mappings_default = {
|
|
|
44
44
|
]
|
|
45
45
|
},
|
|
46
46
|
Angular: {
|
|
47
|
-
prefixes: ["
|
|
47
|
+
prefixes: ["ESLint9_@angular-eslint_"]
|
|
48
|
+
},
|
|
49
|
+
AngularJS: {
|
|
50
|
+
prefixes: ["ESLint9_angular_"]
|
|
48
51
|
},
|
|
49
52
|
TypeScript: {
|
|
50
53
|
prefixes: ["ESLint9_@typescript-eslint_"]
|
|
@@ -110,6 +113,27 @@ var pattern_mappings_default = {
|
|
|
110
113
|
},
|
|
111
114
|
WebdriverIO: {
|
|
112
115
|
prefixes: ["ESLint9_wdio_"]
|
|
116
|
+
},
|
|
117
|
+
TanStack: {
|
|
118
|
+
prefixes: ["ESLint9_@tanstack_"]
|
|
119
|
+
},
|
|
120
|
+
Shopify: {
|
|
121
|
+
prefixes: ["ESLint9_@shopify_"]
|
|
122
|
+
},
|
|
123
|
+
"Lightning Web Components": {
|
|
124
|
+
prefixes: ["ESLint9_@lwc_"]
|
|
125
|
+
},
|
|
126
|
+
Salesforce: {
|
|
127
|
+
prefixes: ["ESLint9_@salesforce_"]
|
|
128
|
+
},
|
|
129
|
+
Meteor: {
|
|
130
|
+
prefixes: ["ESLint9_meteor_"]
|
|
131
|
+
},
|
|
132
|
+
SuiteScript: {
|
|
133
|
+
prefixes: ["ESLint9_suitescript_"]
|
|
134
|
+
},
|
|
135
|
+
"ESLint Plugin": {
|
|
136
|
+
prefixes: ["ESLint9_eslint-plugin_"]
|
|
113
137
|
}
|
|
114
138
|
};
|
|
115
139
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codacy/tools-eslint-9",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "ESLint 9 adapter — Library-mode JavaScript/TypeScript linter",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"eslint-plugin-wdio": "^9.0.0",
|
|
80
80
|
"eslint-plugin-xss": "^0.1.0",
|
|
81
81
|
"eslint-plugin-yml": "^1.0.0",
|
|
82
|
-
"@codacy/tooling": "0.
|
|
82
|
+
"@codacy/tooling": "0.13.0"
|
|
83
83
|
},
|
|
84
84
|
"license": "MIT",
|
|
85
85
|
"author": "Codacy <support@codacy.com> (https://www.codacy.com)",
|