Created
March 30, 2020 17:41
-
-
Save karthiks/029239305571e59158cf8fa8cd22c152 to your computer and use it in GitHub Desktop.
How ESLint, Husky and Lint-Staged are configured?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my_javascript_project", | |
"version": "1.0.0", | |
... | |
"scripts": { | |
"lint": "./node_modules/.bin/eslint ./app/**/*.*js* --fix", | |
... | |
}, | |
"husky": { | |
"hooks": { | |
"pre-commit": "lint-staged" | |
} | |
}, | |
"lint-staged": { | |
"*.(js|jsx)": [ | |
"npm run ./node_modules/.bin/eslint --fix", | |
"git add" | |
] | |
}, | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment