Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .eslintrc

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: ⚙️ Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 8
version: 10

- name: 📝 Cache dependencies
id: cache-deps
Expand All @@ -51,7 +51,7 @@ jobs:
- name: ⚙️ Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 8
version: 10

- name: 📝 Cache dependencies
id: cache-deps
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ next-env.d.ts
# personal
.vscode
.swc

# cursor
.cursor
.specstory
.cursorindexingignore
90 changes: 90 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"$schema": "./node_modules/@biomejs/biome/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"includes": [
"**",
"!!**/node_modules",
"!!**/.next",
"!!**/dist",
"!!**/build",
"!!**/*.config.js",
"!!**/coverage",
"!!**/*.md",
"!!**/*.mdx"
]
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto"
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"recommended": true,
"useKeyWithClickEvents": "warn",
"useKeyWithMouseEvents": "warn",
"useValidAnchor": "warn"
},
"complexity": {
"recommended": true,
"noExcessiveCognitiveComplexity": "warn"
},
"correctness": {
"recommended": true,
"useExhaustiveDependencies": "warn",
"noUnknownFunction": "off"
},
"performance": {
"recommended": true
},
"security": {
"recommended": true
},
"style": {
"recommended": true,
"useImportType": "off",
"useNodejsImportProtocol": "off",
"noDescendingSpecificity": "off"
},
"suspicious": {
"recommended": true,
"useIterableCallbackReturn": "warn"
},
"nursery": {
"useSortedClasses": {
"level": "warn",
"options": {
"attributes": ["class", "className"]
}
}
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"semicolons": "always",
"trailingCommas": "es5",
"arrowParentheses": "always"
}
},
"json": {
"formatter": {
"enabled": true
}
}
}
4 changes: 2 additions & 2 deletions data/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const dictionaries: Record<Locale, () => Promise<Dictionary>> = {
};

export const isLocale = (language: string): language is Locale =>
locales.findIndex((locale) => locale === language) > -1;
locales.indexOf(language as Locale) > -1;

export const getDictionary = (locale: Locale) =>
export const getDictionary = (locale: string) =>
isLocale(locale) ? dictionaries[locale]() : dictionaries[defaultLocale]();
9 changes: 4 additions & 5 deletions data/metadata.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Metadata } from 'next';
import type { FeedOptions } from 'feed';
import { WEBSITE_CONFIGS } from '~/constants';
import { Locale, defaultLocale, getDictionary, locales } from '~/data/i18n';
import type { Metadata } from 'next';
import { WEBSITE_CONFIGS } from '#/constants';
import { defaultLocale, getDictionary, Locale, locales } from '#/data/i18n';

export async function createMetadata(
locale: Locale = defaultLocale
locale: string = defaultLocale
): Promise<Metadata> {
const {
common: { title },
Expand All @@ -21,7 +21,6 @@ export async function createMetadata(
applicationName: title,
keywords: ['frontend', 'notes'],
referrer: 'origin',
themeColor: '#000000',
robots: 'index, follow',
authors: [
{
Expand Down
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const jestConfig = {
testEnvironment: 'jest-environment-jsdom',
collectCoverageFrom: [
'<rootDir>/src/**/*.{ts,tsx}',
'!<rootDir>/src/middleware.ts',
'!<rootDir>/src/proxy.ts',
'!<rootDir>/src/app/*.tsx',
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^~/(.*)$': '<rootDir>/$1',
'^#/(.*)$': '<rootDir>/$1',
},
};

Expand Down
4 changes: 1 addition & 3 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
typedRoutes: true,
},
typedRoutes: true,
images: {
unoptimized: true,
},
Expand Down
65 changes: 27 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,62 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"dev": "next dev --webpack",
"build": "next build --webpack",
"start": "next start",
"lint": "next lint",
"lint": "biome lint .",
"lint:fix": "biome lint --write --unsafe .",
"format": "biome format --write .",
"check": "biome check .",
"check:fix": "biome check --write --unsafe .",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage"
},
"dependencies": {
"@giscus/react": "^2.4.0",
"@react-spring/web": "^9.7.3",
"@react-spring/web": "^9.7.5",
"clsx": "^1.2.1",
"feed": "^4.2.2",
"next": "^13.5.6",
"next": "16.0.3",
"next-mdx-remote": "^4.4.1",
"next-nprogress-bar": "^2.1.2",
"next-nprogress-bar": "^2.4.7",
"next-sitemap": "^4.2.3",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "19.2.0",
"react-dom": "19.2.0",
"react-icons": "^4.12.0",
"rehype-code-titles": "^1.2.0",
"rehype-code-titles": "^1.2.1",
"rehype-prism-plus": "^1.6.3",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"sharp": "^0.32.6",
"sharp": "^0.34.5",
"tailwind-merge": "^1.14.0",
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
"@biomejs/biome": "^2.3.6",
"@svgr/webpack": "^7.0.0",
"@tailwindcss/typography": "^0.5.10",
"@tailwindcss/typography": "^0.5.19",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"@types/node": "^18.19.3",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"@testing-library/react": "^14.3.1",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^18.19.130",
"@types/react": "19.2.6",
"@types/react-dom": "19.2.3",
"@types/testing-library__jest-dom": "^5.14.9",
"@types/unist": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"autoprefixer": "^10.4.16",
"eslint": "^8.56.0",
"eslint-config-next": "^13.5.6",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-sonarjs": "^0.19.0",
"eslint-plugin-tailwindcss": "^3.13.0",
"@types/unist": "^3.0.3",
"autoprefixer": "^10.4.22",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.4.32",
"postcss": "^8.5.6",
"postcss-import": "^15.1.0",
"postcss-load-config": "^4.0.2",
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.2.8",
"tailwindcss": "^3.4.0",
"typescript": "^5.3.3"
"tailwindcss": "^3.4.18",
"typescript": "^5.9.3"
},
"browserslist": [
"defaults and supports es6-module",
"maintained node versions"
],
"prettier": {
"semi": true,
"singleQuote": true,
"plugins": [
"prettier-plugin-tailwindcss"
]
}
]
}
Loading