Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Improve S1192 by ignoring literals in type annotations #203

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

yassin-kammoun-sonarsource
Copy link
Contributor

Fixes #2464

@sonarcloud
Copy link

sonarcloud bot commented Apr 13, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@@ -20,6 +20,7 @@
import { RuleTester } from "eslint";

const ruleTester = new RuleTester({
parser: require.resolve("@typescript-eslint/parser"),
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use RuleTesterJsWithTypes from Andrea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, the class is defined in SonarJS, therefore not available in eslint-plugin-sonarjs. However, we could temporarily duplicate its implementation here in eslint-plugin-sonarjs, create a ticket to remove the one in SonarJS, and eventually use eslint-plugin-sonarjs's one once we release it.

What do you think ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

yep, that could be a good idea, however maybe in separate PR, I would merge this as is

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve S1192 by ignoring literals in type annotations
2 participants