eslint-plugin-sfmc 5.2.2 → 5.2.3

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/README.md CHANGED
@@ -68,7 +68,7 @@ SFMC rule metadata links to the owning plugin version's documentation under `blo
68
68
  - Updated `ampscript-data` to `^4.1.0` and `ssjs-data` to `^2.1.1`, including the complete boolean-like parameter metadata used by both AMPscript rules.
69
69
  - No existing rule IDs, public configuration shapes, or supported inputs were removed or changed incompatibly.
70
70
 
71
- Version **5.2.0** exports 53 SFMC rules. Every rule retains version-pinned documentation metadata, and release checks verify the tagged documentation and packed npm artifact.
71
+ Version **5.2.3** exports 53 SFMC rules. Every rule retains version-pinned documentation metadata, and release checks verify the tagged documentation and packed npm artifact. The AMPscript parser adapter exposes ESLint-compatible comment tokens, allowing core comment rules such as `spaced-comment` to validate and autofix comments without changing the canonical AMPscript AST.
72
72
 
73
73
  ## Configs
74
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-sfmc",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "description": "ESLint plugin for Salesforce Marketing Cloud Engagement+Next - AMPscript, Server-Side JavaScript (SSJS) and Handlebars",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -105,7 +105,17 @@ function annotateNode(node, lineStarts, comments) {
105
105
  }
106
106
 
107
107
  if (node.type === 'Comment') {
108
- comments.push(node);
108
+ const isBlock = node.value.startsWith('/*');
109
+ const value = node.value.slice(2);
110
+ comments.push({
111
+ type: isBlock ? 'Block' : 'Line',
112
+ value: isBlock && value.endsWith('*/') ? value.slice(0, -2) : value,
113
+ range: [...node.range],
114
+ loc: {
115
+ start: { ...node.loc.start },
116
+ end: { ...node.loc.end },
117
+ },
118
+ });
109
119
  }
110
120
 
111
121
  const keys = visitorKeys[node.type];