Skip to content

Instantly share code, notes, and snippets.

@tawfiknasser
tawfiknasser / statusCodeSelector.js
Last active August 23, 2022 08:54
REST api responses status selector
module.exports = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
OK: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
@tawfiknasser
tawfiknasser / package.json
Created November 9, 2021 15:38
lint or prettier staged only files
{
"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)$')"
}