Skip to content

Commit 4562d41

Browse files
committed
adds git hooks and package.json description
1 parent 5dd5df2 commit 4562d41

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# React CSS Grid
55

6-
A pleasingly simple-to-use horizontal grid system for React based on [CSS Grid Layout](https://www.w3.org/TR/css-grid-1/), complete with breakpoints and nested-grid support.
6+
A fully-featured React grid system based on [CSS Grid Layout](https://www.w3.org/TR/css-grid-1/).
77

88
## Quick Start
99

hooks/pre-commit

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
# This script will prevent commiting changed with ESLint warnings
3+
# Note: Configure custom hooks directory with `git config core.hooksPath hooks/`
4+
# Note: Make all hooks executable with `chmod -R +x hooks`
5+
# Note: Bypass with git push `--no-verify`
6+
7+
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$')
8+
do
9+
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes
10+
if [ $? -ne 0 ]; then
11+
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint."
12+
exit 1 # exit with failure status
13+
fi
14+
done

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "@trbl/react-css-grid",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"main": "dist/build.bundle.js",
55
"repository": "[email protected]:trbldesign/react-css-grid.git",
6+
"description": "A fully-featured React grid system based on CSS Grid Layout.",
67
"author": "<[email protected]>",
78
"license": "MIT",
89
"keywords": [

0 commit comments

Comments
 (0)