Adding lint script to package.json

Just as we did with the build, serve, and watch npm scripts, we can add a fix and lint script into our package.json:

"scripts": {    ...    "fix": "eslint src --fix",    "lint": "eslint src",    ...

Now, we can run yarn run lint to lint our entire project.

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.