Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Enforce node protocol (#1685)

Bogdan Chadkin40ffb639adf6
diff --git a/apps/builder/app/shared/asset-client.ts b/apps/builder/app/shared/asset-client.ts
index 6db29f6810..5433dcd59b 100644
--- a/apps/builder/app/shared/asset-client.ts
+++ b/apps/builder/app/shared/asset-client.ts
@@ -1,4 +1,4 @@
-import * as path from "path";
+import * as path from "node:path";
import { MaxSize } from "@webstudio-is/asset-uploader";
import {
createFsClient,
diff --git a/packages/asset-uploader/src/utils/get-unique-filename.ts b/packages/asset-uploader/src/utils/get-unique-filename.ts
index 120f0833f0..821edaf246 100644
--- a/packages/asset-uploader/src/utils/get-unique-filename.ts
+++ b/packages/asset-uploader/src/utils/get-unique-filename.ts
@@ -1,4 +1,4 @@
-import path from "path";
+import * as path from "node:path";
import { nanoid } from "nanoid";
export const getUniqueFilename = (filename: string): string => {
diff --git a/packages/eslint-config-custom/index.js b/packages/eslint-config-custom/index.js
index bd02f1c922..4c61efce33 100644
--- a/packages/eslint-config-custom/index.js
+++ b/packages/eslint-config-custom/index.js
@@ -32,11 +32,12 @@ module.exports = {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"func-style": ["error", "expression", { allowArrowFunctions: true }],
- "unicorn/filename-case": ["error", { case: "kebabCase" }],
curly: 2,
eqeqeq: ["error", "always", { null: "ignore" }],
camelcase: [2, { properties: "never" }],
radix: 2,
+ "unicorn/filename-case": ["error", { case: "kebabCase" }],
+ "unicorn/prefer-node-protocol": "error",
"import/no-internal-modules": [
"error",
{
diff --git a/packages/generate-arg-types/src/cli.ts b/packages/generate-arg-types/src/cli.ts
index 5cf032154c..eebc68146c 100755
--- a/packages/generate-arg-types/src/cli.ts
+++ b/packages/generate-arg-types/src/cli.ts
@@ -1,7 +1,7 @@
#!/usr/bin/env tsx
/* eslint-disable no-console */
-import path from "path";
+import * as path from "node:path";
import { withCustomConfig } from "react-docgen-typescript";
import fg from "fast-glob";
import fs from "fs-extra";