Skip to content

Instantly share code, notes, and snippets.

@Kingdutch
Created February 28, 2019 07:28
Show Gist options
  • Select an option

  • Save Kingdutch/b283271f8e935f59eb87a0a747166892 to your computer and use it in GitHub Desktop.

Select an option

Save Kingdutch/b283271f8e935f59eb87a0a747166892 to your computer and use it in GitHub Desktop.
Post create-react-app package.json with Prettier without ejecting
{
"name": "tea-companion",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.8.3",
"react-dom": "^16.8.3",
"react-scripts": "2.1.5",
"styled-components": "^4.1.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint src/",
"lint-fix": "eslint --fix src/"
},
"eslintConfig": {
"extends": [
"plugin:prettier/recommended",
"react-app"
],
"plugins": [
"prettier",
"react-hooks"
],
"rules": {
"prettier/prettier": "error"
}
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react-hooks": "^1.2.0",
"prettier": "1.16.4",
"prop-types": "^15.7.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment