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

Integrate Prettier and add a configuration file with instructions for safe usage. #46

Open
wants to merge 6 commits into
base: working
Choose a base branch
from

Conversation

Vooxify
Copy link
Collaborator

@Vooxify Vooxify commented Sep 28, 2024

Integrate Prettier and add a configuration file with instructions for safe usage. Anything else ;-)

@xav35000
Copy link
Collaborator

xav35000 commented Sep 28, 2024

Please use Markdown for guides, that should look something like that :

PRETTIER GUIDE

To use Prettier correctly (if you don't know what Prettier is, it's a module that formats your code correctly,
like this, so everyone has the same formatting style as you), you need to follow these steps:

  1. Install the Prettier module (on VSCODE, you need to press "CTRL"/"CMD" + "SHIFT" + "X" and search for "Prettier - Code formatter")

  2. Install the ESLint module (on VSCODE, you need to press "CTRL"/"CMD" + "SHIFT" + "X" and search for "ESLint")

  3. Configure Prettier. To do this, press "CTRL"/"CMD" + "SHIFT" + "P" and type "Open User Settings JSON". Be careful, choose JSON!

After that, paste these lines into the JSON file:

{
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "prettier.requireConfig": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": "always",
        "source.organizeImports": "always"
    }
}

@xav35000 xav35000 added documentation Improvements or additions to documentation development A tool for contributors labels Sep 28, 2024
@Vooxify
Copy link
Collaborator Author

Vooxify commented Sep 28, 2024

If you want 😁

@Truiteseche
Copy link
Member

Good job! But indeed as @xav35000 said the guide should be revised

@xav35000
Copy link
Collaborator

Mais pourquoi une majuscule alors que le reste de la config (perso) est en minuscule ?

Thats my bad i was confused with the json syntax for a bit. Sorry !

@Vooxify
Copy link
Collaborator Author

Vooxify commented Sep 29, 2024

I will change the extension and after it's done 👍

@Vooxify
Copy link
Collaborator Author

Vooxify commented Sep 29, 2024

Done !

Copy link
Collaborator

@xav35000 xav35000 left a comment

Choose a reason for hiding this comment

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

To use **Prettier** correctly (if you don't know what Prettier is, it's a module that formats your code, so everyone has the same formatting style as you), you need to follow these steps:

1. **Install the Prettier module**  
   On VSCode, press `CTRL` / `CMD` + `SHIFT` + `X` and search for **"Prettier - Code formatter"**.

2. **Install the ESLint module**  
   On VSCode, press `CTRL` / `CMD` + `SHIFT` + `X` and search for **"ESLint"**.

3. **Configure Prettier**  
   To do this, press `CTRL` / `CMD` + `SHIFT` + `P` and type **"Open User Settings JSON"**. Be careful to choose **JSON**!

4. **Paste the following configuration into the JSON file**:

  ```json
    {
        "editor.defaultFormatter": "esbenp.prettier-vscode",
        "prettier.requireConfig": true,
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": "always",
            "source.organizeImports": "always"
        }
    }
I think its supposed to look like that (not sure about line 18 but thats def better)

@Vooxify
Copy link
Collaborator Author

Vooxify commented Sep 29, 2024

Done !

@Truiteseche Truiteseche self-assigned this Oct 25, 2024
@Truiteseche
Copy link
Member

Nice job! We will wait until the ongoing refactoring is complete to merge this PR and format all files, to avoid creating conflicts. Thanks

@Truiteseche Truiteseche added the pending Reviewed but wait before merging for various reasons label Oct 26, 2024
Copy link

@as2pick as2pick left a comment

Choose a reason for hiding this comment

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

All done !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development A tool for contributors documentation Improvements or additions to documentation pending Reviewed but wait before merging for various reasons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants