marian51 / poc-playwright-typescript-gui-api

A repository containing a sample project based on Playwright, written using Typescript, showing testing of the GUI and API of given application.
3 stars 0 forks source link

Setup Prettier (global or local?) #9

Closed marian51 closed 3 months ago

marian51 commented 3 months ago

... and decide whether to use semicolons

shpykooh commented 3 months ago

During a meeting we decided to use Prettier globally. Semicolons according to Google's TS formatting guide.

marian51 commented 3 months ago

It should be easy to set prettier config in project: https://prettier.io/docs/en/configuration We can set it in package.json file, eq:

"prettier":{
    "tabWidth": 2,
    "semi": true,
    "singleQuote": false,
    "printWidth": 150
  }

or in external file named prettier.config.js

const config = {
    tabWidth: 2,
    semi: true,
    singleQuote: false,
    printWidth: 150
  }

module.exports = config