[TASK] update prettier-plugin-sfmc to 2.3.0 and eslint-plugin-sfmc to 5.4.0

Open
#2,731 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
eslint, javascript, node.js

Research direction

Start with package.json and the lockfile, then check the Unicorn compatibility cap for eslint-plugin-sfmc 5.4.0 before changing eslint-plugin-unicorn. Update both pinned versions and refresh the lockfile. Run the tests and inspect retrieve fixtures containing Handlebars; done when the checks pass and expected helper casing changes are accounted for.

Written by the indexing model from the issue text.

Description

chore dependencies
What

mcdev pins two formatting and linting packages to exact versions. Both got a new release that knows the Handlebars helpers Marketing Cloud Next added with API version 68:

Package Pinned New
prettier-plugin-sfmc 2.2.1 2.3.0
eslint-plugin-sfmc 5.3.0 5.4.0
Why it matters
  • Formatting on retrieve and deploy: with 2.3.0 the formatter recases the 22 new helper names to their catalogue spelling, for example {{MD5 x}} becomes {{md5 x}}. Named arguments such as charset="UTF-8" are left as they are.
  • Linting: with 5.4.0 the Handlebars rules know the 22 new helpers (md5, sha256, base64Encode, regExMatch, datePart, buildUrl, encodeURIComponent, isEmailAddress, …). With 5.3.0 they are reported as unknown helpers. The apiVersion option now also names 68 (Winter '27).
  • Projects created with mcdev init / mcdev upgrade inherit these versions.
To do
  • Bump prettier-plugin-sfmc to 2.3.0 and eslint-plugin-sfmc to 5.4.0 in package.json, refresh the lockfile
  • Check the Unicorn compatibility cap for eslint-plugin-sfmc 5.4.0 before touching eslint-plugin-unicorn
  • Run tests; retrieve fixtures that contain Handlebars may change in the casing of the new helper names
Release notes of the two packages
Dominant language
JavaScript
Stars
166
Forks
50
Avg merge
11h 4m
Merged PRs (30d)
36

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Accenture/sfmc-devtools

All issues in Accenture/sfmc-devtools

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.