Skip to content
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

Feature request: Lint when server starts #6

Closed
ndabAP opened this issue Sep 18, 2017 · 4 comments
Closed

Feature request: Lint when server starts #6

ndabAP opened this issue Sep 18, 2017 · 4 comments

Comments

@ndabAP
Copy link
Contributor

ndabAP commented Sep 18, 2017

It would be cool to have automatically linting when running npm run dev instead of actively starting it with npm run lint.

@vmasto
Copy link
Owner

vmasto commented Sep 18, 2017

Heya, you can achieve that by amending your dev script in package.json to the folllowing:

"dev": "nodemon src/index.js --exec \"node -r dotenv/config -r babel-register\" & npm run lint",

Does that help?

@ndabAP
Copy link
Contributor Author

ndabAP commented Sep 20, 2017

Hey, that works perfectly, thanks a lot! Why not adding this to package.json :) ?

@vmasto
Copy link
Owner

vmasto commented Sep 20, 2017

No worries. I'm not adding it because it very much depends on preference, most people want the server output be on a different terminal instance than the lint output, and they also lint inside their editors normally rather than on the terminal. It's a very easy change so I'm leaving it as is for now :) Thanks for your interest btw!

@vmasto vmasto closed this as completed Sep 20, 2017
@ndabAP
Copy link
Contributor Author

ndabAP commented Oct 6, 2017

Just a minimal improvement:

"dev": "nodemon src/index.js --exec \"node -r dotenv/config -r babel-register\" | npm run lint"

This let's you kill both processes at once with Ctrl + C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants