@so1ve/eslint-plugin 0.84.0 → 0.86.0

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
@@ -244,7 +244,7 @@ const noInlineTypeImport = createEslintRule({
244
244
  context.report({
245
245
  loc: node.loc,
246
246
  messageId: "noInlineTypeImport",
247
- *fix(fixer) {
247
+ fix(fixer) {
248
248
  const typeSpecifiersText = typeSpecifiers.map((s) => sourceCode.getText(s).replace("type ", "")).join(", ");
249
249
  const valueSpecifiersText = valueSpecifiers.map((s) => sourceCode.getText(s)).join(", ");
250
250
  const defaultImportSpecifierText = sourceCode.getText(
@@ -255,16 +255,16 @@ const noInlineTypeImport = createEslintRule({
255
255
  `import type { ${typeSpecifiersText} } from "${node.source.value}";`,
256
256
  defaultAndvalueSpecifiersText
257
257
  ];
258
- yield fixer.replaceText(node, texts.join("\n"));
258
+ return fixer.replaceText(node, texts.join("\n"));
259
259
  }
260
260
  });
261
261
  } else if (typeSpecifiers.length > 0) {
262
262
  context.report({
263
263
  loc: node.loc,
264
264
  messageId: "noInlineTypeImport",
265
- *fix(fixer) {
265
+ fix(fixer) {
266
266
  const typeSpecifiersText = typeSpecifiers.map((s) => sourceCode.getText(s).replace("type ", "")).join(", ");
267
- yield fixer.replaceText(
267
+ return fixer.replaceText(
268
268
  node,
269
269
  `import type { ${typeSpecifiersText} } from "${node.source.value}";`
270
270
  );
package/dist/index.mjs CHANGED
@@ -242,7 +242,7 @@ const noInlineTypeImport = createEslintRule({
242
242
  context.report({
243
243
  loc: node.loc,
244
244
  messageId: "noInlineTypeImport",
245
- *fix(fixer) {
245
+ fix(fixer) {
246
246
  const typeSpecifiersText = typeSpecifiers.map((s) => sourceCode.getText(s).replace("type ", "")).join(", ");
247
247
  const valueSpecifiersText = valueSpecifiers.map((s) => sourceCode.getText(s)).join(", ");
248
248
  const defaultImportSpecifierText = sourceCode.getText(
@@ -253,16 +253,16 @@ const noInlineTypeImport = createEslintRule({
253
253
  `import type { ${typeSpecifiersText} } from "${node.source.value}";`,
254
254
  defaultAndvalueSpecifiersText
255
255
  ];
256
- yield fixer.replaceText(node, texts.join("\n"));
256
+ return fixer.replaceText(node, texts.join("\n"));
257
257
  }
258
258
  });
259
259
  } else if (typeSpecifiers.length > 0) {
260
260
  context.report({
261
261
  loc: node.loc,
262
262
  messageId: "noInlineTypeImport",
263
- *fix(fixer) {
263
+ fix(fixer) {
264
264
  const typeSpecifiersText = typeSpecifiers.map((s) => sourceCode.getText(s).replace("type ", "")).join(", ");
265
- yield fixer.replaceText(
265
+ return fixer.replaceText(
266
266
  node,
267
267
  `import type { ${typeSpecifiersText} } from "${node.source.value}";`
268
268
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@so1ve/eslint-plugin",
3
- "version": "0.84.0",
3
+ "version": "0.86.0",
4
4
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
5
5
  "contributors": [
6
6
  {
@@ -31,12 +31,12 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@typescript-eslint/utils": "^5.59.5",
35
- "@vue/reactivity": "^3.2.47"
34
+ "@typescript-eslint/utils": "^5.59.6",
35
+ "@vue/reactivity": "^3.3.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/node": "^18.16.6",
39
- "@typescript-eslint/types": "^5.59.5"
38
+ "@types/node": "^18.16.10",
39
+ "@typescript-eslint/types": "^5.59.6"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",