@unocss/eslint-plugin 0.59.0 → 0.59.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/dist/index.cjs CHANGED
@@ -311,10 +311,11 @@ const enforceClassCompile = createRule({
311
311
  });
312
312
  }
313
313
  };
314
- if (context.parserServices == null || context.parserServices.defineTemplateBodyVisitor == null) {
314
+ const parserServices = context?.sourceCode.parserServices || context.parserServices;
315
+ if (parserServices == null || parserServices.defineTemplateBodyVisitor == null) {
315
316
  return scriptVisitor;
316
317
  } else {
317
- return context.parserServices?.defineTemplateBodyVisitor(templateBodyVisitor, scriptVisitor);
318
+ return parserServices?.defineTemplateBodyVisitor(templateBodyVisitor, scriptVisitor);
318
319
  }
319
320
  }
320
321
  });
package/dist/index.mjs CHANGED
@@ -305,10 +305,11 @@ const enforceClassCompile = createRule({
305
305
  });
306
306
  }
307
307
  };
308
- if (context.parserServices == null || context.parserServices.defineTemplateBodyVisitor == null) {
308
+ const parserServices = context?.sourceCode.parserServices || context.parserServices;
309
+ if (parserServices == null || parserServices.defineTemplateBodyVisitor == null) {
309
310
  return scriptVisitor;
310
311
  } else {
311
- return context.parserServices?.defineTemplateBodyVisitor(templateBodyVisitor, scriptVisitor);
312
+ return parserServices?.defineTemplateBodyVisitor(templateBodyVisitor, scriptVisitor);
312
313
  }
313
314
  }
314
315
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/eslint-plugin",
3
3
  "type": "module",
4
- "version": "0.59.0",
4
+ "version": "0.59.1",
5
5
  "description": "ESLint plugin for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -35,15 +35,15 @@
35
35
  "node": ">=14"
36
36
  },
37
37
  "dependencies": {
38
- "@typescript-eslint/utils": "^7.5.0",
38
+ "@typescript-eslint/utils": "^7.6.0",
39
39
  "magic-string": "^0.30.9",
40
40
  "synckit": "^0.9.0",
41
- "@unocss/config": "0.59.0",
42
- "@unocss/core": "0.59.0"
41
+ "@unocss/config": "0.59.1",
42
+ "@unocss/core": "0.59.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "vue-eslint-parser": "^9.4.2",
46
- "@unocss/eslint-plugin": "0.59.0"
46
+ "@unocss/eslint-plugin": "0.59.1"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "unbuild",