@codacy/tools-eslint-9 0.2.1 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -13
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -25922,7 +25922,7 @@ var adapter = {
25922
25922
  * Config resolution order:
25923
25923
  * 1. Local config file if `useLocalConfigurationFile` is true
25924
25924
  * 2. Codacy patterns → build flat config with only those rules
25925
- * 3. Default: @eslint/js recommended config
25925
+ * 3. No local config and no patterns → skip execution
25926
25926
  */
25927
25927
  async analyze(ctx, codacyConfig) {
25928
25928
  const startMs = Date.now();
@@ -25964,20 +25964,15 @@ var adapter = {
25964
25964
  phase: "toolConfig",
25965
25965
  kind: "ConfigBuildError",
25966
25966
  message: `Failed to build ESLint config: ${err instanceof Error ? err.message : String(err)}`,
25967
- level: "warning"
25967
+ level: "error"
25968
25968
  });
25969
+ return buildResult(startedAt, /* @__PURE__ */ new Date(), issues, errors, ctx.targetFiles.length);
25969
25970
  }
25970
- }
25971
- if (!eslintOptions.overrideConfigFile && !eslintOptions.overrideConfig) {
25972
- try {
25973
- const jsPlugin = await import("@eslint/js");
25974
- const recommended = jsPlugin.default?.configs?.recommended ?? jsPlugin.configs?.recommended;
25975
- if (recommended) {
25976
- eslintOptions.overrideConfig = [recommended];
25977
- eslintOptions.overrideConfigFile = true;
25978
- }
25979
- } catch {
25980
- }
25971
+ } else {
25972
+ ctx.logger.info("Skipping analysis: no local config and no patterns enabled", {
25973
+ toolId: TOOL_ID2
25974
+ });
25975
+ return buildResult(startedAt, /* @__PURE__ */ new Date(), issues, errors, ctx.targetFiles.length);
25981
25976
  }
25982
25977
  const enabledPatterns = new Set(codacyConfig.patterns.map((p) => p.patternId));
25983
25978
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/tools-eslint-9",
3
- "version": "0.2.1",
3
+ "version": "0.3.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.2.1"
82
+ "@codacy/tooling": "0.3.0"
83
83
  },
84
84
  "license": "MIT",
85
85
  "author": "Codacy <support@codacy.com> (https://www.codacy.com)",