From 4f26b888506e28cb2d0dfe5b812f7fa9596a795d Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Fri, 15 Sep 2023 17:46:45 -0400 Subject: [PATCH] chore: fix lint --- package.json | 2 +- src/scripts/pinyinify.ts | 2 +- tsconfig.json | 1 + tsconfig.node.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 887b1f3..d012f9a 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@iconify-json/mdi": "^1.1.52", "@svgr/core": "^8.1.0", "@svgr/plugin-jsx": "^8.1.0", - "@types/node": "^20.5.6", + "@types/node": "^20.6.1", "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@types/react-relay": "^14.1.4", diff --git a/src/scripts/pinyinify.ts b/src/scripts/pinyinify.ts index 5481f1a..02af9d1 100644 --- a/src/scripts/pinyinify.ts +++ b/src/scripts/pinyinify.ts @@ -1,4 +1,4 @@ -import { readFileSync, readdirSync, writeFileSync } from "fs" +import { readFileSync, readdirSync, writeFileSync } from "node:fs" import { pinyin } from "pinyin" function pinyinify(name: string) { diff --git a/tsconfig.json b/tsconfig.json index 80bbfa0..6ddb013 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,5 +24,6 @@ "types": ["unplugin-icons/types/react"] }, "include": ["src"], + "exclude": ["src/scripts/pinyinify.ts"], "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/tsconfig.node.json b/tsconfig.node.json index 42872c5..5bf5ab2 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -6,5 +6,5 @@ "moduleResolution": "bundler", "allowSyntheticDefaultImports": true }, - "include": ["vite.config.ts"] + "include": ["vite.config.ts", "src/scripts/pinyinify.ts"] } diff --git a/yarn.lock b/yarn.lock index 28b6c5e..eda941d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1177,10 +1177,10 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== -"@types/node@^20.5.6": - version "20.5.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.6.tgz#5e9aaa86be03a09decafd61b128d6cec64a5fe40" - integrity sha512-Gi5wRGPbbyOTX+4Y2iULQ27oUPrefaB0PxGQJnfyWN3kvEDGM3mIB5M/gQLmitZf7A9FmLeaqxD3L1CXpm3VKQ== +"@types/node@^20.6.1": + version "20.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.1.tgz#8b589bba9b2af0128796461a0979764562687e6f" + integrity sha512-4LcJvuXQlv4lTHnxwyHQZ3uR9Zw2j7m1C9DfuwoTFQQP4Pmu04O6IfLYgMmHoOCt0nosItLLZAH+sOrRE0Bo8g== "@types/parse-json@^4.0.0": version "4.0.0"