Created
November 9, 2021 15:38
-
-
Save tawfiknasser/c5a903d524af50681e0c7d66cbbc92fd to your computer and use it in GitHub Desktop.
lint or prettier staged only files
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
{ | |
"lint" : "eslint ./", | |
"lint:staged": "eslint $(git diff --cached --name-only | grep -E '\\.(js)$')", | |
"lint:fix": "eslint . --fix", | |
"prettier": "prettier --write '**/*.{js,json,md}'", | |
"prettier:check": "prettier --check '**/*.{js,json,md}'", | |
"prettier-check:staged": "prettier --check $(git diff --cached --name-only | grep -E '\\.(js|json|md)$')" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment