Skip to content

Commit

Permalink
Package file updated with prettier, lint-staged, husky
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgina Hodgkinson authored and Georgina Hodgkinson committed Jul 13, 2018
1 parent 25beff0 commit a736fcd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,25 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"ajv": "^6.5.2",

This comment has been minimized.

Copy link
@teleivo

teleivo Jul 15, 2018

Collaborator

did you do the yarn add husky lint-staged prettier?

because these dependencies should end up in the yarn.lock file

https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#formatting-code-automatically

This comment has been minimized.

Copy link
@edieblu

edieblu Jul 15, 2018

Collaborator

Hi @teleivo, yes, Georgina added husky, lint-staged and prettier on Friday (she might've used npm, not yarn though).

I've just run the command to format the project in prettier for the first time as well.

This comment has been minimized.

Copy link
@edieblu

edieblu Jul 15, 2018

Collaborator

Should we have used yarn or is either of them fine?

This comment has been minimized.

Copy link
@edieblu

edieblu Jul 15, 2018

Collaborator

Hi @teleivo ignore my previous question. I've just realized I didn't actually run yarn install at any point so now it should be there. I've updated the latest version, let me know if it's okay. I've also had some issues running npm test, had to install watchman as per here: facebook/create-react-app#871

Now everything seems to be working! :)

"husky": "^0.14.3",
"lint-staged": "^7.2.0",
"prettier": "^1.13.7",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-scripts": "1.1.4"
},
"lint-staged": {
"src/**/*.{js,jsx,json,css}": [
"prettier --single-quote --write",
"git add"
]
},
"scripts": {
"precommit": "lint-staged",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
}

0 comments on commit a736fcd

Please sign in to comment.