Skip to content

Commit

Permalink
Revert "feat: telemetry added for current linter (#36400)"
Browse files Browse the repository at this point in the history
This reverts commit 6ab9684.
  • Loading branch information
ayushpahwa committed Sep 19, 2024
1 parent 006dbfd commit 00ef320
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions app/client/src/plugins/Linting/utils/getLintingErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ import setters from "workers/Evaluation/setters";
import { isMemberExpressionNode } from "@shared/ast/src";
import { generate } from "astring";
import getInvalidModuleInputsError from "ee/plugins/Linting/utils/getInvalidModuleInputsError";
import { startAndEndSpanForFn } from "UITelemetry/generateTraces";
import { objectKeys } from "@appsmith/utils";

const EvaluationScriptPositions: Record<string, Position> = {};

Expand Down Expand Up @@ -69,7 +67,7 @@ function generateLintingGlobalData(data: Record<string, unknown>) {

libAccessors.forEach((accessor) => (globalData[accessor] = true));
// Add all supported web apis
objectKeys(SUPPORTED_WEB_APIS).forEach(
Object.keys(SUPPORTED_WEB_APIS).forEach(
(apiName) => (globalData[apiName] = true),
);

Expand Down Expand Up @@ -197,16 +195,7 @@ export default function getLintingErrors({
const lintingGlobalData = generateLintingGlobalData(data);
const lintingOptions = lintOptions(lintingGlobalData);

startAndEndSpanForFn(
"Linter",
// adding some metrics to compare the performance changes with eslint
{
linter: "JSHint",
linesOfCodeLinted: originalBinding.split("\n").length,
codeSizeInChars: originalBinding.length,
},
() => jshint(script, lintingOptions),
);
jshint(script, lintingOptions);
const sanitizedJSHintErrors = sanitizeJSHintErrors(jshint.errors, scriptPos);
const jshintErrors: LintError[] = sanitizedJSHintErrors.map((lintError) =>
convertJsHintErrorToAppsmithLintError(
Expand Down

0 comments on commit 00ef320

Please sign in to comment.