Skip to content

Commit 73f5f03

Browse files
committed
fix: add eslint rule for use pathe first
1 parent be07bc0 commit 73f5f03

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

eslint.config.mjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,23 @@ export default defineConfig(
110110
"package-json/require-type": 0,
111111
},
112112
},
113+
{
114+
files: ["**/*.{js,ts,tsx}"],
115+
rules: {
116+
"no-restricted-imports": [
117+
"error",
118+
{
119+
paths: [
120+
{
121+
name: "node:path",
122+
message:
123+
"For better cross-platform compatibility, please use 'pathe' instead of 'node:path'",
124+
},
125+
],
126+
},
127+
],
128+
},
129+
},
113130
{
114131
plugins: {
115132
// @ts-expect-error

0 commit comments

Comments
 (0)