rename suspicious-method-name to suspicious-method-name-declaration

This commit is contained in:
Erik Krogh Kristensen
2019-10-01 14:37:07 +02:00
parent 0320f0f26b
commit aa1368741b
9 changed files with 5 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ and a method called <code>constructor</code>. The interface does not declare
a class <code>Point</code> with a constructor, which was likely what the
developer meant to create.
</p>
<sample src="examples/SuspiciousMethodName.ts" />
<sample src="examples/SuspiciousMethodNameDeclaration.ts" />
<p>
The below example is a fixed version of the above, where the interface is
@@ -41,7 +41,7 @@ instead declared as a class, thereby describing the type the developer meant
in the first place.
</p>
<sample src="examples/SuspiciousMethodNameFixed.ts" />
<sample src="examples/SuspiciousMethodNameDeclarationFixed.ts" />
</example>
<references>

View File

@@ -1,10 +1,10 @@
/**
* @name Suspicious method name
* @name Suspicious method name declaration
* @description A method having the name "function", "new", or "constructor"
* is usually caused by a programmer being confused about the TypeScript syntax.
* @kind problem
* @problem.severity warning
* @id js/suspicious-method-name
* @id js/suspicious-method-name-declaration
* @precision high
* @tags correctness
* typescript