Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code formatting setup, code actions and guidleines #6

Closed
wants to merge 17 commits into from

Conversation

aishenreemo
Copy link
Member

No description provided.

This commit configures `prettier`. To format a directory, for example
[react-todo](https://github.com/FWDP/rantboard/tree/main/packages/react-todo):

```bash
cd packages/react-todo # assuming you're on root-directory (rantboard)
pnpm install # install dependencies
pnpm run format # format files
```
Add `.editorconfig` for consistent coding styles.
To use, please install editorconfig plugin.

- vscode
https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
- nvim
https://github.com/gpanders/editorconfig.nvim
- other
please visit editorconfig website (https://editorconfig.org/)
@aishenreemo aishenreemo self-assigned this Aug 6, 2023
@aishenreemo aishenreemo marked this pull request as draft August 6, 2023 04:19
@aishenreemo
Copy link
Member Author

#5

@aishenreemo aishenreemo linked an issue Aug 6, 2023 that may be closed by this pull request
@directormac directormac marked this pull request as ready for review August 6, 2023 04:37
Copy link
Contributor

@directormac directormac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let the pnpm yaml stay as we will use it on building for deployments at cloud providers.

@aishenreemo aishenreemo marked this pull request as draft August 6, 2023 04:38
@aishenreemo
Copy link
Member Author

Huwag po muna i-merge, hindi pa tapos, thank you.

@aishenreemo
Copy link
Member Author

Let the pnpm yaml stay as we will use it on building for deployments at cloud providers.

Okay gotyu.

@directormac
Copy link
Contributor

@DDuran19 Review for VanillaJS
@itsmenoahpoli Review for Vue
@kurtobando Review for React

@GengineerDev GengineerDev self-requested a review August 6, 2023 05:42
@directormac directormac self-requested a review August 6, 2023 05:42
@aishenreemo aishenreemo force-pushed the format_ca branch 8 times, most recently from b624aa8 to d0eed94 Compare August 6, 2023 06:16
Copy link

@kurtobando kurtobando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good to me. Good ahead

@aishenreemo
Copy link
Member Author

aishenreemo commented Aug 6, 2023

Overview

This pull request aims to enhance the code formatting consistency across the project using Prettier. The changes in this pull request include:

  • Adding Prettier configuration file for consistent code formatting.
  • Introducing GitHub Code Actions to automatically format code using Prettier.

Code Formatting Guidelines

To maintain a consistent code style, we are introducing the following code formatting guidelines:

  1. Indentation: Use four spaces for indentation. Avoid using tabs.
  2. Semicolons: Putting semi-colons at the end of a statement is required.
  3. Single vs. Double Quotes: Use double quotes (") for strings unless escaping is required.
  4. Line Length: Limit lines to a maximum of 100 characters. If necessary, break long lines into multiple lines for readability.

GitHub Code Actions with Prettier

We have integrated GitHub Code Actions with Prettier to automatically format code whenever a pull request is opened or updated. This ensures that your changes adhere to the defined formatting guidelines.

Running Prettier

  1. Install Dependencies: Ensure that you have Node.js and pnpm installed on your machine.
  2. Change Directory: cd into your desired directory (for example cd packages/react-todo)
  3. Install pnpm Dependencies: Run pnpm install to install the required dependencies.
  4. Run Prettier: Execute pnpm prettier:format to run Prettier and format code.

EditorConfig

Contributors also may use this plugin to automatically change your IDE settings.

@aishenreemo aishenreemo marked this pull request as ready for review August 6, 2023 06:38
@aishenreemo aishenreemo changed the title Code formatting setup, code actions and guidleines (draft) Code formatting setup, code actions and guidleines Aug 6, 2023
@aishenreemo
Copy link
Member Author

Hi, naging super complicated ng thread na ito haha, gumawa ako panibagong pull request #9 para mas concise, ill close this pr na without merging it. thank you

@aishenreemo aishenreemo closed this Aug 6, 2023
@aishenreemo aishenreemo deleted the format_ca branch August 6, 2023 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants