Skip to content

Commit

Permalink
Merge pull request #16 from PezhmanGhavami/update/resume-and-packages
Browse files Browse the repository at this point in the history
update: npm packages and resume file
  • Loading branch information
PezhmanGhavami authored Oct 24, 2024
2 parents 7b4f2b8 + f28009f commit af28de4
Show file tree
Hide file tree
Showing 13 changed files with 1,213 additions and 651 deletions.
36 changes: 0 additions & 36 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Viewport } from "next";
import "./globals.css";
import type { ReactNode } from "react";

import "./globals.css";

Expand Down Expand Up @@ -33,7 +33,7 @@ export const generateMetadata = async () => {
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
children: ReactNode;
}>) {
return (
<html className="scroll-smooth" lang="en">
Expand Down
4 changes: 2 additions & 2 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const Navbar = () => {
{openMenu && (
<div
onClick={closeMenu}
className="fixed inset-0 z-10 h-screen w-screen bg-neutral-900/10 backdrop-blur-sm"
className="fixed inset-0 z-10 h-dvh w-screen bg-neutral-900/10 backdrop-blur-sm"
/>
)}
<header
Expand Down Expand Up @@ -200,7 +200,7 @@ const Navbar = () => {
{/* Nav links and resume button */}
<nav
className={cn(
"absolute right-0 top-0 z-20 flex h-screen w-2/3 flex-1 flex-col justify-evenly",
"absolute right-0 top-0 z-20 flex h-dvh w-2/3 flex-1 flex-col justify-evenly",
"bg-neutral-800 px-10 text-center text-lg transition-transform duration-300",
"sm:static sm:ml-2 sm:h-auto sm:translate-x-0 sm:flex-row sm:items-center sm:justify-between sm:bg-transparent sm:px-0 sm:text-base",
openMenu ? "translate-x-0" : "translate-x-full",
Expand Down
83 changes: 83 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import js from "@eslint/js";
import globals from "globals";
import prettier from "eslint-config-prettier";
import pluginNext from "@next/eslint-plugin-next";
import typescriptParser from "@typescript-eslint/parser";
import typescriptPlugin from "@typescript-eslint/eslint-plugin";

/** @type {import("eslint").Linter.Config} */
const config = [
// Core ESLint recommendations
js.configs.recommended,

// Prettier config to prevent conflict
prettier,

// TypeScript support
{
files: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx", "**/*.mdx"],
languageOptions: {
parser: typescriptParser,
},
plugins: {
"@typescript-eslint": typescriptPlugin,
},
rules: typescriptPlugin.configs.recommended.rules,
},

// Next.js plugin
{
files: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx", "**/*.mdx"],
plugins: {
"@next/next": pluginNext,
},
rules: {
...pluginNext.configs.recommended.rules,
},
},

// Custom rules
{
rules: {
"func-style": ["error", "expression", { allowArrowFunctions: true }],
"prefer-arrow-callback": ["error", { allowNamedFunctions: true }],
},
},

// Language options with browser and Node.js globals
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
},
},
},

// Ignored files
{
ignores: [
"node_modules",
".pnp",
".pnp.js",
".yarn/install-state.gz",
"coverage",
".next",
"out",
"build",
".DS_Store",
"*.pem",
"npm-debug.log*",
"yarn-debug.log*",
"yarn-error.log*",
".env*.local",
".vercel",
"*.tsbuildinfo",
"next-env.d.ts",
],
},
];

export default config;
11 changes: 11 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
const nextConfig = {
reactStrictMode: true,

experimental: {
turbo: {
rules: {
"*.svg": {
loaders: ["@svgr/webpack"],
as: "*.js",
},
},
},
},

webpack: (config) => {
// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find((rule) =>
Expand Down
Loading

0 comments on commit af28de4

Please sign in to comment.