Skip to content

Commit

Permalink
chore: Revert "feat: telemetry added for current linter (#36400)" (#3…
Browse files Browse the repository at this point in the history
…6411)

This reverts commit 6ab9684.

## Description
PR to revert changes made in telemetry for linter


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/test js

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10936319851>
> Commit: 00ef320
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10936319851&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS`
> Spec:
> <hr>Thu, 19 Sep 2024 07:56:21 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Simplified linting process by removing telemetry-related
functionality.
  
- **Bug Fixes**
	- Improved performance and maintainability of the linting process.

- **Refactor**
- Updated method for retrieving keys from an object to use standard
JavaScript functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
ayushpahwa authored Sep 19, 2024
1 parent aa18a4f commit 163bde4
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 163bde4

Please sign in to comment.