🟢 fix linting
All checks were successful
Build and Deploy Next.js Blog to Staging / 🔍 Code Quality Checks (push) Successful in 17s
Build and Deploy Next.js Blog to Staging / 🏗️ Build and Push Docker Image (push) Successful in 30s
PR Checks / lint-and-build (pull_request) Successful in 18s
Build and Deploy Next.js Blog to Staging / 🚀 Deploy to Staging (push) Successful in 47s
Build and Deploy Next.js Blog to Production / 🔍 Code Quality Checks (push) Successful in 17s
Build and Deploy Next.js Blog to Production / 🏗️ Build and Push Docker Image (push) Successful in 4s
Build and Deploy Next.js Blog to Production / 🚀 Deploy to Production (push) Successful in 47s
All checks were successful
Build and Deploy Next.js Blog to Staging / 🔍 Code Quality Checks (push) Successful in 17s
Build and Deploy Next.js Blog to Staging / 🏗️ Build and Push Docker Image (push) Successful in 30s
PR Checks / lint-and-build (pull_request) Successful in 18s
Build and Deploy Next.js Blog to Staging / 🚀 Deploy to Staging (push) Successful in 47s
Build and Deploy Next.js Blog to Production / 🔍 Code Quality Checks (push) Successful in 17s
Build and Deploy Next.js Blog to Production / 🏗️ Build and Push Docker Image (push) Successful in 4s
Build and Deploy Next.js Blog to Production / 🚀 Deploy to Production (push) Successful in 47s
This commit was merged in pull request #15.
This commit is contained in:
@@ -2,13 +2,11 @@ import { Metadata } from 'next'
|
|||||||
import { notFound } from 'next/navigation'
|
import { notFound } from 'next/navigation'
|
||||||
import { Link } from '@/src/i18n/navigation'
|
import { Link } from '@/src/i18n/navigation'
|
||||||
import { getAllPosts, getPostBySlug, getRelatedPosts } from '@/lib/markdown'
|
import { getAllPosts, getPostBySlug, getRelatedPosts } from '@/lib/markdown'
|
||||||
import { formatDate, formatRelativeDate } from '@/lib/utils'
|
import { formatDate } from '@/lib/utils'
|
||||||
import { TableOfContents } from '@/components/blog/table-of-contents'
|
import { TableOfContents } from '@/components/blog/table-of-contents'
|
||||||
import { ReadingProgress } from '@/components/blog/reading-progress'
|
import { ReadingProgress } from '@/components/blog/reading-progress'
|
||||||
import { StickyFooter } from '@/components/blog/sticky-footer'
|
import { StickyFooter } from '@/components/blog/sticky-footer'
|
||||||
import MarkdownRenderer from '@/components/blog/markdown-renderer'
|
import MarkdownRenderer from '@/components/blog/markdown-renderer'
|
||||||
import { setRequestLocale } from 'next-intl/server'
|
|
||||||
import { routing } from '@/src/i18n/routing'
|
|
||||||
|
|
||||||
export async function generateStaticParams() {
|
export async function generateStaticParams() {
|
||||||
const locales = ['en', 'ro']
|
const locales = ['en', 'ro']
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import { Link } from '@/src/i18n/navigation'
|
|||||||
import { getAllTags, getPostsByTag, getTagInfo, getRelatedTags } from '@/lib/tags'
|
import { getAllTags, getPostsByTag, getTagInfo, getRelatedTags } from '@/lib/tags'
|
||||||
import { TagList } from '@/components/blog/tag-list'
|
import { TagList } from '@/components/blog/tag-list'
|
||||||
import { formatDate } from '@/lib/utils'
|
import { formatDate } from '@/lib/utils'
|
||||||
import { setRequestLocale } from 'next-intl/server'
|
|
||||||
import { routing } from '@/src/i18n/routing'
|
|
||||||
|
|
||||||
export async function generateStaticParams() {
|
export async function generateStaticParams() {
|
||||||
const tags = await getAllTags()
|
const tags = await getAllTags()
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ interface CodeBlockProps {
|
|||||||
code: string
|
code: string
|
||||||
language: string
|
language: string
|
||||||
filename?: string
|
filename?: string
|
||||||
showLineNumbers?: boolean
|
_showLineNumbers?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export function CodeBlock({ code, language, filename, showLineNumbers = true }: CodeBlockProps) {
|
export function CodeBlock({ code, language, filename, _showLineNumbers = true }: CodeBlockProps) {
|
||||||
const [copied, setCopied] = useState(false)
|
const [copied, setCopied] = useState(false)
|
||||||
|
|
||||||
const handleCopy = async () => {
|
const handleCopy = async () => {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ interface MarkdownRendererProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function MarkdownRenderer({ content, className = '' }: MarkdownRendererProps) {
|
export default function MarkdownRenderer({ content, className = '' }: MarkdownRendererProps) {
|
||||||
const locale = useLocale()
|
const _locale = useLocale()
|
||||||
return (
|
return (
|
||||||
<div className={`prose prose-invert prose-zinc max-w-none ${className}`}>
|
<div className={`prose prose-invert prose-zinc max-w-none ${className}`}>
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default [
|
|||||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||||
'@typescript-eslint/no-unused-vars': [
|
'@typescript-eslint/no-unused-vars': [
|
||||||
'warn',
|
'warn',
|
||||||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
{ argsIgnorePattern: '^_|node', varsIgnorePattern: '^_' },
|
||||||
],
|
],
|
||||||
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
||||||
},
|
},
|
||||||
@@ -26,6 +26,7 @@ export default [
|
|||||||
'dist/',
|
'dist/',
|
||||||
'.cache/',
|
'.cache/',
|
||||||
'*.config.js',
|
'*.config.js',
|
||||||
|
'next.config.analyzer.js',
|
||||||
'public/',
|
'public/',
|
||||||
'coverage/',
|
'coverage/',
|
||||||
],
|
],
|
||||||
|
|||||||
11
fix.js
11
fix.js
@@ -1,11 +0,0 @@
|
|||||||
const fs = require('fs')
|
|
||||||
let content = fs.readFileSync('lib/remark-copy-images.ts', 'utf8')
|
|
||||||
const lines = content.split('\n')
|
|
||||||
for (let i = 0; i < lines.length; i++) {
|
|
||||||
if (lines[i].includes('replace')) {
|
|
||||||
console.log(`Line ${i + 1}:`, JSON.stringify(lines[i]))
|
|
||||||
lines[i] = lines[i].replace(/replace\(\/\\/g / g, 'replace(/\\/g')
|
|
||||||
console.log(`Fixed:`, JSON.stringify(lines[i]))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fs.writeFileSync('lib/remark-copy-images.ts', lines.join('\n'))
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
const requiredEnvVars = ['NEXT_PUBLIC_SITE_URL', 'NODE_ENV'] as const
|
const requiredEnvVars = ['NEXT_PUBLIC_SITE_URL', 'NODE_ENV'] as const
|
||||||
|
|
||||||
const optionalEnvVars = ['PORT', 'HOSTNAME', 'NEXT_PUBLIC_GA_ID'] as const
|
const _optionalEnvVars = ['PORT', 'HOSTNAME', 'NEXT_PUBLIC_GA_ID'] as const
|
||||||
|
|
||||||
export function validateEnvironment() {
|
export function validateEnvironment() {
|
||||||
const missingVars: string[] = []
|
const missingVars: string[] = []
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ async function copyAndRewritePath(node: ImageNode, options: Options): Promise<vo
|
|||||||
node.url = publicUrl + queryParams
|
node.url = publicUrl + queryParams
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch {
|
||||||
// Stat failed, proceed with copy
|
// Stat failed, proceed with copy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
next-env.d.ts
vendored
2
next-env.d.ts
vendored
@@ -1,6 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/dev/types/routes.d.ts";
|
import "./.next/types/routes.d.ts";
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
|
|||||||
1
types/translations.d.ts
vendored
1
types/translations.d.ts
vendored
@@ -1,5 +1,6 @@
|
|||||||
type Messages = typeof import('../messages/en.json')
|
type Messages = typeof import('../messages/en.json')
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
interface IntlMessages extends Messages {}
|
interface IntlMessages extends Messages {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user