Skip to content

Commit

Permalink
chore: Run prettier on all frontend files
Browse files Browse the repository at this point in the history
prettier --write .

- `npm run pretty` runs prettier on the "src" directory.
   This left the outside files unformatted.
- Running `prettier` on the root will format all the files that are outside "src".
  • Loading branch information
chinmaykunkikar authored and krishnaacharyaa committed Nov 15, 2023
1 parent 6dcc215 commit d997cef
Show file tree
Hide file tree
Showing 13 changed files with 191 additions and 181 deletions.
94 changes: 51 additions & 43 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Contributing

Welcome to the project! I'm really excited to have you on board, and before we dive into the guidelines, let me share the essence of why this project was created.

## Intention behind building this project

At its core, this project embodies two important aims:

1. **Start Your Open Source Journey**: It's aimed to kickstart your open-source journey. Here, you'll learn the basics of Git and get a solid grip on the MERN stack and I strongly believe that learning and building should go hand in hand.
2. **Diving into React**: Once you've got the basics down, a whole new adventure begins of mastering React. This project covers everything, from simple form validation to advanced performance enhancements. And I've planned much more cool stuff to add in the near future if the project hits more number of contributors.

Expand All @@ -16,6 +19,7 @@ I'd love for you to make the most of this project - it's all about learning, hel
4. [Guidelines to follow](#guidelines-to-follow)

<a name="code-of-conduct"></a>

## Code of Conduct

In our project, we believe in creating an open and inclusive space for everyone. To ensure a respectful and positive community, follow these key guidelines:
Expand All @@ -28,75 +32,79 @@ In our project, we believe in creating an open and inclusive space for everyone.
We're committed to maintaining a positive and inclusive community, and your cooperation is crucial for making this a safe and enjoyable space for everyone.

<a name="setting-up-the-project"></a>

## Setting up the Project

To setup the project locally follow the steps:
To setup the project locally follow the steps:

1. Fork and Star the project.
2. Clone your forked repository.
3. Run `npm run installer`.
4. Set up your MongoDB database:
- Open MongoDB Compass and run MongoDB locally at `mongodb://localhost:27017`.
- Import sample posts data from `backend/data/sample_posts.json`.
6. Rename the `.env.sample` file in the backend and frontend folders to `.env`.
7. Launch the development server with `npm start` in the root directory of the repository.
5. Rename the `.env.sample` file in the backend and frontend folders to `.env`.
6. Launch the development server with `npm start` in the root directory of the repository.

<a name="request-for-changes-pull-requests"></a>

## Request for Changes/Pull Requests

To contribute to this project, you need to create a fork of the repository and then commit your changes to it. Follow these steps:

1. Fork the repository if haven't done already from [wanderlust](https://github.com/krishnaacharyaa/wanderlust/)
2. Add your fork as a local project:

```sh
# Using HTTPS
git clone https://github.com/YOUR-USERNAME/wanderlust.git
```
```sh
# Using SSH
git clone git@github.com:YOUR-USERNAME/wanderlust.git
```
```sh
# Using HTTPS
git clone https://github.com/YOUR-USERNAME/wanderlust.git
```

```sh
# Using SSH
git clone git@github.com:YOUR-USERNAME/wanderlust.git
```

3. Add git remote controls:

```sh
# Using HTTPS
git remote add fork https://github.com/YOUR-USERNAME/wanderlust.git
git remote add upstream https://github.com/krishnaacharyaa/wanderlust.git
```
```sh
# Using SSH
git remote add fork git@github.com:YOUR-USERNAME/wanderlust.git
git remote add upstream git@github.com:krishnaacharyaa/wanderlust.git
```
```sh
# Using HTTPS
git remote add fork https://github.com/YOUR-USERNAME/wanderlust.git
git remote add upstream https://github.com/krishnaacharyaa/wanderlust.git
```

```sh
# Using SSH
git remote add fork git@github.com:YOUR-USERNAME/wanderlust.git
git remote add upstream git@github.com:krishnaacharyaa/wanderlust.git
```

4. Verify that you have your two git remotes:

```sh
git remote -v
```
```sh
git remote -v
```

5. **For every individual PR follow these 2 steps:**
- To stay up to date with the central repository:

```sh
git pull upstream main
```

- Checkout a private from your main Branch

```sh
# Switch to the main branch
git switch main
# Pull down any upstream changes
git pull
# Create a new branch to work on
git switch --create bugfix/1234-name-of-the-issue
```

- To stay up to date with the central repository:

```sh
git pull upstream main
```

- Checkout a private from your main Branch

```sh
# Switch to the main branch
git switch main
# Pull down any upstream changes
git pull
# Create a new branch to work on
git switch --create bugfix/1234-name-of-the-issue
```

Commit your changes, then push the branch to your fork with `git push -u fork` and open a pull request on [the Wanderlust repository](https://github.com/krishnaacharyaa/wanderlust) following the template provided.

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ body:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
Expand Down
72 changes: 36 additions & 36 deletions .github/ISSUE_TEMPLATE/ENHANCEMENT_REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,39 @@ description: Request an enhancement or improvement to an existing feature
title: "[ENHANCEMENT] <title>"
labels: ["enhancement"]
body:
- type: textarea
attributes:
label: Description
description: Please provide a detailed description of the enhancement or improvement you'd like to request.
validations:
required: true
- type: textarea
attributes:
label: Current Behavior
description: Describe the current behavior or feature that you believe needs enhancement.
validations:
required: true
- type: textarea
attributes:
label: Proposed Enhancement
description: Explain how you envision the enhancement or improvement to work or what changes you'd like to see.
validations:
required: true
- type: textarea
attributes:
label: Use Case
description: How would this enhancement benefit you or others? Please provide a use case.
validations:
required: true
- type: textarea
attributes:
label: Blockers
description: If there are any blockers or related issues that need to be addressed before this enhancement can be implemented, please describe them and provide the issue IDs.
validations:
required: false
- type: textarea
attributes:
label: Additional Information/ Attachments
description: Any additional information, images, diagrams, files, context, or details you'd like to provide about the enhancement request.
validations:
required: false
- type: textarea
attributes:
label: Description
description: Please provide a detailed description of the enhancement or improvement you'd like to request.
validations:
required: true
- type: textarea
attributes:
label: Current Behavior
description: Describe the current behavior or feature that you believe needs enhancement.
validations:
required: true
- type: textarea
attributes:
label: Proposed Enhancement
description: Explain how you envision the enhancement or improvement to work or what changes you'd like to see.
validations:
required: true
- type: textarea
attributes:
label: Use Case
description: How would this enhancement benefit you or others? Please provide a use case.
validations:
required: true
- type: textarea
attributes:
label: Blockers
description: If there are any blockers or related issues that need to be addressed before this enhancement can be implemented, please describe them and provide the issue IDs.
validations:
required: false
- type: textarea
attributes:
label: Additional Information/ Attachments
description: Any additional information, images, diagrams, files, context, or details you'd like to provide about the enhancement request.
validations:
required: false
60 changes: 30 additions & 30 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ description: Request a new feature or enhancement
title: "[FEATURE] <title>"
labels: ["feature"]
body:
- type: textarea
attributes:
label: Description
description: Please provide a detailed description of the new feature or enhancement you'd like to request.
validations:
required: true
- type: textarea
attributes:
label: Use Case
description: How would this feature be useful to you or others? Please explain the use case.
validations:
required: true
- type: textarea
attributes:
label: Proposed Solution
description: If you have any ideas on how this feature could be implemented, please share them here.
validations:
required: false
- type: textarea
attributes:
label: Additional Information
description: Any additional information or context you'd like to provide about this feature request.
validations:
required: false
- type: textarea
attributes:
label: Attachments
description: You can attach images, diagrams, or any relevant files to support your feature request.
validations:
required: false
- type: textarea
attributes:
label: Description
description: Please provide a detailed description of the new feature or enhancement you'd like to request.
validations:
required: true
- type: textarea
attributes:
label: Use Case
description: How would this feature be useful to you or others? Please explain the use case.
validations:
required: true
- type: textarea
attributes:
label: Proposed Solution
description: If you have any ideas on how this feature could be implemented, please share them here.
validations:
required: false
- type: textarea
attributes:
label: Additional Information
description: Any additional information or context you'd like to provide about this feature request.
validations:
required: false
- type: textarea
attributes:
label: Attachments
description: You can attach images, diagrams, or any relevant files to support your feature request.
validations:
required: false
12 changes: 7 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
## Summary
_Briefly describe the purpose of this PR._

_Briefly describe the purpose of this PR._

## Description

_Explain in detail what this PR is all about. This should include the problem you're solving, the approach taken, and any technical details that reviewers need to know._

## Images
_Include any relevant images or diagrams that can help reviewers visualize the changes, if applicable_

_Include any relevant images or diagrams that can help reviewers visualize the changes, if applicable_

## Issue(s) Addressed

_Enter the issue number of the bug(s) that this PR fixes_

- Template should be strictly **Closes <issue_number>**
- Example: Closes #1

## Prerequisites

- [ ] Have you followed all the [CONTRIBUTING GUIDELINES](https://github.com/krishnaacharyaa/wanderlust/blob/main/.github/CONTRIBUTING.md#guidelines-for-contributions) ?


- [ ] Have you followed all the [CONTRIBUTING GUIDELINES](https://github.com/krishnaacharyaa/wanderlust/blob/main/.github/CONTRIBUTING.md#guidelines-for-contributions)?
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ npm ci
- Open MongoDB Compass and connect MongoDB locally at `mongodb://localhost:27017`.

5. **Import sample data**
To populate the database with sample posts, you can copy the content from the `backend/data/sample_posts.json` file and insert it as a document in the `wanderlust/posts` collection in your local MongoDB database using either MongoDB Compass or `mongoimport`.
To populate the database with sample posts, you can copy the content from the `backend/data/sample_posts.json` file and insert it as a document in the `wanderlust/posts` collection in your local MongoDB database using either MongoDB Compass or `mongoimport`.

```bash
mongoimport --db wanderlust --collection posts --file ./data/sample_posts.json --jsonArray
Expand Down
18 changes: 9 additions & 9 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/stylistic-type-checked",
"prettier",
'eslint:recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/stylistic-type-checked',
'prettier',
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
};
30 changes: 15 additions & 15 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wanderlust</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wanderlust</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion frontend/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export default {
tailwindcss: {},
autoprefixer: {},
},
}
};
Loading

0 comments on commit d997cef

Please sign in to comment.