Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FP S3504 (no-var): Ignore rule for codebases accepting Node.js below 6.0.0 #4568

Conversation

ilia-kebets-sonarsource
Copy link
Contributor

@ilia-kebets-sonarsource ilia-kebets-sonarsource commented Feb 12, 2024

Fixes #4528

I have verified the engines:node property values of the ruling projects.

@ilia-kebets-sonarsource ilia-kebets-sonarsource changed the title Issue 4528 s3504 no var check node version Fix FP S3504 (no-var): Ignore rule for codebases accepting Node.js below 6.0.0 Feb 12, 2024
@@ -1,135 +0,0 @@
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems really weird to me because even though the package.json of TypeScript includes "node": ">=4.2.0", the codebase uses const and let everywhere. I wonder whether we should rework the helper isSupported.

Does it really make sense to turn a rule to a noop for projects like TypeScript where it makes sense for the rule to raise issues? WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only *.ts files use const and let in the TypeScript project. One exception is a Jakefile.js which contains a few.
TS supports const and let, so that is why they appear. This is an issue that we will face for all transpiled code.

@ilia-kebets-sonarsource
Copy link
Contributor Author

closing as #4568 (comment)

@ilia-kebets-sonarsource ilia-kebets-sonarsource deleted the issue-4528-S3504-no-var-check-node-version branch September 13, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix FP S3504 (no-var): Ignore rule for codebases below ES5
3 participants