eslint-plugin-formatjs 4.14.0 → 5.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-formatjs",
3
- "version": "4.14.0",
3
+ "version": "5.0.1",
4
4
  "description": "ESLint plugin for formatjs",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -29,8 +29,8 @@
29
29
  "tslib": "2.6.2",
30
30
  "typescript": "5",
31
31
  "unicode-emoji-utils": "^1.2.0",
32
- "@formatjs/icu-messageformat-parser": "2.7.8",
33
- "@formatjs/ts-transformer": "3.13.14"
32
+ "@formatjs/ts-transformer": "3.13.14",
33
+ "@formatjs/icu-messageformat-parser": "2.7.8"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "eslint": "9"
@@ -92,10 +92,11 @@ function checkNode(context, node) {
92
92
  }
93
93
  const create = (context) => {
94
94
  const callExpressionVisitor = (node) => checkNode(context, node);
95
+ const parserServices = (0, context_compat_1.getParserServices)(context);
95
96
  //@ts-expect-error defineTemplateBodyVisitor exists in Vue parser
96
- if ((0, context_compat_1.getParserServices)(context).defineTemplateBodyVisitor) {
97
+ if (parserServices?.defineTemplateBodyVisitor) {
97
98
  //@ts-expect-error
98
- return (0, context_compat_1.getParserServices)(context).defineTemplateBodyVisitor({
99
+ return parserServices.defineTemplateBodyVisitor({
99
100
  CallExpression: callExpressionVisitor,
100
101
  }, {
101
102
  CallExpression: callExpressionVisitor,