Skip to content

Commit dea2cfe

Browse files
authored
chore: Enable verbatimModuleSyntax (#33)
1 parent 3cfa4de commit dea2cfe

12 files changed

+36
-35
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"simple-git-hooks": "^2.9.0",
5151
"tailwindcss": "^3.3.3",
5252
"tsx": "^3.12.10",
53-
"typescript": "^5.2.2",
53+
"typescript": "^5.4.2",
5454
"unplugin-icons": "^0.17.0",
5555
"vite": "^5.1.6",
5656
"vitest": "^1.3.1",

pnpm-lock.yaml

+18-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/createDiffComponent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RecalculateResult } from "@/utils/github";
1+
import type { RecalculateResult } from "@/utils/github";
22

33
export function createDiffComponent(options: {
44
getAdditionsElement: () => HTMLElement | null | undefined;

src/utils/gitattributes/GitAttributes.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { tokenize } from "./tokenize";
2-
import { Attribute, Node, parseAst, Rule } from "./parseAst";
2+
import type { Attribute, Node, Rule } from "./parseAst";
3+
import { parseAst } from "./parseAst";
34
import { minimatch } from "minimatch";
45

56
export class GitAttributes {

src/utils/gitattributes/__tests__/GitAttributes.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, it, expect } from "vitest";
2-
import { GitAttributes, FileEvaluation } from "../GitAttributes";
2+
import { GitAttributes, type FileEvaluation } from "../GitAttributes";
33

44
describe("GitAttributes", () => {
55
it("should evaluate git's example correctly (https://www.git-scm.com/docs/gitattributes#_examples)", () => {

src/utils/gitattributes/__tests__/parseAst.test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { describe, it, expect } from "vitest";
2-
import { Node, parseAst } from "../parseAst";
3-
import { Token } from "../tokenize";
2+
import { parseAst } from "../parseAst";
3+
import type { Node } from "../parseAst";
4+
import type { Token } from "../tokenize";
45

56
describe("parseAst", () => {
67
it("should return the correct AST for no tokens", () => {

src/utils/gitattributes/parseAst.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Token } from "./tokenize";
1+
import type { Token } from "./tokenize";
22

33
export function parseAst(tokens: Token[]): Node[] {
44
const nodes: Node[] = [];

src/utils/github/api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FetchError, ofetch } from "ofetch";
2-
import {
2+
import type {
33
Commit,
44
Comparison,
55
DiffEntry,

src/utils/github/service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineProxyService } from "@webext-core/proxy-service";
2-
import { GithubApi } from "./api";
3-
import { DiffEntry } from "./types";
2+
import type { GithubApi } from "./api";
3+
import type { DiffEntry } from "./types";
44
import { minimatch } from "minimatch";
55
import { GitAttributes } from "../gitattributes";
66

src/utils/replaceCount.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import {
2-
RecalculateOptions,
3-
RecalculateResult,
4-
getGithubService,
5-
} from "./github";
1+
import { getGithubService } from "./github";
2+
import type { RecalculateOptions, RecalculateResult } from "./github";
63

74
/**
85
* Calculate and add the generated count to the page.

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"lib": ["ESNext", "DOM"],
55
"isolatedModules": true,
6-
"types": ["unplugin-icons/types/vue"]
6+
"types": ["unplugin-icons/types/vue"],
7+
"verbatimModuleSyntax": true
78
}
89
}

wxt.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { UserManifest, defineConfig } from "wxt";
1+
import type { UserManifest } from "wxt";
2+
import { defineConfig } from "wxt";
23
import Vue from "@vitejs/plugin-vue";
34
import Icons from "unplugin-icons/vite";
45

0 commit comments

Comments
 (0)