@rotki/eslint-plugin 0.2.0 → 0.3.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.
Files changed (3) hide show
  1. package/dist/index.cjs +18 -17
  2. package/dist/index.mjs +19 -18
  3. package/package.json +13 -13
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.3.0";
27
+ const packageManager = "pnpm@8.15.0";
28
28
  const type = "module";
29
29
  const license = "AGPL-3.0";
30
30
  const bugs = {
@@ -70,38 +70,38 @@ 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
- "@commitlint/cli": "18.5.0",
83
- "@commitlint/config-conventional": "18.5.0",
84
- "@rotki/eslint-config": "2.3.0",
82
+ "@commitlint/cli": "18.6.0",
83
+ "@commitlint/config-conventional": "18.6.0",
84
+ "@rotki/eslint-config": "2.4.4",
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",
94
- husky: "8.0.3",
94
+ husky: "9.0.7",
95
95
  "lint-staged": "15.2.0",
96
96
  rimraf: "5.0.5",
97
97
  "ts-node": "10.9.2",
98
98
  typescript: "5.3.3",
99
99
  unbuild: "2.0.0",
100
100
  vitepress: "1.0.0-rc.40",
101
- vitest: "1.2.1"
101
+ vitest: "1.2.2"
102
102
  };
103
103
  const engines = {
104
- node: ">=18.0.0",
104
+ node: ">=20",
105
105
  pnpm: ">=8 <9"
106
106
  };
107
107
  const pkg = {
@@ -447,7 +447,7 @@ const noDeprecatedComponents = createEslintRule({
447
447
  debug$1(`${tag} has been deprecated`);
448
448
  context.report({
449
449
  data: {
450
- name: scule.snakeCase(tag)
450
+ name: tag
451
451
  },
452
452
  messageId: "deprecated",
453
453
  node: element
@@ -456,7 +456,7 @@ const noDeprecatedComponents = createEslintRule({
456
456
  debug$1(`${tag} has will be removed`);
457
457
  context.report({
458
458
  data: {
459
- name: scule.snakeCase(tag)
459
+ name: tag
460
460
  },
461
461
  fix(fixer) {
462
462
  return [
@@ -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
@@ -1,11 +1,11 @@
1
1
  import createDebug from 'debug';
2
2
  import { extname } from 'node:path';
3
3
  import * as compat from 'eslint-compat-utils';
4
- import { pascalCase, snakeCase, kebabCase } from 'scule';
4
+ import { pascalCase, 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.3.0";
8
+ const packageManager = "pnpm@8.15.0";
9
9
  const type = "module";
10
10
  const license = "AGPL-3.0";
11
11
  const bugs = {
@@ -51,38 +51,38 @@ 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
- "@commitlint/cli": "18.5.0",
64
- "@commitlint/config-conventional": "18.5.0",
65
- "@rotki/eslint-config": "2.3.0",
63
+ "@commitlint/cli": "18.6.0",
64
+ "@commitlint/config-conventional": "18.6.0",
65
+ "@rotki/eslint-config": "2.4.4",
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",
75
- husky: "8.0.3",
75
+ husky: "9.0.7",
76
76
  "lint-staged": "15.2.0",
77
77
  rimraf: "5.0.5",
78
78
  "ts-node": "10.9.2",
79
79
  typescript: "5.3.3",
80
80
  unbuild: "2.0.0",
81
81
  vitepress: "1.0.0-rc.40",
82
- vitest: "1.2.1"
82
+ vitest: "1.2.2"
83
83
  };
84
84
  const engines = {
85
- node: ">=18.0.0",
85
+ node: ">=20",
86
86
  pnpm: ">=8 <9"
87
87
  };
88
88
  const pkg = {
@@ -428,7 +428,7 @@ const noDeprecatedComponents = createEslintRule({
428
428
  debug$1(`${tag} has been deprecated`);
429
429
  context.report({
430
430
  data: {
431
- name: snakeCase(tag)
431
+ name: tag
432
432
  },
433
433
  messageId: "deprecated",
434
434
  node: element
@@ -437,7 +437,7 @@ const noDeprecatedComponents = createEslintRule({
437
437
  debug$1(`${tag} has will be removed`);
438
438
  context.report({
439
439
  data: {
440
- name: snakeCase(tag)
440
+ name: tag
441
441
  },
442
442
  fix(fixer) {
443
443
  return [
@@ -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.3.0",
4
+ "packageManager": "pnpm@8.15.0",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0",
7
7
  "bugs": {
@@ -30,38 +30,38 @@
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
- "@commitlint/cli": "18.5.0",
43
- "@commitlint/config-conventional": "18.5.0",
44
- "@rotki/eslint-config": "2.3.0",
42
+ "@commitlint/cli": "18.6.0",
43
+ "@commitlint/config-conventional": "18.6.0",
44
+ "@rotki/eslint-config": "2.4.4",
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",
54
- "husky": "8.0.3",
54
+ "husky": "9.0.7",
55
55
  "lint-staged": "15.2.0",
56
56
  "rimraf": "5.0.5",
57
57
  "ts-node": "10.9.2",
58
58
  "typescript": "5.3.3",
59
59
  "unbuild": "2.0.0",
60
60
  "vitepress": "1.0.0-rc.40",
61
- "vitest": "1.2.1"
61
+ "vitest": "1.2.2"
62
62
  },
63
63
  "engines": {
64
- "node": ">=18.0.0",
64
+ "node": ">=20",
65
65
  "pnpm": ">=8 <9"
66
66
  },
67
67
  "lint-staged": {