-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eslint + Prettier = 😍 #19
Conversation
0ef99d4
to
4072ad3
Compare
@@ -53,7 +50,6 @@ function createServer( | |||
|
|||
// Middlewares | |||
appHandler | |||
.use(morgan('tiny')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@satya164 I think for that to work, we should probably expose a flag verbose
on a command line tools in the future and later, use something more comprehensive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this when we actually have it. Otherwise it's impossible to see if packager actually received the request. Though I think printing requests is pretty basic and shouldn't depend on --verbose
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Printing all requests like the above does should depend on verbose flag as informing about devtools ui request is not something average user would be interested in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I won't be interested in requests for devtools UI, but I'll certainly be interested in requests for the bundle and assets.
|
CC this issue to @mjackson when we open source that as he wanted me to do the same for react-router |
package.json
Outdated
"lint": "eslint src", | ||
"prettier": "prettier --single-quote --write src/**/*.js" | ||
"precommit": "lint-staged", | ||
"test": "flow && npm run lint", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think flow
should be a separate script. what if I just want to run flow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems valid, will add
@@ -53,7 +50,6 @@ function createServer( | |||
|
|||
// Middlewares | |||
appHandler | |||
.use(morgan('tiny')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this when we actually have it. Otherwise it's impossible to see if packager actually received the request. Though I think printing requests is pretty basic and shouldn't depend on --verbose
Place it after devTools middleware so that we dont log too much to end users, but request for assets only. Also, change url to path as we dont support params (like Packager) and printing them would make that confusing for people.
…i into feat/fix-linting
Fixes #17
In this PR:
global
- I added it at the very beginning at the point I was hacking around trying to get things working.InitializeCore
already does that"
). That caused it to not format nested files.eslint-config-prettier
to turn off settings that either interfere with Prettier (--fix option) or warn about things prettier changes for us anyway (like trailing commas)precommit
script with Husky to run every time we commit - it automatically fixes small eslint issues for you, runs prettier and adds files to existing commitpackage.json
to reduce dot files (I hate them)