Skip to content

Instantly share code, notes, and snippets.

@adatoo
Created December 22, 2019 18:36
Show Gist options
  • Save adatoo/5b8b0e39d1264a7366c542c9a17d8090 to your computer and use it in GitHub Desktop.
Save adatoo/5b8b0e39d1264a7366c542c9a17d8090 to your computer and use it in GitHub Desktop.
Default Prettier Configuration in a React App
"devDependencies": {
"prettier": "^1.19.1"
},
...
"scripts": {
...
"format": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|html|css|md)\""
}
...
"prettier": {
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "all",
"printWidth": 120
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment