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 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
- //'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) {
44398
- if (node.value) {
44399
- const attrNomme = listeAttributes.get(node.name);
44400
- if (attrNomme) {
44401
- const attributeValues = node.value.split(/\s+/);
44402
- for (const attrValue of attributeValues) {
44403
- if (!attrNomme.regs.some((pattern) => pattern.test(attrValue))) {
44404
- const loc = parserServices.convertNodeSourceSpanToLoc(node.sourceSpan);
44405
- context.report({
44406
- loc,
44407
- messageId: "invalidNaming",
44408
- data: {
44409
- attribute: node.name,
44410
- value: attrValue,
44411
- conventions: attrNomme.noms
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
  }