You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type and function have different name spaces in TypeScript, so we should not raise an issue for this case.
Notice that this also applies to variables, namespace, interface, and perhaps more.
The TypeScript compiler will already check for reused names and output an error.
So this rule does not make much sense in TypeScript, as compared to JavaScript.
Regardless of potential fixes to the FP, we should consider removing this rule for TypeScript.
Or at least remove it from the "Sonar Way" profile for TypeScript.
The text was updated successfully, but these errors were encountered:
We need programmatically deprecate the rule in TypeScriptRulesDefinition and JavaScriptProfilesDefinition because metadata is shared for both JS and TS
type
andfunction
with same nameExplanation
type
andfunction
have different name spaces in TypeScript, so we should not raise an issue for this case.Notice that this also applies to variables,
namespace
,interface
, and perhaps more.See many FP in Peach (internal):
Suggestion
The TypeScript compiler will already check for reused names and output an error.
So this rule does not make much sense in TypeScript, as compared to JavaScript.
Regardless of potential fixes to the FP, we should consider removing this rule for TypeScript.
Or at least remove it from the "Sonar Way" profile for TypeScript.
The text was updated successfully, but these errors were encountered: