Skip to content

Commit f067a0f

Browse files
committed
[ec36-avoid-autoplay] add reference rgesn
1 parent 166d1ad commit f067a0f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

eslint-plugin/lib/rules/avoid-autoplay.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ module.exports = {
2828
recommended: "warn",
2929
},
3030
messages: {
31-
NoAutoplay: "Avoid using autoplay attribute for <video> and <audio> elements.",
32-
EnforcePreloadNone: "Set preload='none' for <video> and <audio> elements.",
33-
NoAutoplay_EnforcePreloadNone: "Avoid using autoplay attribute and set preload='none' for <video> and <audio> elements.",
31+
NoAutoplay: "Avoid using autoplay attribute for <video> and <audio> elements. Reference to Rule RGESN 4.1 : https://www.arcep.fr/mes-demarches-et-services/entreprises/fiches-pratiques/referentiel-general-ecoconception-services-numeriques.html",
32+
EnforcePreloadNone: "Set preload='none' for <video> and <audio> elements. Reference to Rule RGESN 4.1 : https://www.arcep.fr/mes-demarches-et-services/entreprises/fiches-pratiques/referentiel-general-ecoconception-services-numeriques.html",
33+
NoAutoplay_EnforcePreloadNone: "Avoid using autoplay attribute and set preload='none' for <video> and <audio> elements. Reference to Rule RGESN 4.1 : https://www.arcep.fr/mes-demarches-et-services/entreprises/fiches-pratiques/referentiel-general-ecoconception-services-numeriques.html ",
3434
},
3535
schema: [],
3636
},
@@ -45,18 +45,17 @@ module.exports = {
4545
(attr) => attr.name.name === "preload",
4646
);
4747
if(autoplayAttr && (!preloadAttr || preloadAttr.value.value !== "none")) {
48-
// console.log("NoAutoplay_EnforcePreloadNone")
4948
context.report({
5049
node: autoplayAttr||preloadAttr,
5150
messageId: "NoAutoplay_EnforcePreloadNone",
5251
});
5352
}
5453
else {
5554
if (autoplayAttr) {
56-
//console.log("NoAutoplay", autoplayAttr)
5755
context.report({
5856
node: autoplayAttr,
5957
messageId: "NoAutoplay",
58+
6059
});
6160
}
6261

0 commit comments

Comments
 (0)