25 lines
715 B
Plaintext

== Why is this an issue?
Calling a literal throws a TypeError, and is likely the result of an unintentional error in the code.
This rule raises an issue when an attempt is made to use a literal as a function.
[source,js]
----
true(); // Noncompliant, literal should not be used as function
----
This rule also detects when a literal is used as a _tag_ function.
[source,js]
----
true``; // Noncompliant, literal should not be used as tag function
----
== Resources
=== Documentation
* MDN web docs - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions[Functions]
* MDN web docs - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals[Template literals]