diff --git a/api-node/eslint.config.mjs b/api-node/eslint.config.mjs index f511834a4b..3237c6d4c2 100644 --- a/api-node/eslint.config.mjs +++ b/api-node/eslint.config.mjs @@ -4,11 +4,9 @@ import eslint from '@eslint/js'; import eslintPlugin from '@typescript-eslint/eslint-plugin'; import typescriptParser from '@typescript-eslint/parser'; import airbnbBase from 'eslint-config-airbnb-base'; -import eslintConfigPrettier from 'eslint-config-prettier'; -import prettierConfig from 'eslint-config-prettier'; import importPlugin from 'eslint-plugin-import'; import jestPlugin from 'eslint-plugin-jest'; -import prettierPlugin from 'eslint-plugin-prettier'; +import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'; import securityPlugin from 'eslint-plugin-security'; import globals from 'globals'; @@ -84,7 +82,6 @@ export default [ '@typescript-eslint': eslintPlugin, import: importPlugin, jest: jestPlugin, - prettier: prettierPlugin, security: securityPlugin, }, settings: { @@ -94,7 +91,7 @@ export default [ }, typescript: { alwaysTryTypes: true, - project: 'tsconfig.json' + project: 'tsconfig.json', }, }, }, @@ -103,7 +100,6 @@ export default [ ...airbnbBase.rules, ...jestPlugin.configs.recommended.rules, ...securityPlugin.configs.recommended.rules, - ...eslintConfigPrettier.rules, 'import/extensions': [ 'error', 'ignorePackages', @@ -141,5 +137,5 @@ export default [ ], }, }, - prettierConfig // Make sure prettierConfig is last + prettierPluginRecommended, // Make sure this is last ]; diff --git a/api-node/src/app.ts b/api-node/src/app.ts index e8b1d600a2..8ecd65a9d8 100644 --- a/api-node/src/app.ts +++ b/api-node/src/app.ts @@ -1,4 +1,4 @@ -import { requestID } from "@gfx687/express-request-id"; +import { requestID } from '@gfx687/express-request-id'; import * as Sentry from '@sentry/node'; import cookieParser from 'cookie-parser'; import express from 'express'; @@ -37,7 +37,7 @@ const app = express() .use('/graphql', graphQLUploadMiddleware, graphQLMiddleware) .use('/api', apiRouter) .use(redirectToIndexRouter); -Sentry.setupExpressErrorHandler(app) // Must be after all routes and before any and other error-handling middlewares -app.use(handleError) +Sentry.setupExpressErrorHandler(app); // Must be after all routes and before any and other error-handling middlewares +app.use(handleError); export default app; diff --git a/api-node/src/graphQL/middlewares/graphQLMiddleware.ts b/api-node/src/graphQL/middlewares/graphQLMiddleware.ts index c3b5297dd2..24710b95aa 100644 --- a/api-node/src/graphQL/middlewares/graphQLMiddleware.ts +++ b/api-node/src/graphQL/middlewares/graphQLMiddleware.ts @@ -15,10 +15,7 @@ const graphQLMiddleware = createHandler({ dataLoaders: dataLoaders(), myId: verifyJWTTokenAndExtractMyID((raw as Request).headers.authorization), }), - validationRules: [ - ...(isProduction() ? [NoSchemaIntrospectionCustomRule] : []), - depthLimit(5), - ], + validationRules: [...(isProduction() ? [NoSchemaIntrospectionCustomRule] : []), depthLimit(5)], }); export default graphQLMiddleware; diff --git a/ethereum/eslint.config.mjs b/ethereum/eslint.config.mjs index 528b8d039c..f24af886e8 100644 --- a/ethereum/eslint.config.mjs +++ b/ethereum/eslint.config.mjs @@ -4,9 +4,8 @@ import eslint from '@eslint/js'; import eslintPlugin from '@typescript-eslint/eslint-plugin'; import typescriptParser from '@typescript-eslint/parser'; import airbnbBase from 'eslint-config-airbnb-base'; -import eslintConfigPrettier from 'eslint-config-prettier'; import importPlugin from 'eslint-plugin-import'; -import prettierPlugin from 'eslint-plugin-prettier'; +import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'; import securityPlugin from 'eslint-plugin-security'; import globals from 'globals'; @@ -75,7 +74,6 @@ export default [ plugins: { '@typescript-eslint': eslintPlugin, import: importPlugin, - prettier: prettierPlugin, security: securityPlugin, }, settings: { @@ -85,7 +83,7 @@ export default [ }, typescript: { alwaysTryTypes: true, - project: 'tsconfig.json' + project: 'tsconfig.json', }, }, }, @@ -93,7 +91,6 @@ export default [ ...eslintPlugin.configs.recommended.rules, ...airbnbBase.rules, ...securityPlugin.configs.recommended.rules, - ...eslintConfigPrettier.rules, 'import/extensions': [ 'error', 'ignorePackages', @@ -130,5 +127,5 @@ export default [ ], }, }, - eslintConfigPrettier, // Make sure prettier config is last + prettierPluginRecommended, // Make sure this is last ]; diff --git a/mobile/mobile-react-native/eslint.config.mjs b/mobile/mobile-react-native/eslint.config.mjs index 7e650a43cd..f2e6e5a210 100644 --- a/mobile/mobile-react-native/eslint.config.mjs +++ b/mobile/mobile-react-native/eslint.config.mjs @@ -4,10 +4,8 @@ import eslint from '@eslint/js'; import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin'; import typescriptParser from '@typescript-eslint/parser'; import airbnb from 'eslint-config-airbnb'; -import eslintConfigPrettier from 'eslint-config-prettier'; -import prettierConfig from 'eslint-config-prettier'; import importPlugin from 'eslint-plugin-import'; -import prettierPlugin from 'eslint-plugin-prettier'; +import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'; import reactPlugin from 'eslint-plugin-react'; import globals from 'globals'; @@ -78,7 +76,6 @@ export default [ plugins: { '@typescript-eslint': typescriptEslintPlugin, import: importPlugin, - prettier: prettierPlugin, react: reactPlugin, }, settings: { @@ -88,7 +85,7 @@ export default [ }, typescript: { alwaysTryTypes: true, - project: 'tsconfig.json' + project: 'tsconfig.json', }, }, react: { @@ -99,7 +96,6 @@ export default [ ...typescriptEslintPlugin.configs.recommended.rules, ...airbnb.rules, ...reactPlugin.configs.recommended.rules, - ...eslintConfigPrettier.rules, 'import/extensions': [ 'error', 'ignorePackages', @@ -151,9 +147,8 @@ export default [ { files: ['**/*.{ts,tsx}'], rules: { - ...eslintConfigPrettier.rules, 'prettier/prettier': 'error', }, }, - prettierConfig // Make sure prettierConfig is last + prettierPluginRecommended, // Make sure this is last ]; diff --git a/web-cypress/eslint.config.mjs b/web-cypress/eslint.config.mjs index 3872455e97..bece54fa4e 100644 --- a/web-cypress/eslint.config.mjs +++ b/web-cypress/eslint.config.mjs @@ -4,10 +4,9 @@ import eslint from '@eslint/js'; import eslintPlugin from '@typescript-eslint/eslint-plugin'; import typescriptParser from '@typescript-eslint/parser'; import airbnbBase from 'eslint-config-airbnb-base'; -import prettierConfig from 'eslint-config-prettier'; import cypressPlugin from 'eslint-plugin-cypress'; import importPlugin from 'eslint-plugin-import'; -import prettierPlugin from 'eslint-plugin-prettier'; +import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'; import globals from 'globals'; /** @@ -81,7 +80,6 @@ export default [ '@typescript-eslint': eslintPlugin, cypress: cypressPlugin, import: importPlugin, - prettier: prettierPlugin, }, settings: { 'import/resolver': { @@ -90,7 +88,7 @@ export default [ }, typescript: { alwaysTryTypes: true, - project: 'tsconfig.json' + project: 'tsconfig.json', }, }, }, @@ -98,7 +96,6 @@ export default [ ...eslintPlugin.configs.recommended.rules, ...cypressPlugin.configs.recommended.rules, ...airbnbBase.rules, - ...prettierConfig.rules, 'import/extensions': [ 'error', 'ignorePackages', @@ -134,5 +131,5 @@ export default [ ], }, }, - prettierConfig, // Make sure prettierConfig is last + prettierPluginRecommended, // Make sure this is last ]; diff --git a/web/.storybook/main.ts b/web/.storybook/main.ts index 76145cf708..a91192e629 100644 --- a/web/.storybook/main.ts +++ b/web/.storybook/main.ts @@ -2,10 +2,7 @@ import type { StorybookConfig } from '@storybook/react-vite'; const config: StorybookConfig = { stories: ['../src/**/*.stories.tsx'], - addons: [ - '@storybook/addon-essentials', - '@chromatic-com/storybook', - ], + addons: ['@storybook/addon-essentials', '@chromatic-com/storybook'], framework: { name: '@storybook/react-vite', options: {}, diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs index 5e63d99881..86ea3482f2 100644 --- a/web/eslint.config.mjs +++ b/web/eslint.config.mjs @@ -5,12 +5,11 @@ import tanstackQueryPlugin from '@tanstack/eslint-plugin-query'; import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin'; import typescriptParser from '@typescript-eslint/parser'; import airbnb from 'eslint-config-airbnb'; -import prettierConfig from 'eslint-config-prettier'; import importPlugin from 'eslint-plugin-import'; import jestPlugin from 'eslint-plugin-jest'; import jestDomPlugin from 'eslint-plugin-jest-dom'; import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'; -import prettierPlugin from 'eslint-plugin-prettier'; +import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'; import reactPlugin from 'eslint-plugin-react'; import reactRefreshPlugin from 'eslint-plugin-react-refresh'; import securityPlugin from 'eslint-plugin-security'; @@ -89,7 +88,6 @@ export default [ jest: jestPlugin, 'jest-dom': jestDomPlugin, 'jsx-a11y': jsxA11yPlugin, - prettier: prettierPlugin, react: reactPlugin, 'react-refresh': reactRefreshPlugin, security: securityPlugin, @@ -102,7 +100,7 @@ export default [ }, typescript: { alwaysTryTypes: true, - project: 'tsconfig.json' + project: 'tsconfig.json', }, }, react: { @@ -155,7 +153,7 @@ export default [ }, ], 'react/prop-types': 'off', - 'react-refresh/only-export-components': "error", + 'react-refresh/only-export-components': 'error', 'security/detect-non-literal-fs-filename': 'off', 'spaced-comment': [ 'error', @@ -179,5 +177,5 @@ export default [ 'import/no-unresolved': 'off', }, }, - prettierConfig, // Make sure prettierConfig is last + prettierPluginRecommended, // Make sure this is last ]; diff --git a/web/src/auth/hooks/useAuth.ts b/web/src/auth/hooks/useAuth.ts index 796575b56c..15b71122f6 100644 --- a/web/src/auth/hooks/useAuth.ts +++ b/web/src/auth/hooks/useAuth.ts @@ -62,14 +62,12 @@ const useAuth = (): UseAuth => { }); if (res?.data?.data?.signUp?.jwtToken === null || res?.data?.data?.signUp?.jwtToken === '') { - console.log('Failed to sign up.'); return; } updateMe(res?.data?.data?.signUp); } catch (err) { - console.error(err); } }; diff --git a/web/vite.config.ts b/web/vite.config.ts index bd9642ff7d..e35c58a6ad 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -18,4 +18,4 @@ export default defineConfig({ reporter: ['text', 'html'], }, }, -}) +});