[js] Set up pre-commit hook for prettier
This commit is contained in:
parent
fba6380729
commit
24d16e4853
15
package.json
15
package.json
|
@ -13,6 +13,7 @@
|
||||||
"flow": "flow",
|
"flow": "flow",
|
||||||
"format": "eslint --fix ./lib ./tests/src ./tests/lib",
|
"format": "eslint --fix ./lib ./tests/src ./tests/lib",
|
||||||
"lint": "eslint ./lib ./tests/src ./tests/lib",
|
"lint": "eslint ./lib ./tests/src ./tests/lib",
|
||||||
|
"precommit": "lint-staged",
|
||||||
"prepublish": "npm run clean && npm run build",
|
"prepublish": "npm run clean && npm run build",
|
||||||
"postinstall": "postinstall-build dist && opencollective postinstall || exit 0",
|
"postinstall": "postinstall-build dist && opencollective postinstall || exit 0",
|
||||||
"test-cli": "node ./bin/test.js",
|
"test-cli": "node ./bin/test.js",
|
||||||
|
@ -122,5 +123,19 @@
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/react-native-firebase",
|
"url": "https://opencollective.com/react-native-firebase",
|
||||||
"logo": "https://opencollective.com/opencollective/logo.txt"
|
"logo": "https://opencollective.com/opencollective/logo.txt"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"lib/**/*.js": [
|
||||||
|
"eslint --fix",
|
||||||
|
"git add"
|
||||||
|
],
|
||||||
|
"tests/src/**/*.js": [
|
||||||
|
"eslint --fix",
|
||||||
|
"git add"
|
||||||
|
],
|
||||||
|
"tests/lib/**/*.js": [
|
||||||
|
"eslint --fix",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
module.exports = {
|
||||||
|
trailingComma: 'es5',
|
||||||
|
singleQuote: true,
|
||||||
|
};
|
Loading…
Reference in New Issue