eslint-plugin-mgw-eslint-rules 2.3.18 → 2.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44389,28 +44389,27 @@ var rule8 = createRule8({
|
|
|
44389
44389
|
);
|
|
44390
44390
|
return {
|
|
44391
44391
|
// Détecte les attributs dans les templates (parcours global élément (noeud) par élément)
|
|
44392
|
-
|
|
44393
|
-
|
|
44394
|
-
|
|
44395
|
-
|
|
44396
|
-
|
|
44397
|
-
|
|
44398
|
-
|
|
44399
|
-
|
|
44400
|
-
|
|
44401
|
-
|
|
44402
|
-
|
|
44403
|
-
|
|
44404
|
-
|
|
44405
|
-
|
|
44406
|
-
|
|
44407
|
-
|
|
44408
|
-
|
|
44409
|
-
|
|
44410
|
-
|
|
44411
|
-
|
|
44412
|
-
|
|
44413
|
-
});
|
|
44392
|
+
"Element[attributes]"(node) {
|
|
44393
|
+
console.log(node);
|
|
44394
|
+
const attributes = node.attributes;
|
|
44395
|
+
for (const attr of attributes) {
|
|
44396
|
+
if (attr.value) {
|
|
44397
|
+
const attrNomme = listeAttributes.get(attr.name);
|
|
44398
|
+
if (attrNomme) {
|
|
44399
|
+
const attributeValues = attr.value.split(/\s+/);
|
|
44400
|
+
for (const attrValue of attributeValues) {
|
|
44401
|
+
if (!attrNomme.regs.some((pattern) => pattern.test(attrValue))) {
|
|
44402
|
+
const loc = parserServices.convertNodeSourceSpanToLoc(node.sourceSpan);
|
|
44403
|
+
context.report({
|
|
44404
|
+
loc,
|
|
44405
|
+
messageId: "invalidNaming",
|
|
44406
|
+
data: {
|
|
44407
|
+
attribute: attr.name,
|
|
44408
|
+
value: attrValue,
|
|
44409
|
+
conventions: attrNomme.noms
|
|
44410
|
+
}
|
|
44411
|
+
});
|
|
44412
|
+
}
|
|
44414
44413
|
}
|
|
44415
44414
|
}
|
|
44416
44415
|
}
|