eslint-plugin-mgw-eslint-rules 2.3.19 → 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 CHANGED
@@ -44389,29 +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
- //'Element[attributes]'(node: TmplAstElement) {
44393
- //// const attributes = node.attributes;
44394
- //// On va parcourir tous les attributs
44395
- //// for (const attr of attributes) {
44396
- // Parcours attribut par attribut
44397
- "Element$1 > TextAttribute"(node) {
44392
+ "Element[attributes]"(node) {
44398
44393
  console.log(node);
44399
- if (node.value) {
44400
- const attrNomme = listeAttributes.get(node.name);
44401
- if (attrNomme) {
44402
- const attributeValues = node.value.split(/\s+/);
44403
- for (const attrValue of attributeValues) {
44404
- if (!attrNomme.regs.some((pattern) => pattern.test(attrValue))) {
44405
- const loc = parserServices.convertNodeSourceSpanToLoc(node.sourceSpan);
44406
- context.report({
44407
- loc,
44408
- messageId: "invalidNaming",
44409
- data: {
44410
- attribute: node.name,
44411
- value: attrValue,
44412
- conventions: attrNomme.noms
44413
- }
44414
- });
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
+ }
44415
44413
  }
44416
44414
  }
44417
44415
  }