Skip to content

Instantly share code, notes, and snippets.

@adamcegielka
Last active January 11, 2024 15:45
Show Gist options
  • Save adamcegielka/afa5443036c4f20be7cdd218bb638068 to your computer and use it in GitHub Desktop.
Save adamcegielka/afa5443036c4f20be7cdd218bb638068 to your computer and use it in GitHub Desktop.

Prettier


Prettier Prettier - GitHub Prettier - Stack Overflow

🔸 install Prettier npm install --save-dev --save-exact prettier
🔸 add file to project .prettierignore :

playwright-report
package-lock.json
README.md
test-results

🔸 add Prettier rule .prettierrc.json :

{
    "singleQuote": true
}

or more:

{
    "bracketSpacing": true,
    "semi": true,
    "singleQuote": true,
    "tabWidth": 2,
    "endOfLine": "lf"
}

🔸 run formatting with Prettier npx prettier --write .
🔸 install plug-in Prettier


🔸 Linking Prettier with ESLint npm install --save-dev eslint-config-prettier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment