eslint-plugin-sfmc 4.9.0 → 4.9.1

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
@@ -182,7 +182,7 @@ Severities above are the same in `embedded`, `strict`, `embedded-next`, and `str
182
182
 
183
183
  [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn) is a high-quality, widely used plugin that we **strongly recommend** — but it is built for modern JavaScript, not SFMC's **SSJS** runtime. SFMC SSJS runs on a JINT-based ES3/ES5-era engine that lacks many built-ins (`Array#includes`, `String#startsWith`, `Set`, `Map`, `Object.fromEntries`, `Math.trunc`, spread `...`, ES modules, `async`/`await`, …).
184
184
 
185
- If you enable unicorn's `recommended` set on SSJS, about **46** of its 300 recommended rules would either **autofix your code to a missing built-in** (breaking it at runtime) or **forbid a required SFMC workaround**. `eslint-plugin-sfmc` offers an **optional** override config that turns off exactly those 46 rules for SSJS.
185
+ If you enable unicorn's `recommended` set on SSJS, about **46** of its 308 recommended rules would either **autofix your code to a missing built-in** (breaking it at runtime) or **forbid a required SFMC workaround**. `eslint-plugin-sfmc` offers an **optional** override config that turns off exactly those 46 rules for SSJS.
186
186
 
187
187
  **Important — this is optional and only needed if you use unicorn.** `eslint-plugin-sfmc` does **not** depend on or load unicorn. The override configs are plain rules objects with **no** `plugins` key, so they only resolve when your own unicorn config (which registers the `unicorn` plugin) is loaded **earlier** in the flat-config array. Spread the sfmc override **after** it:
188
188
 
@@ -204,7 +204,7 @@ export default [
204
204
  | `sfmc.configs['unicorn-ssjs']` | `**/*.ssjs` | Turns off the 46 SFMC-incompatible unicorn rules for SSJS |
205
205
  | `sfmc.configs['unicorn-ssjs-embedded']` | `**/*.html/*.js` | Same 46-rule override for SSJS embedded in HTML |
206
206
 
207
- Only **46** of unicorn's 300 recommended rules are overridden — the other **254** stay active. If you don't use unicorn, omit these configs entirely. For the full rule-by-rule breakdown (with rationale and SFMC evidence links, pinned to unicorn v71.1.0), see [docs/unicorn-compatibility.md](docs/unicorn-compatibility.md).
207
+ Only **46** of unicorn's 308 recommended rules are overridden — the other **262** stay active. If you don't use unicorn, omit these configs entirely. For the full rule-by-rule breakdown (with rationale and SFMC evidence links, pinned to unicorn v73.0.0), see [docs/unicorn-compatibility.md](docs/unicorn-compatibility.md).
208
208
 
209
209
  ## Processors
210
210
 
@@ -1,15 +1,15 @@
1
1
  # `eslint-plugin-unicorn` compatibility with SFMC SSJS
2
2
 
3
- > **Compatibility analysis for [`eslint-plugin-unicorn@71.1.0`](https://github.com/sindresorhus/eslint-plugin-unicorn).**
3
+ > **Compatibility analysis for [`eslint-plugin-unicorn@73.0.0`](https://github.com/sindresorhus/eslint-plugin-unicorn).**
4
4
  >
5
- > ⚠️ **Version warning:** This classification was done against `eslint-plugin-unicorn` **v71.1.0** (300 recommended rules). Newer versions of unicorn may add, rename, or change rules that are **not** yet classified here. Re-audit this page whenever you upgrade unicorn — a rule added in a later version could autofix SSJS into runtime-breaking code without being in the override list below.
5
+ > ⚠️ **Version warning:** This classification was done against `eslint-plugin-unicorn` **v73.0.0** (308 recommended rules). Newer versions of unicorn may add, rename, or change rules that are **not** yet classified here. Re-audit this page whenever you upgrade unicorn — a rule added in a later version could autofix SSJS into runtime-breaking code without being in the override list below.
6
6
 
7
7
  `eslint-plugin-unicorn` is an excellent, actively maintained plugin that we **strongly recommend** — but it targets modern JavaScript engines, not the Salesforce Marketing Cloud **SSJS** runtime. SFMC SSJS runs on a JINT-based ES3/ES5-era engine that is missing many built-ins (`Array#includes`, `String#startsWith`, `Set`, `Map`, `Object.fromEntries`, `Math.trunc`, spread `...`, ES modules, `async`/`await`, …). See the SFMC evidence pages:
8
8
 
9
9
  - **ECMAScript built-ins support** — <https://ssjs.guide/ecmascript-builtins/>
10
10
  - **Engine limitations** — <https://ssjs.guide/engine-limitations/>
11
11
 
12
- Of unicorn's **300** recommended rules (v71.1.0), **254** are safe to keep on for SSJS and **46** should be turned off. `eslint-plugin-sfmc` ships an **optional** override config (`unicorn-ssjs` / `unicorn-ssjs-embedded`) that turns off exactly those 46 for SSJS files. `eslint-plugin-sfmc` does **not** depend on or load unicorn — the override only takes effect when you have loaded unicorn yourself. See [Section 1](#section-1--how-to-apply).
12
+ Of unicorn's **308** recommended rules (v73.0.0), **262** are safe to keep on for SSJS and **46** should be turned off. `eslint-plugin-sfmc` ships an **optional** override config (`unicorn-ssjs` / `unicorn-ssjs-embedded`) that turns off exactly those 46 for SSJS files. `eslint-plugin-sfmc` does **not** depend on or load unicorn — the override only takes effect when you have loaded unicorn yourself. See [Section 1](#section-1--how-to-apply).
13
13
 
14
14
  ---
15
15
 
@@ -41,7 +41,7 @@ If you don't use unicorn, omit these configs entirely — nothing else in `eslin
41
41
 
42
42
  ## Section 2 — Rules to override for SSJS (46)
43
43
 
44
- These 46 recommended rules either **autofix code to a missing built-in**, **forbid a documented SFMC workaround**, or **enforce ES-module / async / ES6-only syntax** the engine cannot run. The override config sets each to `'off'` for SSJS. All 46 are confirmed `recommended` in unicorn v71.1.0.
44
+ These 46 recommended rules either **autofix code to a missing built-in**, **forbid a documented SFMC workaround**, or **enforce ES-module / async / ES6-only syntax** the engine cannot run. The override config sets each to `'off'` for SSJS. All 46 are confirmed `recommended` in unicorn v73.0.0.
45
45
 
46
46
  ### Group A — autofix to a missing built-in / forbid a SFMC workaround (41)
47
47
 
@@ -103,11 +103,11 @@ These 46 recommended rules either **autofix code to a missing built-in**, **forb
103
103
 
104
104
  ---
105
105
 
106
- ## Section 3 — Rules OK as-is (254)
106
+ ## Section 3 — Rules OK as-is (262)
107
107
 
108
108
  These recommended rules are **not** disabled by the override config. They are either genuinely SFMC-safe (readability / best-practice rules that work on the ES3/ES5 engine) or **inert** on SSJS — many target the DOM, Node.js, Promises, TypeScript, or ES modules and therefore never fire on server-side SFMC code. Each links to its official unicorn documentation.
109
109
 
110
- <!-- BEGIN 254-OK-LIST -->
110
+ <!-- BEGIN 262-OK-LIST -->
111
111
  - [better-dom-traversing](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-dom-traversing.md)
112
112
  - [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md)
113
113
  - [class-reference-in-static-methods](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/class-reference-in-static-methods.md)
@@ -150,8 +150,8 @@ These recommended rules are **not** disabled by the override config. They are ei
150
150
  - [no-array-from-fill](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-from-fill.md)
151
151
  - [no-array-method-this-argument](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md)
152
152
  - [no-array-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reduce.md)
153
- - [no-array-sort](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort.md)
154
153
  - [no-array-sort-for-min-max](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort-for-min-max.md)
154
+ - [no-array-sort](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort.md)
155
155
  - [no-array-splice](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-splice.md)
156
156
  - [no-async-promise-finally](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-async-promise-finally.md)
157
157
  - [no-await-expression-member](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md)
@@ -195,6 +195,7 @@ These recommended rules are **not** disabled by the override config. They are ei
195
195
  - [no-magic-array-flat-depth](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-magic-array-flat-depth.md)
196
196
  - [no-mismatched-map-key](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-mismatched-map-key.md)
197
197
  - [no-misrefactored-assignment](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-misrefactored-assignment.md)
198
+ - [no-multiple-promise-resolver-calls](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-multiple-promise-resolver-calls.md)
198
199
  - [no-named-default](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-named-default.md)
199
200
  - [no-negated-array-predicate](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-array-predicate.md)
200
201
  - [no-negated-comparison](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-comparison.md)
@@ -213,6 +214,7 @@ These recommended rules are **not** disabled by the override config. They are ei
213
214
  - [no-redundant-comparison](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-redundant-comparison.md)
214
215
  - [no-return-array-push](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-return-array-push.md)
215
216
  - [no-selector-as-dom-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-selector-as-dom-name.md)
217
+ - [no-shorthand-property-overrides](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-shorthand-property-overrides.md)
216
218
  - [no-single-promise-in-promise-methods](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-single-promise-in-promise-methods.md)
217
219
  - [no-static-only-class](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md)
218
220
  - [no-subtraction-comparison](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-subtraction-comparison.md)
@@ -221,6 +223,7 @@ These recommended rules are **not** disabled by the override config. They are ei
221
223
  - [no-this-outside-of-class](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-outside-of-class.md)
222
224
  - [no-top-level-assignment-in-function](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-top-level-assignment-in-function.md)
223
225
  - [no-top-level-side-effects](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-top-level-side-effects.md)
226
+ - [no-transition-all](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-transition-all.md)
224
227
  - [no-typeof-undefined](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md)
225
228
  - [no-uncalled-method](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-uncalled-method.md)
226
229
  - [no-undeclared-class-members](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-undeclared-class-members.md)
@@ -243,6 +246,7 @@ These recommended rules are **not** disabled by the override config. They are ei
243
246
  - [no-unsafe-buffer-conversion](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-buffer-conversion.md)
244
247
  - [no-unsafe-promise-all-settled-values](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-promise-all-settled-values.md)
245
248
  - [no-unsafe-property-key](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-property-key.md)
249
+ - [no-unsafe-sqlite-interpolation](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-sqlite-interpolation.md)
246
250
  - [no-unsafe-string-replacement](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-string-replacement.md)
247
251
  - [no-unused-array-method-return](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unused-array-method-return.md)
248
252
  - [no-useless-boolean-cast](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-boolean-cast.md)
@@ -260,6 +264,7 @@ These recommended rules are **not** disabled by the override config. They are ei
260
264
  - [no-useless-logical-operand](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-logical-operand.md)
261
265
  - [no-useless-override](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-override.md)
262
266
  - [no-useless-promise-resolve-reject](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md)
267
+ - [no-useless-re-export](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-re-export.md)
263
268
  - [no-useless-recursion](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-recursion.md)
264
269
  - [no-useless-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md)
265
270
  - [no-useless-switch-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md)
@@ -272,8 +277,8 @@ These recommended rules are **not** disabled by the override config. They are ei
272
277
  - [operator-assignment](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/operator-assignment.md)
273
278
  - [prefer-abort-signal-any](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-abort-signal-any.md)
274
279
  - [prefer-abort-signal-timeout](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-abort-signal-timeout.md)
275
- - [prefer-add-event-listener](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md)
276
280
  - [prefer-add-event-listener-options](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener-options.md)
281
+ - [prefer-add-event-listener](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md)
277
282
  - [prefer-aggregate-error](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-aggregate-error.md)
278
283
  - [prefer-array-from-map](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-from-map.md)
279
284
  - [prefer-array-from-range](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-from-range.md)
@@ -290,6 +295,7 @@ These recommended rules are **not** disabled by the override config. They are ei
290
295
  - [prefer-default-parameters](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-default-parameters.md)
291
296
  - [prefer-direct-iteration](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-direct-iteration.md)
292
297
  - [prefer-dom-node-append](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-append.md)
298
+ - [prefer-dom-node-html-methods](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-html-methods.md)
293
299
  - [prefer-dom-node-remove](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-remove.md)
294
300
  - [prefer-dom-node-replace-children](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-replace-children.md)
295
301
  - [prefer-dom-node-text-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-text-content.md)
@@ -305,8 +311,8 @@ These recommended rules are **not** disabled by the override config. They are ei
305
311
  - [prefer-identifier-import-export-specifiers](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-identifier-import-export-specifiers.md)
306
312
  - [prefer-includes-over-repeated-comparisons](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes-over-repeated-comparisons.md)
307
313
  - [prefer-iterable-in-constructor](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterable-in-constructor.md)
308
- - [prefer-iterator-to-array](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-to-array.md)
309
314
  - [prefer-iterator-to-array-at-end](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-to-array-at-end.md)
315
+ - [prefer-iterator-to-array](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-to-array.md)
310
316
  - [prefer-keyboard-event-key](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-keyboard-event-key.md)
311
317
  - [prefer-location-assign](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-location-assign.md)
312
318
  - [prefer-logical-operator-over-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md)
@@ -340,6 +346,7 @@ These recommended rules are **not** disabled by the override config. They are ei
340
346
  - [prefer-split-limit](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-split-limit.md)
341
347
  - [prefer-switch](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md)
342
348
  - [prefer-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md)
349
+ - [prefer-then-catch](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-then-catch.md)
343
350
  - [prefer-toggle-attribute](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-toggle-attribute.md)
344
351
  - [prefer-type-error](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md)
345
352
  - [prefer-type-literal-last](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-literal-last.md)
@@ -357,10 +364,11 @@ These recommended rules are **not** disabled by the override config. They are ei
357
364
  - [require-number-to-fixed-digits-argument](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-number-to-fixed-digits-argument.md)
358
365
  - [require-passive-events](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-passive-events.md)
359
366
  - [require-proxy-trap-boolean-return](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-proxy-trap-boolean-return.md)
367
+ - [single-line-block-comment-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/single-line-block-comment-style.md)
360
368
  - [switch-case-braces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md)
361
369
  - [switch-case-break-position](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-break-position.md)
362
370
  - [template-indent](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md)
363
371
  - [text-encoding-identifier-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md)
364
372
  - [throw-new-error](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md)
365
- <!-- END 254-OK-LIST -->
373
+ <!-- END 262-OK-LIST -->
366
374
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-sfmc",
3
- "version": "4.9.0",
3
+ "version": "4.9.1",
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",
@@ -37,12 +37,12 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@handlebars/parser": "^2.2.2",
40
- "ampscript-data": "^3.1.0",
41
- "ampscript-parser": "^0.3.0",
40
+ "ampscript-data": "^3.1.1",
41
+ "ampscript-parser": "^0.3.1",
42
42
  "eslint-plugin-mso-email": "^2.0.0",
43
- "handlebars-data": "^0.3.0",
43
+ "handlebars-data": "^0.3.1",
44
44
  "mso-conditional-parser": "^2.0.1",
45
- "ssjs-data": "^1.2.0"
45
+ "ssjs-data": "^1.3.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "eslint": ">=9.0.0"
@@ -64,15 +64,15 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@eslint/js": "^10.0.1",
67
- "eslint": "^10.6.0",
67
+ "eslint": "^10.8.0",
68
68
  "eslint-config-prettier": "^10.1.8",
69
- "eslint-plugin-jsdoc": "^63.0.12",
69
+ "eslint-plugin-jsdoc": "^63.3.3",
70
70
  "eslint-plugin-prettier": "^5.5.6",
71
- "eslint-plugin-unicorn": "^71.1.0",
72
- "globals": "^17.7.0",
71
+ "eslint-plugin-unicorn": "^73.0.0",
72
+ "globals": "^17.9.0",
73
73
  "husky": "^9.1.7",
74
- "lint-staged": "^17.0.8",
75
- "prettier": "^3.9.4"
74
+ "lint-staged": "^17.3.0",
75
+ "prettier": "^3.9.6"
76
76
  },
77
77
  "lint-staged": {
78
78
  "*.{js,mjs,cjs}": [
package/src/index.js CHANGED
@@ -323,7 +323,9 @@ const hbsOffRules = {
323
323
  'sfmc/hbs-no-mcn-unsupported': 'off',
324
324
  };
325
325
 
326
- /** Shared languageOptions for linting virtual `.hbs` files. */
326
+ /**
327
+ * Shared languageOptions for linting virtual `.hbs` files.
328
+ */
327
329
  const hbsLanguageOptions = { parser: handlebarsParser };
328
330
 
329
331
  /**
@@ -353,7 +355,7 @@ function standaloneHandlebarsConfigs(configName) {
353
355
 
354
356
  /**
355
357
  * The 46 `eslint-plugin-unicorn` recommended rules (analysed against
356
- * unicorn v71.1.0) that are incompatible with the SFMC SSJS (JINT / ES3-ES5)
358
+ * unicorn v73.0.0) that are incompatible with the SFMC SSJS (JINT / ES3-ES5)
357
359
  * engine — they either autofix code to a missing built-in or forbid a required
358
360
  * SFMC workaround, or enforce ES-module / async / ES6-only syntax that the
359
361
  * engine cannot run. Each is mapped to `'off'`.
package/src/processor.js CHANGED
@@ -29,7 +29,9 @@ const SSJS_SCRIPT_OPEN_RE =
29
29
  /<script\b(?=[^>]*\brunat\s*=\s*['"]server['"])(?![^>]*\blanguage\s*=\s*['"]ampscript['"])[^>]*>/gi;
30
30
  const SCRIPT_CLOSE_G = /<\/script\s*>/gi;
31
31
 
32
- /** AMPscript region patterns blanked before the Handlebars parser runs. */
32
+ /**
33
+ * AMPscript region patterns blanked before the Handlebars parser runs.
34
+ */
33
35
  const AMPSCRIPT_REGION_PATTERNS = [
34
36
  /%%\[[\s\S]*?\]%%/g,
35
37
  /%%=[\s\S]*?=%%/g,
@@ -5,7 +5,9 @@
5
5
  * that ESLint diagnostics and editor diagnostics stay consistent.
6
6
  */
7
7
 
8
- /** Matches a `{!$namespace.Field}` built-in data binding token. */
8
+ /**
9
+ * Matches a `{!$namespace.Field}` built-in data binding token.
10
+ */
9
11
  export const BINDING_PATTERN = /\{!\$([A-Za-z0-9_.]+)\}/g;
10
12
 
11
13
  /**
@@ -12,9 +12,13 @@ import { BINDING_PATTERN, closestMatch } from './_shared.js';
12
12
  * than walking the AST.
13
13
  */
14
14
 
15
- /** Proper-cased built-in binding names, used for "did you mean" suggestions. */
15
+ /**
16
+ * Proper-cased built-in binding names, used for "did you mean" suggestions.
17
+ */
16
18
  const BINDING_NAME_LIST = BUILTIN_BINDINGS.map((b) => b.name);
17
- /** Map from lowercase binding name to its `{!$...}` token, for suggestion text. */
19
+ /**
20
+ * Map from lowercase binding name to its `{!$...}` token, for suggestion text.
21
+ */
18
22
  const BINDING_TOKEN_BY_NAME = new Map(BUILTIN_BINDINGS.map((b) => [b.name.toLowerCase(), b.token]));
19
23
 
20
24
  export default {
@@ -11,14 +11,18 @@ import { simpleHelperName } from './_shared.js';
11
11
  * sfmc-language-lsp.
12
12
  */
13
13
 
14
- /** AST node types that may carry an unsupported construct. */
14
+ /**
15
+ * AST node types that may carry an unsupported construct.
16
+ */
15
17
  const NODE_TYPES = unsupportedByNodeType.keys().toArray();
16
18
 
17
19
  // The handlebars-data messages contain literal `{{> ...}}`, `{{log}}`, etc. as
18
20
  // examples. ESLint treats `{{...}}` in a message template as an interpolation
19
21
  // placeholder, so the literal text is passed through a single `{{text}}`
20
22
  // placeholder instead of being baked into the template.
21
- /** messageId per construct id → passthrough template, declared statically. */
23
+ /**
24
+ * messageId per construct id → passthrough template, declared statically.
25
+ */
22
26
  const MESSAGES = Object.fromEntries(
23
27
  unsupportedByNodeType
24
28
  .values()
@@ -19,7 +19,9 @@
19
19
  * and rewrites the access to `getHeaderMap(resp)["name"]`.
20
20
  */
21
21
 
22
- /** Canonical helper inserted by the quick-fix, mirrored from ssjs.guide. */
22
+ /**
23
+ * Canonical helper inserted by the quick-fix, mirrored from ssjs.guide.
24
+ */
23
25
  const HEADER_MAP_HELPER = `/**
24
26
  * Build a plain { name: value } header map from an HttpResponse.
25
27
  * Reads only the for..in enumeration keys (shaped "[Name, Value]") so it never