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 +1 -1
- package/package.json +1 -1
- package/src/ampscript-parser.js +11 -1
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.
|
|
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
package/src/ampscript-parser.js
CHANGED
|
@@ -105,7 +105,17 @@ function annotateNode(node, lineStarts, comments) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
if (node.type === 'Comment') {
|
|
108
|
-
|
|
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];
|