From 3ab276ea4060f5cb6c8361e22c794f58408c8a62 Mon Sep 17 00:00:00 2001 From: austinkelsay Date: Wed, 2 Apr 2025 17:46:58 -0500 Subject: [PATCH] fix command, info in readme --- .eslintrc.js | 7 ------- README.md | 8 ++++++++ package.json | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 0a8420b..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: 'next/core-web-vitals', - rules: { - // Turn off exhaustive-deps rule that's causing most of the warnings - 'react-hooks/exhaustive-deps': 'off' - } -} \ No newline at end of file diff --git a/README.md b/README.md index 834ccb7..9441cf1 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,14 @@ PlebDevs is an open-source platform that combines educational content, community Now the database is running and the migrations are applied. You can now run locally. +### Linting and Code Formatting + +We use ESLint with Next.js configuration and Prettier for code formatting. We've kept the linting process simple with just two commands: + +- `npm run lint` - Run ESLint to check for issues +- `npm run lint:fix` - Fix both ESLint and Prettier formatting issues in one command + +Before submitting a PR, please run `npm run lint:fix` to ensure your code follows our standards. ## Contributing diff --git a/package.json b/package.json index f4964c6..bbfdcbc 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build": "npx prisma generate && next build && npx prisma migrate deploy", "start": "next start", "lint": "next lint", + "lint:fix": "next lint --fix && prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "postinstall": "npx prisma generate" }, "dependencies": { @@ -58,6 +59,7 @@ "eslint": "^8", "eslint-config-next": "14.2.5", "postcss": "^8", + "prettier": "^3.2.5", "tailwindcss": "^3.4.1" } }