Added lint rule to enforce importing with extensions (#831)
* fix: added lint rule to enforce importing with extentions * fix test import path * added import file extentions
This commit is contained in:
@@ -5,7 +5,7 @@ import { Protobuf, type Types } from "@meshtastic/core";
|
||||
import { produce } from "immer";
|
||||
import { create as createStore, type StateCreator } from "zustand";
|
||||
import { type PersistOptions, persist } from "zustand/middleware";
|
||||
import type { NodeError, NodeErrorType, ProcessPacketParams } from "./types";
|
||||
import type { NodeError, NodeErrorType, ProcessPacketParams } from "./types.ts";
|
||||
|
||||
const CURRENT_STORE_VERSION = 0;
|
||||
const NODEDB_RETENTION_NUM = 10;
|
||||
|
||||
@@ -16,7 +16,7 @@ vi.mock("idb-keyval", () => ({
|
||||
// import a fresh copy of the store module (because the store is created at import time)
|
||||
async function freshStore() {
|
||||
vi.resetModules();
|
||||
const mod = await import("../nodeDBStore");
|
||||
const mod = await import("./index.ts");
|
||||
return mod;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as idb from "idb-keyval";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { createStorage } from "./indexDB";
|
||||
import { createStorage } from "./indexDB.ts";
|
||||
|
||||
type PersistStorage<T> = ReturnType<typeof createStorage<T>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user