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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
make the file names consistently kebab case
Oleg Isonen9482c037ea53
diff --git a/.eslintrc.json b/.eslintrc.jsonindex 697ebd0514..4b43ba1898 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -18,7 +18,7 @@"ecmaVersion": "latest","sourceType": "module"},- "plugins": ["react", "@typescript-eslint", "filenames"],+ "plugins": ["react", "@typescript-eslint", "unicorn"],"settings": {"react": {"version": "detect"@@ -34,6 +34,13 @@],"react/react-in-jsx-scope": 0,"func-style": ["error", "expression", { "allowArrowFunctions": true }],- "filenames/match-regex": [2, "^[a-z-.]|($\\w+\\.)+$", true]+ "unicorn/filename-case": [+ "error",+ {+ "case": "kebabCase",+ // Remix routes need to contain $variable in the file name+ "ignore": ["\\$"]+ }+ ]}}diff --git a/app/routes/auth/dev.tsx b/app/routes/auth/dev.tsxindex 8c2648b0e0..d2a7f6e090 100644--- a/app/routes/auth/dev.tsx+++ b/app/routes/auth/dev.tsx@@ -1,7 +1,7 @@import { ActionFunction, redirect } from "@remix-run/node";import config from "~/config";import { authenticator } from "~/services/auth.server";-import { AUTH_PROVIDERS } from "~/shared/session/useLoginErrorMessage";+import { AUTH_PROVIDERS } from "~/shared/session/use-login-error-message";export default function Dev() {return null;diff --git a/app/routes/auth/github.tsx b/app/routes/auth/github.tsxindex 5dc6f039f5..a907ce7143 100644--- a/app/routes/auth/github.tsx+++ b/app/routes/auth/github.tsx@@ -3,7 +3,7 @@ import config from "~/config";import { authenticator } from "~/services/auth.server";import { sentryException } from "~/shared/sentry";import { ensureUserCookie } from "~/shared/session";-import { AUTH_PROVIDERS } from "~/shared/session/useLoginErrorMessage";+import { AUTH_PROVIDERS } from "~/shared/session/use-login-error-message";export default function GH() {return null;diff --git a/app/services/auth.server.ts b/app/services/auth.server.tsindex 8246a8e424..0760b76222 100644--- a/app/services/auth.server.ts+++ b/app/services/auth.server.ts@@ -11,7 +11,7 @@ import {createOrLoginWithGoogle,} from "~/shared/db/user.server";import { sentryException } from "~/shared/sentry";-import { AUTH_PROVIDERS } from "~/shared/session/useLoginErrorMessage";+import { AUTH_PROVIDERS } from "~/shared/session/use-login-error-message";const url = `${process.env.VERCEL_URLdiff --git a/app/shared/design-system/components/primitives/numericGestureControl.stories.tsx b/app/shared/design-system/components/primitives/numeric-gesture-control.stories.tsxsimilarity index 97%rename from app/shared/design-system/components/primitives/numericGestureControl.stories.tsxrename to app/shared/design-system/components/primitives/numeric-gesture-control.stories.tsxindex 878acb279a..c1d4509877 100644--- a/app/shared/design-system/components/primitives/numericGestureControl.stories.tsx+++ b/app/shared/design-system/components/primitives/numeric-gesture-control.stories.tsx@@ -3,7 +3,7 @@ import {numericGestureControl,type Value,type Direction,-} from "./numericGestureControl";+} from "./numeric-gesture-control";const useNumericGestureControl = ({ref,diff --git a/app/shared/design-system/components/primitives/numericGestureControl.ts b/app/shared/design-system/components/primitives/numeric-gesture-control.tssimilarity index 100%rename from app/shared/design-system/components/primitives/numericGestureControl.tsrename to app/shared/design-system/components/primitives/numeric-gesture-control.tsdiff --git a/app/shared/session/useLoginErrorMessage.ts b/app/shared/session/use-login-error-message.tssimilarity index 100%rename from app/shared/session/useLoginErrorMessage.tsrename to app/shared/session/use-login-error-message.tsdiff --git a/app/shared/text-editor/example-text-editor.stories.tsx b/app/shared/text-editor/example-text-editor.stories.tsxindex 01dbe938a5..20c95f67b5 100644--- a/app/shared/text-editor/example-text-editor.stories.tsx+++ b/app/shared/text-editor/example-text-editor.stories.tsx@@ -7,13 +7,7 @@ import { $getRoot, $getSelection, type EditorState } from "./lexical";// When the editor changes, you can get notified via the// LexicalOnChangePlugin!const onChange = (editorState: EditorState) => {- editorState.read(() => {- // Read the contents of the EditorState here.- const root = $getRoot();- const selection = $getSelection();-- console.log(root, selection);- });+ editorState.read(() => {});};export default {diff --git a/package.json b/package.jsonindex ee07d434ff..914ebb5b5d 100644--- a/package.json+++ b/package.json@@ -120,10 +120,10 @@"esbuild-node-externals": "^1.4.1","esbuild-node-loader": "^0.8.0","eslint": "^8.11.0",- "eslint-plugin-filenames": "^1.3.2","eslint-plugin-react": "^7.29.4","eslint-plugin-react-hooks": "^4.3.0","eslint-plugin-storybook": "^0.5.12",+ "eslint-plugin-unicorn": "^43.0.0","husky": ">=6","jest": "^27.5.1","lint-staged": "^13.0.2",diff --git a/yarn.lock b/yarn.lockindex 0964fe9940..86e1f730ad 100644--- a/yarn.lock+++ b/yarn.lock@@ -380,6 +380,11 @@resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad"integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==+"@babel/helper-validator-identifier@^7.18.6":+ version "7.18.6"+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076"+ integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==+"@babel/helper-validator-option@^7.16.7":version "7.16.7"resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23"@@ -5547,6 +5552,11 @@ buffer@^4.3.0:ieee754 "^1.1.4"isarray "^1.0.0"+builtin-modules@^3.0.0:+ version "3.3.0"+ resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6"+ integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==+builtin-status-codes@^3.0.0:version "3.0.0"resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"@@ -5876,6 +5886,11 @@ ci-info@^3.2.0:resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2"integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==+ci-info@^3.3.2:+ version "3.3.2"+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128"+ integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==+cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:version "1.0.4"resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"@@ -5906,6 +5921,13 @@ clean-css@^4.2.3:dependencies:source-map "~0.6.0"+clean-regexp@^1.0.0:+ version "1.0.0"+ resolved "https://registry.yarnpkg.com/clean-regexp/-/clean-regexp-1.0.0.tgz#8df7c7aae51fd36874e8f8d05b9180bc11a3fed7"+ integrity sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==+ dependencies:+ escape-string-regexp "^1.0.5"+clean-stack@^2.0.0:version "2.2.0"resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"@@ -7366,16 +7388,6 @@ escodegen@^2.0.0:optionalDependencies:source-map "~0.6.1"-eslint-plugin-filenames@^1.3.2:- version "1.3.2"- resolved "https://registry.yarnpkg.com/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz#7094f00d7aefdd6999e3ac19f72cea058e590cf7"- integrity sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w==- dependencies:- lodash.camelcase "4.3.0"- lodash.kebabcase "4.1.1"- lodash.snakecase "4.1.1"- lodash.upperfirst "4.3.1"-eslint-plugin-react-hooks@^4.3.0:version "4.3.0"resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172"@@ -7410,6 +7422,26 @@ eslint-plugin-storybook@^0.5.12:"@typescript-eslint/experimental-utils" "^5.3.0"requireindex "^1.1.0"+eslint-plugin-unicorn@^43.0.0:+ version "43.0.0"+ resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-43.0.0.tgz#c26fdfd146036b3f7951fa0f8c9af2b81bd87096"+ integrity sha512-Z/6HX8yry+zAjo4jHHTAbe1rfniox7qgmCReGBfTc/CVgotfScaMCc4dtSSTHlJ+7Yix5o6LPXzwwpuGGFricg==+ dependencies:+ "@babel/helper-validator-identifier" "^7.18.6"+ ci-info "^3.3.2"+ clean-regexp "^1.0.0"+ eslint-utils "^3.0.0"+ esquery "^1.4.0"+ indent-string "^4.0.0"+ is-builtin-module "^3.1.0"+ lodash "^4.17.21"+ pluralize "^8.0.0"+ read-pkg-up "^7.0.1"+ regexp-tree "^0.1.24"+ safe-regex "^2.1.1"+ semver "^7.3.7"+ strip-indent "^3.0.0"+[email protected], eslint-scope@^5.1.1:version "5.1.1"resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"@@ -9082,6 +9114,13 @@ is-buffer@^2.0.0:resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191"integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==+is-builtin-module@^3.1.0:+ version "3.1.0"+ resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.1.0.tgz#6fdb24313b1c03b75f8b9711c0feb8c30b903b00"+ integrity sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==+ dependencies:+ builtin-modules "^3.0.0"+is-callable@^1.1.4, is-callable@^1.2.4:version "1.2.4"resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945"@@ -10319,11 +10358,6 @@ lodash-es@^4.17.15:resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==- version "4.3.0"- resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"- integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==-lodash.capitalize@^4.2.1:version "4.2.1"resolved "https://registry.yarnpkg.com/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz#f826c9b4e2a8511d84e3aca29db05e1a4f3b72a9"@@ -10334,11 +10368,6 @@ lodash.debounce@^4.0.8:resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=- version "4.1.1"- resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"- integrity sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==-lodash.memoize@^4.1.2:version "4.1.2"resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"@@ -10354,7 +10383,7 @@ lodash.noop@^3.0.1:resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c"integrity sha1-OBiPTWUKOkdCWEObluxFsyYXEzw=[email protected], lodash.snakecase@^4.1.1:+lodash.snakecase@^4.1.1:version "4.1.1"resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=@@ -10364,11 +10393,6 @@ [email protected]:resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==- version "4.3.1"- resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce"- integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==-lodash@^4.0.1, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0:version "4.17.21"resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"@@ -12166,6 +12190,11 @@ pkg-dir@^5.0.0:dependencies:find-up "^5.0.0"+pluralize@^8.0.0:+ version "8.0.0"+ resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"+ integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==+version "1.6.4"resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz#c9711ac4dc48a685dabafc86f8b6dd9f8df84149"@@ -12928,6 +12957,11 @@ regex-not@^1.0.0, regex-not@^1.0.2:extend-shallow "^3.0.2"safe-regex "^1.1.0"+regexp-tree@^0.1.24, regexp-tree@~0.1.1:+ version "0.1.24"+ resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.24.tgz#3d6fa238450a4d66e5bc9c4c14bb720e2196829d"+ integrity sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==+regexp.prototype.flags@^1.3.1:version "1.4.1"resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz#b3f4c0059af9e47eca9f3f660e51d81307e72307"@@ -13378,6 +13412,13 @@ safe-regex@^1.1.0:dependencies:ret "~0.1.10"+safe-regex@^2.1.1:+ version "2.1.1"+ resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-2.1.1.tgz#f7128f00d056e2fe5c11e81a1324dd974aadced2"+ integrity sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==+ dependencies:+ regexp-tree "~0.1.1"+"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0:version "2.1.2"resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"