diff --git a/.eslintrc.yml b/.eslintrc.yml index 0262c802..832c5b5a 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -19,14 +19,21 @@ parserOptions: plugins: - '@typescript-eslint' - react + - unicorn rules: import/prefer-default-export: 'off' react/jsx-filename-extension: [2, { 'extensions': ['.jsx', '.tsx'] }] react/require-default-props: 'off' '@typescript-eslint/explicit-function-return-type': 'off' '@typescript-eslint/no-floating-promises': 'off' + unicorn/filename-case: ['error', { 'case': 'kebabCase' }] settings: 'import/resolver': alias: - map: [['@components', './src/components']] + map: + [ + ['~/components', './src/components'], + ['~/pages', './src/pages'], + ['~/services', './src/services'], + ] extensions: ['.ts', '.js', '.jsx', '.ts', '.tsx', '.json'] diff --git a/README.md b/README.md index 9db8a346..ae31d4cd 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ CRUD implemenation with React; - React - TypeScript -- TailwindCSS +- daisyUI & TailwindCSS - Storybook ## Contribution diff --git a/package.json b/package.json index efa80ebd..cd20410f 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "browserslist": "~4.22.1", "chromatic": "~9.0.0", "cssnano": "^6.0.1", - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", "eslint-config-love": "~43.1.0", @@ -62,6 +62,7 @@ "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-storybook": "^0.6.15", + "eslint-plugin-unicorn": "^55.0.0", "lightningcss": "^1.22.0", "msw": "^1.3.3", "postcss": "^8.4.31", @@ -78,7 +79,7 @@ }, "dependencies": { "@growthbook/growthbook-react": "^0.20.0", - "daisyui": "^2.50.0", + "daisyui": "^3.9.4", "dexie": "^3.2.4", "dexie-react-hooks": "^1.1.6", "react": "^18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a8462027..ab197e72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^0.20.0 version: 0.20.0(react@18.2.0) daisyui: - specifier: ^2.50.0 - version: 2.50.0(autoprefixer@10.4.13(postcss@8.4.31))(postcss@8.4.31) + specifier: ^3.9.4 + version: 3.9.4 dexie: specifier: ^3.2.4 version: 3.2.4 @@ -80,10 +80,10 @@ importers: version: 9.0.0 '@typescript-eslint/eslint-plugin': specifier: ^6.21.0 - version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)(typescript@5.2.2) + version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)(typescript@5.2.2) '@typescript-eslint/parser': specifier: ^6.21.0 - version: 6.21.0(eslint@8.56.0)(typescript@5.2.2) + version: 6.21.0(eslint@8.57.0)(typescript@5.2.2) '@vitejs/plugin-react-swc': specifier: ~3.7.0 version: 3.7.0(vite@5.3.5(@types/node@22.1.0)(less@4.2.0)(lightningcss@1.22.0)(terser@5.31.3)) @@ -100,38 +100,41 @@ importers: specifier: ^6.0.1 version: 6.0.1(postcss@8.4.31) eslint: - specifier: ^8.56.0 - version: 8.56.0 + specifier: ^8.57.0 + version: 8.57.0 eslint-config-airbnb: specifier: ^19.0.4 - version: 19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint-plugin-jsx-a11y@6.8.0(eslint@8.56.0))(eslint-plugin-react-hooks@4.6.0(eslint@8.56.0))(eslint-plugin-react@7.33.2(eslint@8.56.0))(eslint@8.56.0) + version: 19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint-plugin-jsx-a11y@6.8.0(eslint@8.57.0))(eslint-plugin-react-hooks@4.6.0(eslint@8.57.0))(eslint-plugin-react@7.33.2(eslint@8.57.0))(eslint@8.57.0) eslint-config-airbnb-typescript: specifier: ^17.1.0 - version: 17.1.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)(typescript@5.2.2))(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint@8.56.0) + version: 17.1.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)(typescript@5.2.2))(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint@8.57.0) eslint-config-love: specifier: ~43.1.0 - version: 43.1.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)(typescript@5.2.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint-plugin-n@16.6.2(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.2.2) + version: 43.1.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)(typescript@5.2.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.1.1(eslint@8.57.0))(eslint@8.57.0)(typescript@5.2.2) eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@8.56.0) + version: 9.1.0(eslint@8.57.0) eslint-import-resolver-alias: specifier: ^1.1.2 - version: 1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)) + version: 1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0) + version: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0) eslint-plugin-jsx-a11y: specifier: ^6.8.0 - version: 6.8.0(eslint@8.56.0) + version: 6.8.0(eslint@8.57.0) eslint-plugin-react: specifier: ^7.33.2 - version: 7.33.2(eslint@8.56.0) + version: 7.33.2(eslint@8.57.0) eslint-plugin-react-hooks: specifier: ^4.6.0 - version: 4.6.0(eslint@8.56.0) + version: 4.6.0(eslint@8.57.0) eslint-plugin-storybook: specifier: ^0.6.15 - version: 0.6.15(eslint@8.56.0)(typescript@5.2.2) + version: 0.6.15(eslint@8.57.0)(typescript@5.2.2) + eslint-plugin-unicorn: + specifier: ^55.0.0 + version: 55.0.0(eslint@8.57.0) lightningcss: specifier: ^1.22.0 version: 1.22.0 @@ -174,10 +177,6 @@ importers: packages: - '@aashutoshrathi/word-wrap@1.2.6': - resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} - engines: {node: '>=0.10.0'} - '@adobe/css-tools@4.3.3': resolution: {integrity: sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==} @@ -1744,8 +1743,8 @@ packages: resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@8.56.0': - resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@fal-works/esbuild-plugin-global-externals@2.1.2': @@ -1779,13 +1778,15 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.2': - resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} @@ -3451,11 +3452,6 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - browserslist@4.23.3: resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -3571,9 +3567,17 @@ packages: resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} engines: {node: '>=6.0'} + ci-info@4.0.0: + resolution: {integrity: sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==} + engines: {node: '>=8'} + citty@0.1.6: resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} + clean-regexp@1.0.0: + resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} + engines: {node: '>=4'} + clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -3622,13 +3626,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - color-string@1.9.1: - resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} - - color@4.2.3: - resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} - engines: {node: '>=12.5.0'} - colord@2.9.3: resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} @@ -3784,9 +3781,6 @@ packages: copy-anything@2.0.6: resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==} - core-js-compat@3.37.0: - resolution: {integrity: sha512-vYq4L+T8aS5UuFg4UwDhc7YNRWVeVZwltad9C/jV3R2LgVOpS9BDr7l/WL6BN0dbV3k1XejPTHqqEzJgsa0frA==} - core-js-compat@3.37.1: resolution: {integrity: sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==} @@ -3868,11 +3862,9 @@ packages: csstype@3.1.1: resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} - daisyui@2.50.0: - resolution: {integrity: sha512-KiqRvqMXi9rgoH84M8D69gXPg6x+cbdiaHqm8pFHOsXXN1rTl/+OcCKkSnkEwTtIge9VJVDGU6l4B8/n+Juc5g==} - peerDependencies: - autoprefixer: ^10.0.2 - postcss: ^8.1.6 + daisyui@3.9.4: + resolution: {integrity: sha512-fvi2RGH4YV617/6DntOVGcOugOPym9jTGWW2XySb5ZpvdWO4L7bEG77VHirrnbRUEWvIEVXkBpxUz2KFj0rVnA==} + engines: {node: '>=16.9.0'} damerau-levenshtein@1.0.8: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} @@ -4403,6 +4395,12 @@ packages: peerDependencies: eslint: '>=6' + eslint-plugin-unicorn@55.0.0: + resolution: {integrity: sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==} + engines: {node: '>=18.18'} + peerDependencies: + eslint: '>=8.56.0' + eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -4415,8 +4413,8 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.56.0: - resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true @@ -4429,8 +4427,8 @@ packages: engines: {node: '>=4'} hasBin: true - esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -4575,8 +4573,8 @@ packages: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} - flatted@3.2.9: - resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} flow-parser@0.235.1: resolution: {integrity: sha512-s04193L4JE+ntEcQXbD6jxRRlyj9QXcgEl2W6xSjH4l9x4b0eHoCHfbYHjqf9LdZFUiM5LhgpiqsvLj/AyOyYQ==} @@ -4752,6 +4750,10 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} + globals@15.9.0: + resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} + engines: {node: '>=18'} + globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} @@ -4946,9 +4948,6 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - is-arrayish@0.3.2: - resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - is-async-function@2.0.0: resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} engines: {node: '>= 0.4'} @@ -5208,6 +5207,11 @@ packages: engines: {node: '>=4'} hasBin: true + jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} @@ -5915,8 +5919,8 @@ packages: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} - optionator@0.9.3: - resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} ora@5.4.1: @@ -6094,6 +6098,10 @@ packages: engines: {node: '>=16'} hasBin: true + pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + polished@4.3.1: resolution: {integrity: sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==} engines: {node: '>=10'} @@ -6599,6 +6607,10 @@ packages: regex-parser@2.2.11: resolution: {integrity: sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==} + regexp-tree@0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} + hasBin: true + regexp.prototype.flags@1.5.2: resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} @@ -6607,6 +6619,10 @@ packages: resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} engines: {node: '>=4'} + regjsparser@0.10.0: + resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} + hasBin: true + regjsparser@0.9.1: resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} hasBin: true @@ -6825,9 +6841,6 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} - simple-swizzle@0.2.2: - resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} - sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -7607,6 +7620,10 @@ packages: engines: {node: '>=8'} hasBin: true + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} @@ -7732,8 +7749,6 @@ packages: snapshots: - '@aashutoshrathi/word-wrap@1.2.6': {} - '@adobe/css-tools@4.3.3': {} '@alloc/quick-lru@5.2.0': {} @@ -8567,7 +8582,7 @@ snapshots: '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-validator-identifier': 7.24.5 + '@babel/helper-validator-identifier': 7.24.7 '@babel/plugin-transform-modules-systemjs@7.25.0(@babel/core@7.24.5)': dependencies: @@ -8961,7 +8976,7 @@ snapshots: babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.24.5) babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.5) babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.24.5) - core-js-compat: 3.37.0 + core-js-compat: 3.37.1 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -9383,9 +9398,9 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.56.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 8.56.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.10.0': {} @@ -9395,7 +9410,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.6 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -9406,7 +9421,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.56.0': {} + '@eslint/js@8.57.0': {} '@fal-works/esbuild-plugin-global-externals@2.1.2': {} @@ -9438,15 +9453,15 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: - '@humanwhocodes/object-schema': 2.0.2 - debug: 4.3.4 + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.6 minimatch: 3.1.2 transitivePeerDependencies: - supports-color '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.2': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -11133,16 +11148,16 @@ snapshots: '@types/uuid@9.0.8': {} - '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)(typescript@5.2.2)': + '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)(typescript@5.2.2)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/type-utils': 6.21.0(eslint@8.56.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4 - eslint: 8.56.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -11153,14 +11168,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2)': + '@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4 - eslint: 8.56.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.2.2 transitivePeerDependencies: @@ -11176,12 +11191,12 @@ snapshots: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - '@typescript-eslint/type-utils@6.21.0(eslint@8.56.0)(typescript@5.2.2)': + '@typescript-eslint/type-utils@6.21.0(eslint@8.57.0)(typescript@5.2.2)': dependencies: '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.56.0 + eslint: 8.57.0 ts-api-utils: 1.2.1(typescript@5.2.2) optionalDependencies: typescript: 5.2.2 @@ -11221,30 +11236,30 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@5.60.0(eslint@8.56.0)(typescript@5.2.2)': + '@typescript-eslint/utils@5.60.0(eslint@8.57.0)(typescript@5.2.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.14 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.60.0 '@typescript-eslint/types': 5.60.0 '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.2.2) - eslint: 8.56.0 + eslint: 8.57.0 eslint-scope: 5.1.1 semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@6.21.0(eslint@8.56.0)(typescript@5.2.2)': + '@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.2.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.2.2) - eslint: 8.56.0 + eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: - supports-color @@ -11448,9 +11463,9 @@ snapshots: dependencies: acorn: 7.4.1 - acorn-jsx@5.3.2(acorn@8.11.3): + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: - acorn: 8.11.3 + acorn: 8.12.1 acorn-walk@7.2.0: {} @@ -11687,7 +11702,7 @@ snapshots: dependencies: '@babel/core': 7.24.5 '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.5) - core-js-compat: 3.37.0 + core-js-compat: 3.37.1 transitivePeerDependencies: - supports-color @@ -11776,13 +11791,6 @@ snapshots: node-releases: 2.0.14 update-browserslist-db: 1.0.15(browserslist@4.22.3) - browserslist@4.23.0: - dependencies: - caniuse-lite: 1.0.30001647 - electron-to-chromium: 1.4.756 - node-releases: 2.0.14 - update-browserslist-db: 1.0.15(browserslist@4.23.0) - browserslist@4.23.3: dependencies: caniuse-lite: 1.0.30001647 @@ -11916,10 +11924,16 @@ snapshots: chrome-trace-event@1.0.4: {} + ci-info@4.0.0: {} + citty@0.1.6: dependencies: consola: 3.2.3 + clean-regexp@1.0.0: + dependencies: + escape-string-regexp: 1.0.5 + clean-stack@2.2.0: {} cli-cursor@3.1.0: @@ -11968,16 +11982,6 @@ snapshots: color-name@1.1.4: {} - color-string@1.9.1: - dependencies: - color-name: 1.1.4 - simple-swizzle: 0.2.2 - - color@4.2.3: - dependencies: - color-convert: 2.0.1 - color-string: 1.9.1 - colord@2.9.3: {} combined-stream@1.0.8: @@ -12164,10 +12168,6 @@ snapshots: dependencies: is-what: 3.14.1 - core-js-compat@3.37.0: - dependencies: - browserslist: 4.23.0 - core-js-compat@3.37.1: dependencies: browserslist: 4.23.3 @@ -12283,10 +12283,9 @@ snapshots: csstype@3.1.1: {} - daisyui@2.50.0(autoprefixer@10.4.13(postcss@8.4.31))(postcss@8.4.31): + daisyui@3.9.4: dependencies: - autoprefixer: 10.4.13(postcss@8.4.31) - color: 4.2.3 + colord: 2.9.3 css-selector-tokenizer: 0.8.0 postcss: 8.4.31 postcss-js: 4.0.1(postcss@8.4.31) @@ -12845,66 +12844,66 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@8.56.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: - eslint: 8.56.0 + eslint: 8.57.0 semver: 7.6.3 - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint@8.56.0): + eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint@8.57.0): dependencies: confusing-browser-globals: 1.0.11 - eslint: 8.56.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0) object.assign: 4.1.4 object.entries: 1.1.6 semver: 6.3.1 - eslint-config-airbnb-typescript@17.1.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)(typescript@5.2.2))(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint@8.56.0): + eslint-config-airbnb-typescript@17.1.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)(typescript@5.2.2))(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint@8.57.0): dependencies: - '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.2.2) - eslint: 8.56.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.2.2) + eslint: 8.57.0 + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0) - eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint-plugin-jsx-a11y@6.8.0(eslint@8.56.0))(eslint-plugin-react-hooks@4.6.0(eslint@8.56.0))(eslint-plugin-react@7.33.2(eslint@8.56.0))(eslint@8.56.0): + eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint-plugin-jsx-a11y@6.8.0(eslint@8.57.0))(eslint-plugin-react-hooks@4.6.0(eslint@8.57.0))(eslint-plugin-react@7.33.2(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 8.56.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0) - eslint-plugin-jsx-a11y: 6.8.0(eslint@8.56.0) - eslint-plugin-react: 7.33.2(eslint@8.56.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0) + eslint: 8.57.0 + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0) + eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) + eslint-plugin-react: 7.33.2(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) object.assign: 4.1.4 object.entries: 1.1.6 - eslint-config-love@43.1.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)(typescript@5.2.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint-plugin-n@16.6.2(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.2.2): + eslint-config-love@43.1.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)(typescript@5.2.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.1.1(eslint@8.57.0))(eslint@8.57.0)(typescript@5.2.2): dependencies: - '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.2.2) - eslint: 8.56.0 - eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint-plugin-n@16.6.2(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0) - eslint-plugin-n: 16.6.2(eslint@8.56.0) - eslint-plugin-promise: 6.1.1(eslint@8.56.0) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.2.2) + eslint: 8.57.0 + eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.1.1(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 6.1.1(eslint@8.57.0) typescript: 5.2.2 transitivePeerDependencies: - supports-color - eslint-config-prettier@9.1.0(eslint@8.56.0): + eslint-config-prettier@9.1.0(eslint@8.57.0): dependencies: - eslint: 8.56.0 + eslint: 8.57.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0))(eslint-plugin-n@16.6.2(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.1.1(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 8.56.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0) - eslint-plugin-n: 16.6.2(eslint@8.56.0) - eslint-plugin-promise: 6.1.1(eslint@8.56.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 6.1.1(eslint@8.57.0) - eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0)): + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0)): dependencies: - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -12914,24 +12913,24 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.2.2) - eslint: 8.56.0 + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.2.2) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@8.56.0): + eslint-plugin-es-x@7.8.0(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - eslint: 8.56.0 - eslint-compat-utils: 0.5.1(eslint@8.56.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint@8.56.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint@8.57.0): dependencies: array-includes: 3.1.7 array.prototype.findlastindex: 1.2.4 @@ -12939,9 +12938,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.56.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.1 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -12952,13 +12951,13 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.2.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.8.0(eslint@8.56.0): + eslint-plugin-jsx-a11y@6.8.0(eslint@8.57.0): dependencies: '@babel/runtime': 7.23.2 aria-query: 5.3.0 @@ -12970,7 +12969,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.15 - eslint: 8.56.0 + eslint: 8.57.0 hasown: 2.0.0 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -12978,12 +12977,12 @@ snapshots: object.entries: 1.1.7 object.fromentries: 2.0.7 - eslint-plugin-n@16.6.2(eslint@8.56.0): + eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 - eslint: 8.56.0 - eslint-plugin-es-x: 7.8.0(eslint@8.56.0) + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) get-tsconfig: 4.7.6 globals: 13.24.0 ignore: 5.3.1 @@ -12993,22 +12992,22 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-promise@6.1.1(eslint@8.56.0): + eslint-plugin-promise@6.1.1(eslint@8.57.0): dependencies: - eslint: 8.56.0 + eslint: 8.57.0 - eslint-plugin-react-hooks@4.6.0(eslint@8.56.0): + eslint-plugin-react-hooks@4.6.0(eslint@8.57.0): dependencies: - eslint: 8.56.0 + eslint: 8.57.0 - eslint-plugin-react@7.33.2(eslint@8.56.0): + eslint-plugin-react@7.33.2(eslint@8.57.0): dependencies: array-includes: 3.1.6 array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 es-iterator-helpers: 1.0.13 - eslint: 8.56.0 + eslint: 8.57.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -13021,17 +13020,37 @@ snapshots: semver: 6.3.1 string.prototype.matchall: 4.0.8 - eslint-plugin-storybook@0.6.15(eslint@8.56.0)(typescript@5.2.2): + eslint-plugin-storybook@0.6.15(eslint@8.57.0)(typescript@5.2.2): dependencies: '@storybook/csf': 0.0.1 - '@typescript-eslint/utils': 5.60.0(eslint@8.56.0)(typescript@5.2.2) - eslint: 8.56.0 + '@typescript-eslint/utils': 5.60.0(eslint@8.57.0)(typescript@5.2.2) + eslint: 8.57.0 requireindex: 1.2.0 ts-dedent: 2.2.0 transitivePeerDependencies: - supports-color - typescript + eslint-plugin-unicorn@55.0.0(eslint@8.57.0): + dependencies: + '@babel/helper-validator-identifier': 7.24.7 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + ci-info: 4.0.0 + clean-regexp: 1.0.0 + core-js-compat: 3.37.1 + eslint: 8.57.0 + esquery: 1.6.0 + globals: 15.9.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.1 + jsesc: 3.0.2 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.27 + regjsparser: 0.10.0 + semver: 7.6.3 + strip-indent: 3.0.0 + eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 @@ -13044,12 +13063,12 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint@8.56.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/regexpp': 4.11.0 '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.56.0 + '@eslint/js': 8.57.0 '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -13057,13 +13076,13 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.6 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.5.0 + esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 @@ -13081,7 +13100,7 @@ snapshots: lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.3 + optionator: 0.9.4 strip-ansi: 6.0.1 text-table: 0.2.0 transitivePeerDependencies: @@ -13089,13 +13108,13 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} - esquery@1.5.0: + esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -13297,11 +13316,11 @@ snapshots: flat-cache@3.2.0: dependencies: - flatted: 3.2.9 + flatted: 3.3.1 keyv: 4.5.4 rimraf: 3.0.2 - flatted@3.2.9: {} + flatted@3.3.1: {} flow-parser@0.235.1: {} @@ -13493,6 +13512,8 @@ snapshots: dependencies: type-fest: 0.20.2 + globals@15.9.0: {} + globalthis@1.0.3: dependencies: define-properties: 1.2.1 @@ -13691,8 +13712,6 @@ snapshots: is-arrayish@0.2.1: {} - is-arrayish@0.3.2: {} - is-async-function@2.0.0: dependencies: has-tostringtag: 1.0.2 @@ -13923,6 +13942,8 @@ snapshots: jsesc@2.5.2: {} + jsesc@3.0.2: {} + json-buffer@3.0.1: {} json-parse-better-errors@1.0.2: {} @@ -14778,14 +14799,14 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - optionator@0.9.3: + optionator@0.9.4: dependencies: - '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 fast-levenshtein: 2.0.6 levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 + word-wrap: 1.2.5 ora@5.4.1: dependencies: @@ -14930,6 +14951,8 @@ snapshots: playwright-core@1.35.1: {} + pluralize@8.0.0: {} + polished@4.3.1: dependencies: '@babel/runtime': 7.24.5 @@ -15438,6 +15461,8 @@ snapshots: regex-parser@2.2.11: {} + regexp-tree@0.1.27: {} + regexp.prototype.flags@1.5.2: dependencies: call-bind: 1.0.7 @@ -15454,6 +15479,10 @@ snapshots: unicode-match-property-ecmascript: 2.0.0 unicode-match-property-value-ecmascript: 2.1.0 + regjsparser@0.10.0: + dependencies: + jsesc: 0.5.0 + regjsparser@0.9.1: dependencies: jsesc: 0.5.0 @@ -15722,10 +15751,6 @@ snapshots: signal-exit@4.1.0: {} - simple-swizzle@0.2.2: - dependencies: - is-arrayish: 0.3.2 - sisteransi@1.0.5: {} slash@3.0.0: {} @@ -16376,12 +16401,6 @@ snapshots: escalade: 3.1.2 picocolors: 1.0.1 - update-browserslist-db@1.0.15(browserslist@4.23.0): - dependencies: - browserslist: 4.23.0 - escalade: 3.1.2 - picocolors: 1.0.1 - update-browserslist-db@1.1.0(browserslist@4.23.3): dependencies: browserslist: 4.23.3 @@ -16629,6 +16648,8 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 + word-wrap@1.2.5: {} + wordwrap@1.0.0: {} workbox-background-sync@7.1.0: diff --git a/src/components/App.tsx b/src/components/App.tsx index 9e661be8..a3e207f2 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -2,9 +2,9 @@ import { useEffect } from 'react'; import { Outlet, useLocation } from 'react-router-dom'; import { GrowthBook, GrowthBookProvider } from '@growthbook/growthbook-react'; -import Header from '@components/Header'; -import Alert from '@components/Alert'; -import Breadcrumbs from '@components/Breadcrumbs'; +import Header from '~/components/header'; +import Alert from '~/components/alert'; +import Breadcrumbs from '~/components/breadcrumbs'; // Create a GrowthBook instance const growthbook = new GrowthBook({ diff --git a/src/components/Input.stories.ts b/src/components/Input.stories.ts index 3ce5537a..6658f74e 100644 --- a/src/components/Input.stories.ts +++ b/src/components/Input.stories.ts @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/react'; -import { Input } from './Input'; +import { Input } from './input'; // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta = { diff --git a/src/components/alert.tsx b/src/components/alert.tsx new file mode 100644 index 00000000..2b673dbf --- /dev/null +++ b/src/components/alert.tsx @@ -0,0 +1,10 @@ +interface IAlertProps { + message: string; + // type: string; +} + +function Alert({ message }: IAlertProps) { + return
{message}
; +} + +export default Alert; diff --git a/src/components/app.tsx b/src/components/app.tsx new file mode 100644 index 00000000..a3e207f2 --- /dev/null +++ b/src/components/app.tsx @@ -0,0 +1,61 @@ +import { useEffect } from 'react'; +import { Outlet, useLocation } from 'react-router-dom'; +import { GrowthBook, GrowthBookProvider } from '@growthbook/growthbook-react'; + +import Header from '~/components/header'; +import Alert from '~/components/alert'; +import Breadcrumbs from '~/components/breadcrumbs'; + +// Create a GrowthBook instance +const growthbook = new GrowthBook({ + trackingCallback: (experiment, result) => { + // eslint-disable-next-line no-console + console.log({ + experimentId: experiment.key, + variationId: result.variationId, + }); + }, +}); + +function App() { + const location = useLocation(); + + useEffect(() => { + // eslint-disable-next-line no-console + console.log(`App version: ${APP_VERSION}`); + + // Load feature definitions from API + fetch( + `https://cdn.growthbook.io/api/features/${ + import.meta.env.VITE_GROWTH_BOOK_KEY + }`, + ) + .then(async (res) => res.json()) + .then((json) => { + growthbook.setFeatures(json.features); + }); + + // TODO: replace with real targeting attributes + growthbook.setAttributes({ + id: 'foo', + deviceId: 'foo', + company: 'foo', + loggedIn: true, + employee: true, + country: 'foo', + browser: 'foo', + url: 'foo', + }); + }, [location]); + + return ( + +
+ {location.pathname !== '/' && } + + + + ); +} + +export default App; diff --git a/src/components/breadcrumbs.tsx b/src/components/breadcrumbs.tsx new file mode 100644 index 00000000..5a037fb4 --- /dev/null +++ b/src/components/breadcrumbs.tsx @@ -0,0 +1,28 @@ +import { useMatches } from 'react-router-dom'; + +import classes from './breadcrumbs.module.css'; + +function Breadcrumbs() { + const matches = useMatches(); + const crumbs = matches + // first get rid of any matches that don't have handle and crumb + .filter((match) => Boolean(match.handle?.crumb)) + // now map them into an array of elements, passing the loader + // data to each one + .map((match) => match.handle.crumb(match.data)); + + return ( +
+
    + {crumbs.map((crumb, index) => ( + // eslint-disable-next-line react/no-array-index-key +
  1. + {crumb} +
  2. + ))} +
+
+ ); +} + +export default Breadcrumbs; diff --git a/src/components/header.tsx b/src/components/header.tsx new file mode 100644 index 00000000..8b782a37 --- /dev/null +++ b/src/components/header.tsx @@ -0,0 +1,51 @@ +import { useEffect } from 'react'; +import { Link } from 'react-router-dom'; +import { themeChange } from 'theme-change'; + +function Header() { + useEffect(() => { + themeChange(false); + // 👆 false parameter is required for react project + }, []); + + return ( + + ); +} + +export default Header; diff --git a/src/components/input.stories.ts b/src/components/input.stories.ts new file mode 100644 index 00000000..6658f74e --- /dev/null +++ b/src/components/input.stories.ts @@ -0,0 +1,27 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { Input } from './input'; + +// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction +const meta = { + title: 'Components/Input', + component: Input, + tags: ['autodocs'], + argTypes: {}, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args +export const Default: Story = { + args: { + size: 'large', + }, +}; + +export const Medium: Story = { + args: { + size: 'medium', + }, +}; diff --git a/src/components/input.tsx b/src/components/input.tsx new file mode 100644 index 00000000..31dfad69 --- /dev/null +++ b/src/components/input.tsx @@ -0,0 +1,47 @@ +interface InputProps { + /** + * How large should the button be? + */ + size?: 'medium' | 'large'; + /** + * What placeholder color to use + */ + placeholder?: string; + /** + * Button contents + */ + label?: string; + /** + * Input value + */ + value?: string; + /** + * Optional change handler + */ + onChange?: (e: React.ChangeEvent) => void; +} + +/** + * Primary UI component for user interaction + */ +export function Input({ + size = 'large', + placeholder, + value, + onChange, + label, + ...props +}: InputProps) { + const sizeAdjusted = size === 'large' ? '3xl' : 'xl'; + return ( + + ); +} diff --git a/src/components/PostForm.stories.ts b/src/components/post-form.stories.ts similarity index 94% rename from src/components/PostForm.stories.ts rename to src/components/post-form.stories.ts index d26cc409..d118a895 100644 --- a/src/components/PostForm.stories.ts +++ b/src/components/post-form.stories.ts @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from '@storybook/react'; -import { PostForm } from './PostForm'; +import { PostForm } from './post-form'; const meta = { title: 'Components/PostForm', diff --git a/src/components/PostForm.tsx b/src/components/post-form.tsx similarity index 100% rename from src/components/PostForm.tsx rename to src/components/post-form.tsx diff --git a/src/components/PostPreview.stories.ts b/src/components/post-preview.stories.ts similarity index 95% rename from src/components/PostPreview.stories.ts rename to src/components/post-preview.stories.ts index 1652c732..08f88dc3 100644 --- a/src/components/PostPreview.stories.ts +++ b/src/components/post-preview.stories.ts @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from '@storybook/react'; -import PostPreview from './PostPreview'; +import PostPreview from './post-preview'; const meta = { title: 'Components/PostPreview', diff --git a/src/components/PostPreview.tsx b/src/components/post-preview.tsx similarity index 99% rename from src/components/PostPreview.tsx rename to src/components/post-preview.tsx index b1cd9b4f..7b4e9bff 100644 --- a/src/components/PostPreview.tsx +++ b/src/components/post-preview.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; -import { db } from '@services/db'; +import { db } from '~/services/db'; interface IAuthor { userId: string; diff --git a/src/components/search.tsx b/src/components/search.tsx new file mode 100644 index 00000000..cc5d5f18 --- /dev/null +++ b/src/components/search.tsx @@ -0,0 +1,20 @@ +function Search() { + return ( +
+ + +
+ ); +} + +export default Search; diff --git a/src/index.tsx b/src/index.tsx index ae53eff8..de068f4c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4,16 +4,16 @@ import { createBrowserRouter, RouterProvider, Link } from 'react-router-dom'; import './index.css'; -const App = lazy(async () => import('@components/App')); -const Home = lazy(async () => import('@pages/index')); -const NoMatch = lazy(async () => import('@pages/[all]')); +const App = lazy(async () => import('~/components/app')); +const Home = lazy(async () => import('~/pages/index')); +const NoMatch = lazy(async () => import('~/pages/[all]')); -const NewPost = lazy(async () => import('@pages/posts/new')); -const BlogPost = lazy(async () => import('@pages/posts/[postId]')); -const EditPost = lazy(async () => import('@pages/posts/[postId]/edit')); -const UserInfo = lazy(async () => import('@pages/users/[userName]')); +const NewPost = lazy(async () => import('~/pages/posts/new')); +const BlogPost = lazy(async () => import('~/pages/posts/[postId]')); +const EditPost = lazy(async () => import('~/pages/posts/[postId]/edit')); +const UserInfo = lazy(async () => import('~/pages/users/[user-name]')); -const root = createRoot(document.getElementById('app')); +const root = createRoot(document.getElementById('app')!); const router = createBrowserRouter( [ diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 6c555457..3ef6f817 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -2,12 +2,12 @@ import { Fragment } from 'react'; import { useLiveQuery } from 'dexie-react-hooks'; import { useFeature } from '@growthbook/growthbook-react'; -import { db } from '@services/db'; -import PostPreview from '@components/PostPreview'; -import Search from '@components/Search'; +import Search from '~/components/search'; -import type { IBlogPost } from '@components/PostPreview'; -import { timestampToLocaleString } from '@services/timestampToLocaleString'; +import { db } from '~/services/db'; +import { timestampToLocaleString } from '~/services/timestamp-to-locale-string'; +import type { IBlogPost } from '~/components/post-preview'; +import PostPreview from '~/components/post-preview'; function handleDeleteStory(id: string) { db.posts.delete(id); diff --git a/src/pages/posts/[postId]/edit.tsx b/src/pages/posts/[postId]/edit.tsx index efdd3522..b05cc841 100644 --- a/src/pages/posts/[postId]/edit.tsx +++ b/src/pages/posts/[postId]/edit.tsx @@ -3,10 +3,9 @@ import { useState } from 'react'; import { redirect, useParams } from 'react-router-dom'; import { useLiveQuery } from 'dexie-react-hooks'; -import { db } from '@services/db'; - -import { Input } from '@components/Input'; -import type { IBlogPost } from '@components/PostPreview'; +import { Input } from '~/components/input'; +import { db } from '~/services/db'; +import type { IBlogPost } from '~/components/post-preview'; interface IBlogPostProps { post: IBlogPost; diff --git a/src/pages/posts/[postId]/index.tsx b/src/pages/posts/[postId]/index.tsx index 3e179aec..5100b030 100644 --- a/src/pages/posts/[postId]/index.tsx +++ b/src/pages/posts/[postId]/index.tsx @@ -1,8 +1,8 @@ import { useNavigate, useParams } from 'react-router-dom'; import { useLiveQuery } from 'dexie-react-hooks'; -import { db } from '@services/db'; -import type { IBlogPost } from '@components/PostPreview'; +import { db } from '~/services/db'; +import type { IBlogPost } from '~/components/post-preview'; function Post({ heading, text }: IBlogPost) { const navigate = useNavigate(); diff --git a/src/pages/posts/new.tsx b/src/pages/posts/new.tsx index 6d914d71..7a42e0bc 100644 --- a/src/pages/posts/new.tsx +++ b/src/pages/posts/new.tsx @@ -3,9 +3,8 @@ import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { v4 as uuidv4 } from 'uuid'; -import { db } from '@services/db'; - -import { Input } from '@components/Input'; +import { Input } from '~/components/input'; +import { db } from '~/services/db'; function getRandomInt(max: number) { return Math.floor(Math.random() * max); diff --git a/src/pages/users/[userName].tsx b/src/pages/users/[user-name].tsx similarity index 90% rename from src/pages/users/[userName].tsx rename to src/pages/users/[user-name].tsx index d51fb434..da63f918 100644 --- a/src/pages/users/[userName].tsx +++ b/src/pages/users/[user-name].tsx @@ -1,8 +1,8 @@ import { useParams } from 'react-router-dom'; import { useLiveQuery } from 'dexie-react-hooks'; -import { db } from '@services/db'; -import type { IUser } from '@components/PostPreview'; +import { db } from '~/services/db'; +import type { IUser } from '~/components/post-preview'; function Info({ name }: IUser) { return ( diff --git a/src/services/getStories.ts b/src/services/get-stories.ts similarity index 100% rename from src/services/getStories.ts rename to src/services/get-stories.ts diff --git a/src/services/timestampToLocaleString.test.ts b/src/services/timestamp-to-locale-string.test.ts similarity index 84% rename from src/services/timestampToLocaleString.test.ts rename to src/services/timestamp-to-locale-string.test.ts index c249fde0..a531ee58 100644 --- a/src/services/timestampToLocaleString.test.ts +++ b/src/services/timestamp-to-locale-string.test.ts @@ -1,6 +1,6 @@ import { test, expect } from 'vitest'; -import { timestampToLocaleString } from './timestampToLocaleString'; +import { timestampToLocaleString } from './timestamp-to-locale-string'; test('1654024577 equals May 31', () => { expect( diff --git a/src/services/timestampToLocaleString.ts b/src/services/timestamp-to-locale-string.ts similarity index 100% rename from src/services/timestampToLocaleString.ts rename to src/services/timestamp-to-locale-string.ts diff --git a/tsconfig.json b/tsconfig.json index 466c4511..d228a4f5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,9 +30,7 @@ "moduleResolution": "Node", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ "paths": { - "@components/*": ["./src/components/*"], - "@pages/*": ["./src/pages/*"], - "@services/*": ["./src/services/*"] + "~/*": ["./src/*"], }, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ @@ -103,5 +101,6 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } + }, + "include": ["src"], } diff --git a/vite.config.ts b/vite.config.ts index 71f3a541..4e6f8d48 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -32,16 +32,8 @@ export default defineConfig({ resolve: { alias: [ { - find: '@components', - replacement: '/src/components', - }, - { - find: '@pages', - replacement: '/src/pages', - }, - { - find: '@services', - replacement: '/src/services', + find: '~/', + replacement: '/src/', }, ], },