@rotki/eslint-plugin 0.2.0 → 0.2.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
@@ -23,8 +23,8 @@ const createDebug__default = /*#__PURE__*/_interopDefaultCompat(createDebug);
23
23
  const compat__namespace = /*#__PURE__*/_interopNamespaceCompat(compat);
24
24
 
25
25
  const name = "@rotki/eslint-plugin";
26
- const version = "0.2.0";
27
- const packageManager = "pnpm@8.14.1";
26
+ const version = "0.2.1";
27
+ const packageManager = "pnpm@8.14.3";
28
28
  const type = "module";
29
29
  const license = "AGPL-3.0";
30
30
  const bugs = {
@@ -70,24 +70,24 @@ const peerDependencies = {
70
70
  eslint: "^8.0.0 || ^9.0.0"
71
71
  };
72
72
  const dependencies = {
73
- "@typescript-eslint/utils": "6.19.0",
73
+ "@typescript-eslint/utils": "6.19.1",
74
74
  debug: "4.3.4",
75
75
  "eslint-compat-utils": "0.4.1",
76
76
  "jsonc-eslint-parser": "2.4.0",
77
77
  scule: "1.2.0",
78
- "vue-eslint-parser": "9.4.1",
78
+ "vue-eslint-parser": "9.4.2",
79
79
  "yaml-eslint-parser": "1.2.2"
80
80
  };
81
81
  const devDependencies = {
82
82
  "@commitlint/cli": "18.5.0",
83
83
  "@commitlint/config-conventional": "18.5.0",
84
- "@rotki/eslint-config": "2.3.0",
84
+ "@rotki/eslint-config": "2.4.1",
85
85
  "@types/debug": "4.1.12",
86
86
  "@types/eslint": "8.56.2",
87
87
  "@types/node": "20",
88
- "@typescript-eslint/eslint-plugin": "6.19.0",
89
- "@typescript-eslint/parser": "6.19.0",
90
- "@typescript-eslint/rule-tester": "6.19.0",
88
+ "@typescript-eslint/eslint-plugin": "6.19.1",
89
+ "@typescript-eslint/parser": "6.19.1",
90
+ "@typescript-eslint/rule-tester": "6.19.1",
91
91
  bumpp: "9.3.0",
92
92
  debug: "4.3.4",
93
93
  eslint: "8.56.0",
@@ -574,11 +574,12 @@ const noLegacyLibraryImport = createEslintRule({
574
574
  create(context) {
575
575
  return {
576
576
  ImportDeclaration(node) {
577
- if (node.source.value !== legacyLibrary)
577
+ if (!node.source.value.startsWith(legacyLibrary))
578
578
  return;
579
+ const replacement = node.source.value.replace(legacyLibrary, newLibrary);
579
580
  context.report({
580
581
  fix(fixer) {
581
- return fixer.replaceText(node.source, `'${newLibrary}'`);
582
+ return fixer.replaceText(node.source, `'${replacement}'`);
582
583
  },
583
584
  messageId: "replacedWith",
584
585
  node: node.source
package/dist/index.mjs CHANGED
@@ -4,8 +4,8 @@ import * as compat from 'eslint-compat-utils';
4
4
  import { pascalCase, snakeCase, kebabCase } from 'scule';
5
5
 
6
6
  const name = "@rotki/eslint-plugin";
7
- const version = "0.2.0";
8
- const packageManager = "pnpm@8.14.1";
7
+ const version = "0.2.1";
8
+ const packageManager = "pnpm@8.14.3";
9
9
  const type = "module";
10
10
  const license = "AGPL-3.0";
11
11
  const bugs = {
@@ -51,24 +51,24 @@ const peerDependencies = {
51
51
  eslint: "^8.0.0 || ^9.0.0"
52
52
  };
53
53
  const dependencies = {
54
- "@typescript-eslint/utils": "6.19.0",
54
+ "@typescript-eslint/utils": "6.19.1",
55
55
  debug: "4.3.4",
56
56
  "eslint-compat-utils": "0.4.1",
57
57
  "jsonc-eslint-parser": "2.4.0",
58
58
  scule: "1.2.0",
59
- "vue-eslint-parser": "9.4.1",
59
+ "vue-eslint-parser": "9.4.2",
60
60
  "yaml-eslint-parser": "1.2.2"
61
61
  };
62
62
  const devDependencies = {
63
63
  "@commitlint/cli": "18.5.0",
64
64
  "@commitlint/config-conventional": "18.5.0",
65
- "@rotki/eslint-config": "2.3.0",
65
+ "@rotki/eslint-config": "2.4.1",
66
66
  "@types/debug": "4.1.12",
67
67
  "@types/eslint": "8.56.2",
68
68
  "@types/node": "20",
69
- "@typescript-eslint/eslint-plugin": "6.19.0",
70
- "@typescript-eslint/parser": "6.19.0",
71
- "@typescript-eslint/rule-tester": "6.19.0",
69
+ "@typescript-eslint/eslint-plugin": "6.19.1",
70
+ "@typescript-eslint/parser": "6.19.1",
71
+ "@typescript-eslint/rule-tester": "6.19.1",
72
72
  bumpp: "9.3.0",
73
73
  debug: "4.3.4",
74
74
  eslint: "8.56.0",
@@ -555,11 +555,12 @@ const noLegacyLibraryImport = createEslintRule({
555
555
  create(context) {
556
556
  return {
557
557
  ImportDeclaration(node) {
558
- if (node.source.value !== legacyLibrary)
558
+ if (!node.source.value.startsWith(legacyLibrary))
559
559
  return;
560
+ const replacement = node.source.value.replace(legacyLibrary, newLibrary);
560
561
  context.report({
561
562
  fix(fixer) {
562
- return fixer.replaceText(node.source, `'${newLibrary}'`);
563
+ return fixer.replaceText(node.source, `'${replacement}'`);
563
564
  },
564
565
  messageId: "replacedWith",
565
566
  node: node.source
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rotki/eslint-plugin",
3
- "version": "0.2.0",
4
- "packageManager": "pnpm@8.14.1",
3
+ "version": "0.2.1",
4
+ "packageManager": "pnpm@8.14.3",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0",
7
7
  "bugs": {
@@ -30,24 +30,24 @@
30
30
  "eslint": "^8.0.0 || ^9.0.0"
31
31
  },
32
32
  "dependencies": {
33
- "@typescript-eslint/utils": "6.19.0",
33
+ "@typescript-eslint/utils": "6.19.1",
34
34
  "debug": "4.3.4",
35
35
  "eslint-compat-utils": "0.4.1",
36
36
  "jsonc-eslint-parser": "2.4.0",
37
37
  "scule": "1.2.0",
38
- "vue-eslint-parser": "9.4.1",
38
+ "vue-eslint-parser": "9.4.2",
39
39
  "yaml-eslint-parser": "1.2.2"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@commitlint/cli": "18.5.0",
43
43
  "@commitlint/config-conventional": "18.5.0",
44
- "@rotki/eslint-config": "2.3.0",
44
+ "@rotki/eslint-config": "2.4.1",
45
45
  "@types/debug": "4.1.12",
46
46
  "@types/eslint": "8.56.2",
47
47
  "@types/node": "20",
48
- "@typescript-eslint/eslint-plugin": "6.19.0",
49
- "@typescript-eslint/parser": "6.19.0",
50
- "@typescript-eslint/rule-tester": "6.19.0",
48
+ "@typescript-eslint/eslint-plugin": "6.19.1",
49
+ "@typescript-eslint/parser": "6.19.1",
50
+ "@typescript-eslint/rule-tester": "6.19.1",
51
51
  "bumpp": "9.3.0",
52
52
  "debug": "4.3.4",
53
53
  "eslint": "8.56.0",