@rotki/eslint-plugin 0.5.0 → 0.6.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
@@ -24,8 +24,8 @@ const createDebug__default = /*#__PURE__*/_interopDefaultCompat(createDebug);
24
24
  const compat__namespace = /*#__PURE__*/_interopNamespaceCompat(compat);
25
25
 
26
26
  const name = "@rotki/eslint-plugin";
27
- const version = "0.5.0";
28
- const packageManager = "pnpm@9.7.0";
27
+ const version = "0.6.1";
28
+ const packageManager = "pnpm@9.15.0";
29
29
  const type = "module";
30
30
  const license = "AGPL-3.0";
31
31
  const bugs = {
@@ -54,6 +54,7 @@ const scripts = {
54
54
  clean: "rimraf .nyc_output coverage dist docs/.vitepress/dist",
55
55
  coverage: "nyc report --reporter lcov && opener coverage/lcov-report/index.html",
56
56
  generate: "node --experimental-specifier-resolution=node --loader ts-node/esm scripts/update-rule-docs.ts",
57
+ "generate:index": "node --experimental-specifier-resolution=node --loader ts-node/esm scripts/update-docs-index.ts",
57
58
  lint: "eslint .",
58
59
  "lint:fix": "eslint . --fix",
59
60
  build: "unbuild",
@@ -63,7 +64,7 @@ const scripts = {
63
64
  "test:coverage": "vitest run --coverage",
64
65
  "new": "node --experimental-specifier-resolution=node --loader ts-node/esm ./scripts/new-rule.ts",
65
66
  docs: "vitepress dev docs",
66
- "docs:build": "pnpm run generate && vitepress build docs",
67
+ "docs:build": "pnpm run generate && pnpm run generate:index && vitepress build docs",
67
68
  prepare: "husky",
68
69
  typecheck: "tsc --noEmit",
69
70
  release: "bumpp -r --no-push"
@@ -72,36 +73,35 @@ const peerDependencies = {
72
73
  eslint: "^9.0.0"
73
74
  };
74
75
  const dependencies = {
75
- "@typescript-eslint/utils": "8.1.0",
76
- debug: "4.3.6",
77
- "eslint-compat-utils": "0.5.1",
76
+ "@typescript-eslint/utils": "8.18.0",
77
+ debug: "4.4.0",
78
+ "eslint-compat-utils": "0.6.4",
78
79
  "jsonc-eslint-parser": "2.4.0",
79
80
  scule: "1.3.0",
80
81
  "vue-eslint-parser": "9.4.3",
81
82
  "yaml-eslint-parser": "1.2.3"
82
83
  };
83
84
  const devDependencies = {
84
- "@commitlint/cli": "19.4.0",
85
- "@commitlint/config-conventional": "19.2.2",
86
- "@rotki/eslint-config": "3.0.0",
85
+ "@commitlint/cli": "19.6.0",
86
+ "@commitlint/config-conventional": "19.6.0",
87
+ "@rotki/eslint-config": "3.6.0",
87
88
  "@types/debug": "4.1.12",
88
- "@types/eslint": "9.6.0",
89
89
  "@types/node": "20",
90
- "@typescript-eslint/eslint-plugin": "8.1.0",
91
- "@typescript-eslint/parser": "8.1.0",
92
- "@typescript-eslint/rule-tester": "8.1.0",
93
- "@vitest/coverage-v8": "2.0.5",
94
- bumpp: "9.5.1",
95
- debug: "4.3.6",
96
- eslint: "9.9.0",
97
- husky: "9.1.4",
98
- "lint-staged": "15.2.9",
90
+ "@typescript-eslint/eslint-plugin": "8.18.0",
91
+ "@typescript-eslint/parser": "8.18.0",
92
+ "@typescript-eslint/rule-tester": "8.18.0",
93
+ "@vitest/coverage-v8": "2.1.8",
94
+ bumpp: "9.9.0",
95
+ debug: "4.4.0",
96
+ eslint: "9.16.0",
97
+ husky: "9.1.7",
98
+ "lint-staged": "15.2.11",
99
99
  rimraf: "6.0.1",
100
100
  "ts-node": "10.9.2",
101
- typescript: "5.5.4",
101
+ typescript: "5.7.2",
102
102
  unbuild: "2.0.0",
103
- vitepress: "1.3.2",
104
- vitest: "2.0.5"
103
+ vitepress: "1.5.0",
104
+ vitest: "2.1.8"
105
105
  };
106
106
  const engines = {
107
107
  node: ">=20",
@@ -258,7 +258,7 @@ function createRecommended(plugin, name, flat) {
258
258
  }
259
259
  }
260
260
 
261
- const RULE_NAME$4 = "no-deprecated-classes";
261
+ const RULE_NAME$5 = "no-deprecated-classes";
262
262
  const debug$3 = createDebug__default("@rotki/eslint-plugin:no-deprecated-classes");
263
263
  const replacements$2 = [
264
264
  ["d-block", "block"],
@@ -432,11 +432,11 @@ const noDeprecatedClasses = createEslintRule({
432
432
  schema: [],
433
433
  type: "problem"
434
434
  },
435
- name: RULE_NAME$4
435
+ name: RULE_NAME$5
436
436
  });
437
437
 
438
438
  const debug$2 = createDebug__default("@rotki/eslint-plugin:no-deprecated-components");
439
- const RULE_NAME$3 = "no-deprecated-components";
439
+ const RULE_NAME$4 = "no-deprecated-components";
440
440
  const vuetify = {
441
441
  VApp: true,
442
442
  VAppBar: true,
@@ -541,11 +541,11 @@ const noDeprecatedComponents = createEslintRule({
541
541
  ],
542
542
  type: "problem"
543
543
  },
544
- name: RULE_NAME$3
544
+ name: RULE_NAME$4
545
545
  });
546
546
 
547
547
  const debug$1 = createDebug__default("@rotki/eslint-plugin:no-deprecated-props");
548
- const RULE_NAME$2 = "no-deprecated-props";
548
+ const RULE_NAME$3 = "no-deprecated-props";
549
549
  const replacements = {
550
550
  RuiRadio: {
551
551
  internalValue: "value"
@@ -600,7 +600,8 @@ const noDeprecatedProps = createEslintRule({
600
600
  defaultOptions: [],
601
601
  meta: {
602
602
  docs: {
603
- description: "..."
603
+ description: "Replaces deprecated props with their replacements",
604
+ recommendation: "recommended"
604
605
  },
605
606
  fixable: "code",
606
607
  messages: {
@@ -609,10 +610,10 @@ const noDeprecatedProps = createEslintRule({
609
610
  schema: [],
610
611
  type: "problem"
611
612
  },
612
- name: RULE_NAME$2
613
+ name: RULE_NAME$3
613
614
  });
614
615
 
615
- const RULE_NAME$1 = "no-legacy-library-import";
616
+ const RULE_NAME$2 = "no-legacy-library-import";
616
617
  const legacyLibrary = "@rotki/ui-library-compat";
617
618
  const newLibrary = "@rotki/ui-library";
618
619
  const noLegacyLibraryImport = createEslintRule({
@@ -635,7 +636,8 @@ const noLegacyLibraryImport = createEslintRule({
635
636
  defaultOptions: [],
636
637
  meta: {
637
638
  docs: {
638
- description: `Reports and replaces imports of ${legacyLibrary} with ${newLibrary}`
639
+ description: `Reports and replaces imports of ${legacyLibrary} with ${newLibrary}`,
640
+ recommendation: "recommended"
639
641
  },
640
642
  fixable: "code",
641
643
  messages: {
@@ -644,11 +646,11 @@ const noLegacyLibraryImport = createEslintRule({
644
646
  schema: [],
645
647
  type: "problem"
646
648
  },
647
- name: RULE_NAME$1
649
+ name: RULE_NAME$2
648
650
  });
649
651
 
650
652
  const debug = createDebug__default("@rotki/eslint-plugin:consistent-ref-type-annotation");
651
- const RULE_NAME = "consistent-ref-type-annotation";
653
+ const RULE_NAME$1 = "consistent-ref-type-annotation";
652
654
  const FIXABLE_METHODS = ["ref", "computed"];
653
655
  function checkAssignmentDeclaration(context, node, declaration, options) {
654
656
  const source = getSourceCode(context);
@@ -743,6 +745,45 @@ const consistentRefTypeAnnotation = createEslintRule({
743
745
  ],
744
746
  type: "problem"
745
747
  },
748
+ name: RULE_NAME$1
749
+ });
750
+
751
+ const RULE_NAME = "no-dot-ts-imports";
752
+ const noDotTsImport = createEslintRule({
753
+ create(context) {
754
+ return {
755
+ ImportDeclaration(node) {
756
+ const importDeclaration = node.source.value;
757
+ if (!importDeclaration.endsWith(".ts"))
758
+ return;
759
+ const lastIndexOfExtension = importDeclaration.lastIndexOf(".ts");
760
+ const replacement = importDeclaration.substring(0, lastIndexOfExtension);
761
+ context.report({
762
+ data: {
763
+ import: importDeclaration
764
+ },
765
+ fix(fixer) {
766
+ return fixer.replaceText(node.source, `'${replacement}'`);
767
+ },
768
+ messageId: "invalidTSExtension",
769
+ node: node.source
770
+ });
771
+ }
772
+ };
773
+ },
774
+ defaultOptions: [],
775
+ meta: {
776
+ docs: {
777
+ description: "Checks and replaces .ts extension in import statements.",
778
+ recommendation: "recommended"
779
+ },
780
+ fixable: "code",
781
+ messages: {
782
+ invalidTSExtension: `'{{ import }}' has a .ts extension, please remove it'`
783
+ },
784
+ schema: [],
785
+ type: "problem"
786
+ },
746
787
  name: RULE_NAME
747
788
  });
748
789
 
@@ -756,6 +797,7 @@ const plugin = {
756
797
  "no-deprecated-classes": noDeprecatedClasses,
757
798
  "no-deprecated-components": noDeprecatedComponents,
758
799
  "no-deprecated-props": noDeprecatedProps,
800
+ "no-dot-ts-imports": noDotTsImport,
759
801
  "no-legacy-library-import": noLegacyLibraryImport
760
802
  }
761
803
  };
package/dist/index.d.cts CHANGED
@@ -22,6 +22,7 @@ declare const plugin: {
22
22
  'no-deprecated-classes': PluginRuleModule<[]>;
23
23
  'no-deprecated-components': PluginRuleModule<Options$1>;
24
24
  'no-deprecated-props': PluginRuleModule<[]>;
25
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
25
26
  'no-legacy-library-import': PluginRuleModule<[]>;
26
27
  };
27
28
  };
@@ -36,6 +37,7 @@ declare const _default: {
36
37
  'no-deprecated-classes': PluginRuleModule<[]>;
37
38
  'no-deprecated-components': PluginRuleModule<Options$1>;
38
39
  'no-deprecated-props': PluginRuleModule<[]>;
40
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
39
41
  'no-legacy-library-import': PluginRuleModule<[]>;
40
42
  };
41
43
  } & {
@@ -52,6 +54,7 @@ declare const _default: {
52
54
  'no-deprecated-classes': PluginRuleModule<[]>;
53
55
  'no-deprecated-components': PluginRuleModule<Options$1>;
54
56
  'no-deprecated-props': PluginRuleModule<[]>;
57
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
55
58
  'no-legacy-library-import': PluginRuleModule<[]>;
56
59
  };
57
60
  };
@@ -77,6 +80,7 @@ declare const _default: {
77
80
  'no-deprecated-classes': PluginRuleModule<[]>;
78
81
  'no-deprecated-components': PluginRuleModule<Options$1>;
79
82
  'no-deprecated-props': PluginRuleModule<[]>;
83
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
80
84
  'no-legacy-library-import': PluginRuleModule<[]>;
81
85
  };
82
86
  };
package/dist/index.d.mts CHANGED
@@ -22,6 +22,7 @@ declare const plugin: {
22
22
  'no-deprecated-classes': PluginRuleModule<[]>;
23
23
  'no-deprecated-components': PluginRuleModule<Options$1>;
24
24
  'no-deprecated-props': PluginRuleModule<[]>;
25
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
25
26
  'no-legacy-library-import': PluginRuleModule<[]>;
26
27
  };
27
28
  };
@@ -36,6 +37,7 @@ declare const _default: {
36
37
  'no-deprecated-classes': PluginRuleModule<[]>;
37
38
  'no-deprecated-components': PluginRuleModule<Options$1>;
38
39
  'no-deprecated-props': PluginRuleModule<[]>;
40
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
39
41
  'no-legacy-library-import': PluginRuleModule<[]>;
40
42
  };
41
43
  } & {
@@ -52,6 +54,7 @@ declare const _default: {
52
54
  'no-deprecated-classes': PluginRuleModule<[]>;
53
55
  'no-deprecated-components': PluginRuleModule<Options$1>;
54
56
  'no-deprecated-props': PluginRuleModule<[]>;
57
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
55
58
  'no-legacy-library-import': PluginRuleModule<[]>;
56
59
  };
57
60
  };
@@ -77,6 +80,7 @@ declare const _default: {
77
80
  'no-deprecated-classes': PluginRuleModule<[]>;
78
81
  'no-deprecated-components': PluginRuleModule<Options$1>;
79
82
  'no-deprecated-props': PluginRuleModule<[]>;
83
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
80
84
  'no-legacy-library-import': PluginRuleModule<[]>;
81
85
  };
82
86
  };
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ declare const plugin: {
22
22
  'no-deprecated-classes': PluginRuleModule<[]>;
23
23
  'no-deprecated-components': PluginRuleModule<Options$1>;
24
24
  'no-deprecated-props': PluginRuleModule<[]>;
25
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
25
26
  'no-legacy-library-import': PluginRuleModule<[]>;
26
27
  };
27
28
  };
@@ -36,6 +37,7 @@ declare const _default: {
36
37
  'no-deprecated-classes': PluginRuleModule<[]>;
37
38
  'no-deprecated-components': PluginRuleModule<Options$1>;
38
39
  'no-deprecated-props': PluginRuleModule<[]>;
40
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
39
41
  'no-legacy-library-import': PluginRuleModule<[]>;
40
42
  };
41
43
  } & {
@@ -52,6 +54,7 @@ declare const _default: {
52
54
  'no-deprecated-classes': PluginRuleModule<[]>;
53
55
  'no-deprecated-components': PluginRuleModule<Options$1>;
54
56
  'no-deprecated-props': PluginRuleModule<[]>;
57
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
55
58
  'no-legacy-library-import': PluginRuleModule<[]>;
56
59
  };
57
60
  };
@@ -77,6 +80,7 @@ declare const _default: {
77
80
  'no-deprecated-classes': PluginRuleModule<[]>;
78
81
  'no-deprecated-components': PluginRuleModule<Options$1>;
79
82
  'no-deprecated-props': PluginRuleModule<[]>;
83
+ 'no-dot-ts-imports': PluginRuleModule<[]>;
80
84
  'no-legacy-library-import': PluginRuleModule<[]>;
81
85
  };
82
86
  };
package/dist/index.mjs CHANGED
@@ -5,8 +5,8 @@ import { pascalCase, kebabCase } from 'scule';
5
5
  import { TSESTree } from '@typescript-eslint/utils';
6
6
 
7
7
  const name = "@rotki/eslint-plugin";
8
- const version = "0.5.0";
9
- const packageManager = "pnpm@9.7.0";
8
+ const version = "0.6.1";
9
+ const packageManager = "pnpm@9.15.0";
10
10
  const type = "module";
11
11
  const license = "AGPL-3.0";
12
12
  const bugs = {
@@ -35,6 +35,7 @@ const scripts = {
35
35
  clean: "rimraf .nyc_output coverage dist docs/.vitepress/dist",
36
36
  coverage: "nyc report --reporter lcov && opener coverage/lcov-report/index.html",
37
37
  generate: "node --experimental-specifier-resolution=node --loader ts-node/esm scripts/update-rule-docs.ts",
38
+ "generate:index": "node --experimental-specifier-resolution=node --loader ts-node/esm scripts/update-docs-index.ts",
38
39
  lint: "eslint .",
39
40
  "lint:fix": "eslint . --fix",
40
41
  build: "unbuild",
@@ -44,7 +45,7 @@ const scripts = {
44
45
  "test:coverage": "vitest run --coverage",
45
46
  "new": "node --experimental-specifier-resolution=node --loader ts-node/esm ./scripts/new-rule.ts",
46
47
  docs: "vitepress dev docs",
47
- "docs:build": "pnpm run generate && vitepress build docs",
48
+ "docs:build": "pnpm run generate && pnpm run generate:index && vitepress build docs",
48
49
  prepare: "husky",
49
50
  typecheck: "tsc --noEmit",
50
51
  release: "bumpp -r --no-push"
@@ -53,36 +54,35 @@ const peerDependencies = {
53
54
  eslint: "^9.0.0"
54
55
  };
55
56
  const dependencies = {
56
- "@typescript-eslint/utils": "8.1.0",
57
- debug: "4.3.6",
58
- "eslint-compat-utils": "0.5.1",
57
+ "@typescript-eslint/utils": "8.18.0",
58
+ debug: "4.4.0",
59
+ "eslint-compat-utils": "0.6.4",
59
60
  "jsonc-eslint-parser": "2.4.0",
60
61
  scule: "1.3.0",
61
62
  "vue-eslint-parser": "9.4.3",
62
63
  "yaml-eslint-parser": "1.2.3"
63
64
  };
64
65
  const devDependencies = {
65
- "@commitlint/cli": "19.4.0",
66
- "@commitlint/config-conventional": "19.2.2",
67
- "@rotki/eslint-config": "3.0.0",
66
+ "@commitlint/cli": "19.6.0",
67
+ "@commitlint/config-conventional": "19.6.0",
68
+ "@rotki/eslint-config": "3.6.0",
68
69
  "@types/debug": "4.1.12",
69
- "@types/eslint": "9.6.0",
70
70
  "@types/node": "20",
71
- "@typescript-eslint/eslint-plugin": "8.1.0",
72
- "@typescript-eslint/parser": "8.1.0",
73
- "@typescript-eslint/rule-tester": "8.1.0",
74
- "@vitest/coverage-v8": "2.0.5",
75
- bumpp: "9.5.1",
76
- debug: "4.3.6",
77
- eslint: "9.9.0",
78
- husky: "9.1.4",
79
- "lint-staged": "15.2.9",
71
+ "@typescript-eslint/eslint-plugin": "8.18.0",
72
+ "@typescript-eslint/parser": "8.18.0",
73
+ "@typescript-eslint/rule-tester": "8.18.0",
74
+ "@vitest/coverage-v8": "2.1.8",
75
+ bumpp: "9.9.0",
76
+ debug: "4.4.0",
77
+ eslint: "9.16.0",
78
+ husky: "9.1.7",
79
+ "lint-staged": "15.2.11",
80
80
  rimraf: "6.0.1",
81
81
  "ts-node": "10.9.2",
82
- typescript: "5.5.4",
82
+ typescript: "5.7.2",
83
83
  unbuild: "2.0.0",
84
- vitepress: "1.3.2",
85
- vitest: "2.0.5"
84
+ vitepress: "1.5.0",
85
+ vitest: "2.1.8"
86
86
  };
87
87
  const engines = {
88
88
  node: ">=20",
@@ -239,7 +239,7 @@ function createRecommended(plugin, name, flat) {
239
239
  }
240
240
  }
241
241
 
242
- const RULE_NAME$4 = "no-deprecated-classes";
242
+ const RULE_NAME$5 = "no-deprecated-classes";
243
243
  const debug$3 = createDebug("@rotki/eslint-plugin:no-deprecated-classes");
244
244
  const replacements$2 = [
245
245
  ["d-block", "block"],
@@ -413,11 +413,11 @@ const noDeprecatedClasses = createEslintRule({
413
413
  schema: [],
414
414
  type: "problem"
415
415
  },
416
- name: RULE_NAME$4
416
+ name: RULE_NAME$5
417
417
  });
418
418
 
419
419
  const debug$2 = createDebug("@rotki/eslint-plugin:no-deprecated-components");
420
- const RULE_NAME$3 = "no-deprecated-components";
420
+ const RULE_NAME$4 = "no-deprecated-components";
421
421
  const vuetify = {
422
422
  VApp: true,
423
423
  VAppBar: true,
@@ -522,11 +522,11 @@ const noDeprecatedComponents = createEslintRule({
522
522
  ],
523
523
  type: "problem"
524
524
  },
525
- name: RULE_NAME$3
525
+ name: RULE_NAME$4
526
526
  });
527
527
 
528
528
  const debug$1 = createDebug("@rotki/eslint-plugin:no-deprecated-props");
529
- const RULE_NAME$2 = "no-deprecated-props";
529
+ const RULE_NAME$3 = "no-deprecated-props";
530
530
  const replacements = {
531
531
  RuiRadio: {
532
532
  internalValue: "value"
@@ -581,7 +581,8 @@ const noDeprecatedProps = createEslintRule({
581
581
  defaultOptions: [],
582
582
  meta: {
583
583
  docs: {
584
- description: "..."
584
+ description: "Replaces deprecated props with their replacements",
585
+ recommendation: "recommended"
585
586
  },
586
587
  fixable: "code",
587
588
  messages: {
@@ -590,10 +591,10 @@ const noDeprecatedProps = createEslintRule({
590
591
  schema: [],
591
592
  type: "problem"
592
593
  },
593
- name: RULE_NAME$2
594
+ name: RULE_NAME$3
594
595
  });
595
596
 
596
- const RULE_NAME$1 = "no-legacy-library-import";
597
+ const RULE_NAME$2 = "no-legacy-library-import";
597
598
  const legacyLibrary = "@rotki/ui-library-compat";
598
599
  const newLibrary = "@rotki/ui-library";
599
600
  const noLegacyLibraryImport = createEslintRule({
@@ -616,7 +617,8 @@ const noLegacyLibraryImport = createEslintRule({
616
617
  defaultOptions: [],
617
618
  meta: {
618
619
  docs: {
619
- description: `Reports and replaces imports of ${legacyLibrary} with ${newLibrary}`
620
+ description: `Reports and replaces imports of ${legacyLibrary} with ${newLibrary}`,
621
+ recommendation: "recommended"
620
622
  },
621
623
  fixable: "code",
622
624
  messages: {
@@ -625,11 +627,11 @@ const noLegacyLibraryImport = createEslintRule({
625
627
  schema: [],
626
628
  type: "problem"
627
629
  },
628
- name: RULE_NAME$1
630
+ name: RULE_NAME$2
629
631
  });
630
632
 
631
633
  const debug = createDebug("@rotki/eslint-plugin:consistent-ref-type-annotation");
632
- const RULE_NAME = "consistent-ref-type-annotation";
634
+ const RULE_NAME$1 = "consistent-ref-type-annotation";
633
635
  const FIXABLE_METHODS = ["ref", "computed"];
634
636
  function checkAssignmentDeclaration(context, node, declaration, options) {
635
637
  const source = getSourceCode(context);
@@ -724,6 +726,45 @@ const consistentRefTypeAnnotation = createEslintRule({
724
726
  ],
725
727
  type: "problem"
726
728
  },
729
+ name: RULE_NAME$1
730
+ });
731
+
732
+ const RULE_NAME = "no-dot-ts-imports";
733
+ const noDotTsImport = createEslintRule({
734
+ create(context) {
735
+ return {
736
+ ImportDeclaration(node) {
737
+ const importDeclaration = node.source.value;
738
+ if (!importDeclaration.endsWith(".ts"))
739
+ return;
740
+ const lastIndexOfExtension = importDeclaration.lastIndexOf(".ts");
741
+ const replacement = importDeclaration.substring(0, lastIndexOfExtension);
742
+ context.report({
743
+ data: {
744
+ import: importDeclaration
745
+ },
746
+ fix(fixer) {
747
+ return fixer.replaceText(node.source, `'${replacement}'`);
748
+ },
749
+ messageId: "invalidTSExtension",
750
+ node: node.source
751
+ });
752
+ }
753
+ };
754
+ },
755
+ defaultOptions: [],
756
+ meta: {
757
+ docs: {
758
+ description: "Checks and replaces .ts extension in import statements.",
759
+ recommendation: "recommended"
760
+ },
761
+ fixable: "code",
762
+ messages: {
763
+ invalidTSExtension: `'{{ import }}' has a .ts extension, please remove it'`
764
+ },
765
+ schema: [],
766
+ type: "problem"
767
+ },
727
768
  name: RULE_NAME
728
769
  });
729
770
 
@@ -737,6 +778,7 @@ const plugin = {
737
778
  "no-deprecated-classes": noDeprecatedClasses,
738
779
  "no-deprecated-components": noDeprecatedComponents,
739
780
  "no-deprecated-props": noDeprecatedProps,
781
+ "no-dot-ts-imports": noDotTsImport,
740
782
  "no-legacy-library-import": noLegacyLibraryImport
741
783
  }
742
784
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rotki/eslint-plugin",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "bugs": {
@@ -29,36 +29,35 @@
29
29
  "eslint": "^9.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "@typescript-eslint/utils": "8.1.0",
33
- "debug": "4.3.6",
34
- "eslint-compat-utils": "0.5.1",
32
+ "@typescript-eslint/utils": "8.18.0",
33
+ "debug": "4.4.0",
34
+ "eslint-compat-utils": "0.6.4",
35
35
  "jsonc-eslint-parser": "2.4.0",
36
36
  "scule": "1.3.0",
37
37
  "vue-eslint-parser": "9.4.3",
38
38
  "yaml-eslint-parser": "1.2.3"
39
39
  },
40
40
  "devDependencies": {
41
- "@commitlint/cli": "19.4.0",
42
- "@commitlint/config-conventional": "19.2.2",
43
- "@rotki/eslint-config": "3.0.0",
41
+ "@commitlint/cli": "19.6.0",
42
+ "@commitlint/config-conventional": "19.6.0",
43
+ "@rotki/eslint-config": "3.6.0",
44
44
  "@types/debug": "4.1.12",
45
- "@types/eslint": "9.6.0",
46
45
  "@types/node": "20",
47
- "@typescript-eslint/eslint-plugin": "8.1.0",
48
- "@typescript-eslint/parser": "8.1.0",
49
- "@typescript-eslint/rule-tester": "8.1.0",
50
- "@vitest/coverage-v8": "2.0.5",
51
- "bumpp": "9.5.1",
52
- "debug": "4.3.6",
53
- "eslint": "9.9.0",
54
- "husky": "9.1.4",
55
- "lint-staged": "15.2.9",
46
+ "@typescript-eslint/eslint-plugin": "8.18.0",
47
+ "@typescript-eslint/parser": "8.18.0",
48
+ "@typescript-eslint/rule-tester": "8.18.0",
49
+ "@vitest/coverage-v8": "2.1.8",
50
+ "bumpp": "9.9.0",
51
+ "debug": "4.4.0",
52
+ "eslint": "9.16.0",
53
+ "husky": "9.1.7",
54
+ "lint-staged": "15.2.11",
56
55
  "rimraf": "6.0.1",
57
56
  "ts-node": "10.9.2",
58
- "typescript": "5.5.4",
57
+ "typescript": "5.7.2",
59
58
  "unbuild": "2.0.0",
60
- "vitepress": "1.3.2",
61
- "vitest": "2.0.5"
59
+ "vitepress": "1.5.0",
60
+ "vitest": "2.1.8"
62
61
  },
63
62
  "engines": {
64
63
  "node": ">=20",
@@ -71,6 +70,7 @@
71
70
  "clean": "rimraf .nyc_output coverage dist docs/.vitepress/dist",
72
71
  "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html",
73
72
  "generate": "node --experimental-specifier-resolution=node --loader ts-node/esm scripts/update-rule-docs.ts",
73
+ "generate:index": "node --experimental-specifier-resolution=node --loader ts-node/esm scripts/update-docs-index.ts",
74
74
  "lint": "eslint .",
75
75
  "lint:fix": "eslint . --fix",
76
76
  "build": "unbuild",
@@ -79,7 +79,7 @@
79
79
  "test:coverage": "vitest run --coverage",
80
80
  "new": "node --experimental-specifier-resolution=node --loader ts-node/esm ./scripts/new-rule.ts",
81
81
  "docs": "vitepress dev docs",
82
- "docs:build": "pnpm run generate && vitepress build docs",
82
+ "docs:build": "pnpm run generate && pnpm run generate:index && vitepress build docs",
83
83
  "typecheck": "tsc --noEmit",
84
84
  "release": "bumpp -r --no-push"
85
85
  }