-
Notifications
You must be signed in to change notification settings - Fork 23
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
base: working
Are you sure you want to change the base?
Conversation
Please use Markdown for guides, that should look something like that : PRETTIER GUIDETo use Prettier correctly (if you don't know what Prettier is, it's a module that formats your code correctly,
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"
}
} |
If you want 😁 |
Good job! But indeed as @xav35000 said the guide should be revised |
Thats my bad i was confused with the json syntax for a bit. Sorry ! |
I will change the extension and after it's done 👍 |
Done ! |
There was a problem hiding this 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)
Done ! |
Nice job! We will wait until the ongoing refactoring is complete to merge this PR and format all files, to avoid creating conflicts. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All done !
Integrate Prettier and add a configuration file with instructions for safe usage. Anything else ;-)