Ecole-Directe-Plus icon indicating copy to clipboard operation
Ecole-Directe-Plus copied to clipboard

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

Open Vooxify opened this issue 1 year ago • 8 comments

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

Vooxify avatar Sep 28 '24 16:09 Vooxify

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 avatar Sep 28 '24 17:09 xav35000

If you want 😁

Vooxify avatar Sep 28 '24 18:09 Vooxify

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

Truiteseche avatar Sep 28 '24 19:09 Truiteseche

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 !

xav35000 avatar Sep 28 '24 19:09 xav35000

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

Vooxify avatar Sep 29 '24 05:09 Vooxify

Done !

Vooxify avatar Sep 29 '24 06:09 Vooxify

Done !

Vooxify avatar Sep 29 '24 11:09 Vooxify

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 avatar Oct 26 '24 00:10 Truiteseche