-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit fixes the style issues introduced in d7f450a according to the output from Prettier. Details: None
- Loading branch information
1 parent
d7f450a
commit 7407728
Showing
71 changed files
with
3,311 additions
and
2,674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
/* eslint-disable import/no-unused-modules */ | ||
import boxen from 'boxen' | ||
import boxen from "boxen"; | ||
|
||
const message = boxen(`There have been changes to package dependencies!\n\nRun 'pnpm install' to update.`, { | ||
title: 'New/Updated Packages', | ||
borderStyle: 'double', | ||
borderColor: 'redBright', | ||
titleAlignment: 'center', | ||
width: 60, | ||
padding: 1, | ||
}) | ||
const message = boxen( | ||
`There have been changes to package dependencies!\n\nRun 'pnpm install' to update.`, | ||
{ | ||
title: "New/Updated Packages", | ||
borderStyle: "double", | ||
borderColor: "redBright", | ||
titleAlignment: "center", | ||
width: 60, | ||
padding: 1, | ||
}, | ||
); | ||
|
||
console.log(message) | ||
console.log(message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
/* eslint-disable @typescript-eslint/no-floating-promises */ | ||
import i18n from 'i18next' | ||
import LanguageDetector from 'i18next-browser-languagedetector' | ||
import HttpApi from 'i18next-http-backend' | ||
import { initReactI18next } from 'react-i18next' | ||
import i18n from "i18next"; | ||
import LanguageDetector from "i18next-browser-languagedetector"; | ||
import HttpApi from "i18next-http-backend"; | ||
import { initReactI18next } from "react-i18next"; | ||
|
||
import type { HttpBackendOptions } from 'i18next-http-backend' | ||
import type { HttpBackendOptions } from "i18next-http-backend"; | ||
|
||
const ns = ['common', 'story'] | ||
const ns = ["common", "story"]; | ||
export const i18nLocales = { | ||
en: 'English', | ||
es: 'Spanish', | ||
} | ||
en: "English", | ||
es: "Spanish", | ||
}; | ||
|
||
const supportedLngs = Object.keys(i18nLocales) | ||
const supportedLngs = Object.keys(i18nLocales); | ||
|
||
i18n | ||
.use(LanguageDetector) | ||
.use(HttpApi) | ||
.use(initReactI18next) | ||
.init<HttpBackendOptions>({ | ||
debug: true, | ||
lng: 'en', | ||
lng: "en", | ||
backend: { | ||
loadPath: '/public/locales/{{lng}}/{{ns}}.json', | ||
loadPath: "/public/locales/{{lng}}/{{ns}}.json", | ||
}, | ||
fallbackLng: { | ||
'en-US': ['en'], | ||
'es-US': ['es'], | ||
"en-US": ["en"], | ||
"es-US": ["es"], | ||
}, | ||
defaultNS: 'common', | ||
defaultNS: "common", | ||
interpolation: { escapeValue: false }, | ||
react: { useSuspense: false }, | ||
cleanCode: true, | ||
supportedLngs, | ||
ns, | ||
// resources, | ||
}) | ||
}); | ||
|
||
export { i18n } | ||
export { i18n }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import path from 'path' | ||
import path from "path"; | ||
|
||
const buildEslintCommand = (filenames) => | ||
`next lint --fix --file ${filenames.map((f) => path.relative(process.cwd(), f)).join(' --file ')}` | ||
`next lint --fix --file ${filenames.map((f) => path.relative(process.cwd(), f)).join(" --file ")}`; | ||
|
||
const config = { | ||
'*.{cjs,mjs,js,jsx,ts,tsx}': [buildEslintCommand, 'prettier --write'], | ||
'schema.prisma': ['prisma format'], | ||
'*.json': ['prettier --write'], | ||
} | ||
"*.{cjs,mjs,js,jsx,ts,tsx}": [buildEslintCommand, "prettier --write"], | ||
"schema.prisma": ["prisma format"], | ||
"*.json": ["prettier --write"], | ||
}; | ||
|
||
export default config | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,54 @@ | ||
/* eslint-disable turbo/no-undeclared-env-vars */ | ||
// @ts-check | ||
import bundleAnalyze from '@next/bundle-analyzer' | ||
import nextRoutes from 'nextjs-routes/config' | ||
import bundleAnalyze from "@next/bundle-analyzer"; | ||
import nextRoutes from "nextjs-routes/config"; | ||
|
||
import i18nConfig from './next-i18next.config.js' | ||
import i18nConfig from "./next-i18next.config.js"; | ||
/** | ||
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful for | ||
* Docker builds. | ||
*/ | ||
|
||
!process.env.SKIP_ENV_VALIDATION && (await import('./src/env/server.mjs')) | ||
!process.env.SKIP_ENV_VALIDATION && (await import("./src/env/server.mjs")); | ||
|
||
const withRoutes = nextRoutes({ outDir: 'src/types' }) | ||
const withBundleAnalyzer = bundleAnalyze({ enabled: process.env.ANALYZE === 'true' }) | ||
const withRoutes = nextRoutes({ outDir: "src/types" }); | ||
const withBundleAnalyzer = bundleAnalyze({ | ||
enabled: process.env.ANALYZE === "true", | ||
}); | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const config = { | ||
i18n: i18nConfig.i18n, | ||
reactStrictMode: true, | ||
swcMinify: true, | ||
compiler: { | ||
...(process.env.VERCEL_ENV === 'production' ? { removeConsole: { exclude: ['error'] } } : {}), | ||
...(process.env.VERCEL_ENV === "production" | ||
? { removeConsole: { exclude: ["error"] } } | ||
: {}), | ||
}, | ||
images: { | ||
remotePatterns: [{ protocol: 'https', hostname: 'placehold.co', pathname: '/**' }], | ||
remotePatterns: [ | ||
{ protocol: "https", hostname: "placehold.co", pathname: "/**" }, | ||
], | ||
// domains: ['placehold.co'], | ||
}, | ||
experimental: { | ||
outputFileTracingExcludes: { | ||
'*': ['**swc+core**', '**esbuild**'], | ||
"*": ["**swc+core**", "**esbuild**"], | ||
}, | ||
webpackBuildWorker: true, | ||
}, | ||
eslint: { ignoreDuringBuilds: process.env.VERCEL_ENV !== 'production' }, | ||
typescript: { ignoreBuildErrors: process.env.VERCEL_ENV !== 'production' }, | ||
} | ||
eslint: { ignoreDuringBuilds: process.env.VERCEL_ENV !== "production" }, | ||
typescript: { ignoreBuildErrors: process.env.VERCEL_ENV !== "production" }, | ||
}; | ||
/** | ||
* Wraps NextJS config with the Bundle Analyzer config. | ||
* | ||
* @param {typeof config} config | ||
* @returns {typeof config} | ||
*/ | ||
function defineNextConfig(config) { | ||
return withBundleAnalyzer(withRoutes(config)) | ||
return withBundleAnalyzer(withRoutes(config)); | ||
} | ||
|
||
export default defineNextConfig(config) | ||
export default defineNextConfig(config); |
Oops, something went wrong.