github-actions[bot] b4774f0acf
Add HTML language to rule S6840 (#3660)
* Add html to rule S6840

* Add HTML language to rule S6840

* Apply fixes suggested by the PR review

---------

Co-authored-by: ericmorand-sonarsource <ericmorand-sonarsource@users.noreply.github.com>
Co-authored-by: Eric MORAND <eric.morand@sonarsource.com>
2024-02-21 13:48:07 +01:00

23 lines
452 B
Plaintext

include::../common/rule.adoc[tag=header]
=== Code examples
==== Noncompliant code example
[source,javascript,diff-id=1,diff-type=noncompliant]
----
function MyInput() {
return <input type="text" autocomplete="foo" />; // Noncompliant
}
----
==== Compliant solution
[source,javascript,diff-id=1,diff-type=compliant]
----
function MyInput() {
return <input type="text" autocomplete="name" />;
}
----
include::../common/rule.adoc[tag=footer]