diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1afeed9..caaec9c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,6 +47,15 @@ npm run dev ``` The application will be running locally at `http://localhost:5173`. +### 6. Code Quality & Linting +RankerHub maintains strict code quality and formatting rules. Before you commit any changes or submit a Pull Request, you **must** run the custom linting script. + +This script will automatically scan your files, fix formatting issues, and ensure Tailwind classes are properly ordered: +```bash +node fix_lint.mjs +``` +Note: If the script detects errors it cannot auto-fix, please resolve them manually before pushing. + --- ## Firebase Setup diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 791e3aa..308ffb0 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -28,7 +28,9 @@ Install the required dependencies: Bash npm install + 🔥 Step 2: Firebase Project Provisioning + To prevent testing against the production database, create your own Firebase project for local development. Create a Firebase Project @@ -66,9 +68,15 @@ Click Add App → Web App. Copy the Firebase configuration values. 🔑 Step 3: Environment Variables -Create a .env file in the project root and add your Firebase configuration: -Code snippet +The project contains a `.env.example` file which outlines all the required keys. + +1. Copy the example file to create your own local environment file: + ```bash + cp .env.example .env + +2. Open your new .env file and replace the placeholder values with the configuration from your newly created Firebase project: + VITE_FIREBASE_API_KEY=your_api_key_here VITE_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your_project_id @@ -76,7 +84,8 @@ VITE_FIREBASE_STORAGE_BUCKET=your_project_id.firebasestorage.app VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_FIREBASE_APP_ID=your_app_id VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id -⚠️ Important: Never commit your .env file. It is already included in .gitignore. + +⚠️ Important: Never commit your .env file. It is already included in our .gitignore to prevent sensitive key leaks. 📦 Step 4: Firebase CLI and Database Setup Deploy the required Firestore Security Rules and Indexes so leaderboard queries function correctly. @@ -125,12 +134,12 @@ You can now log in using GitHub authentication. Your first developer profile wil Create a Feature Branch Bash git checkout -b feature/your-feature-name -Develop and Test -Make your changes. -Test everything locally. - -Verify functionality using the Firestore emulator. +Develop and Test +- Make your changes. +- Test everything locally. +- Verify functionality using the Firestore emulator. +- Run `node fix_lint.mjs` to ensure your code meets the project's formatting standards. Commit Changes Use the project's commit conventions: