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

[Issue#3] add tools for static code analysis - Prettier init config #37

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

KarolinaZakrzewska
Copy link
Collaborator

@KarolinaZakrzewska KarolinaZakrzewska commented Nov 11, 2023

Partially Resolves #3

Scope of changes

  • Prettier is set as the default formatting
  • formatting of all files corrected
  • added Prettier to recommended extensions
    Configurations:
  • added the use of single quotes (') in Prettier configuration
  • added the use of semicolons (;) at the end of statements in Prettier configuration
  • added appropriate line break depending on the system, for Windows: CRLF (\r\n)

How to use

  • install Prettier
npm install --save-dev --save-exact prettier
  • add an exclusion file .prettierignore
package-lock.json
playwright-report
  • add the rules file .prettierrc.json
{
  "singleQuote": true,
  "endOfLine": "auto",
  "semi": true
}
  • run Prettier formatting
npx prettier --write .

Additionally, you can add the VSC extension: Prettier - Code formatter (you see it in extensions as recommended)

  • set as default formatting
    Right-click in the file e.g. package.json -> Format Document With... -> Configure Default Formatter... -> Select Prettier

@KarolinaZakrzewska KarolinaZakrzewska added documentation Improvements or additions to documentation chore: configuration Project configuration labels Nov 11, 2023
@KarolinaZakrzewska KarolinaZakrzewska self-assigned this Nov 11, 2023
.prettierrc.json Outdated Show resolved Hide resolved
@bugITwhisperer
Copy link
Collaborator

@KarolinaZakrzewska : awesome PR description! :)

@bugITwhisperer bugITwhisperer changed the title DRAFT [Issue#3] add tools for static code analysis - Prettier init config [Issue#3] add tools for static code analysis - Prettier init config Nov 12, 2023
@KarolinaZakrzewska
Copy link
Collaborator Author

KarolinaZakrzewska commented Nov 19, 2023

I resolved the feature branch conflicts with main. I added create-token.helper.ts to Priettier's ignored list - I'm not sure about its configuration, so I'll add an issue (after merging these changes).

@KarolinaZakrzewska KarolinaZakrzewska merged commit 676f1c6 into main Nov 21, 2023
@bugITwhisperer bugITwhisperer deleted the chore/ISSUE-3_prettier_formatting_init branch November 24, 2023 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore: configuration Project configuration documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Github workflow standards && project standards to be established
3 participants