Skip to content

Commit 7e8382c

Browse files
committed
Merge pull request #8 from nkbt/eslint
Improve code quality, fixes #7
2 parents 503edc0 + f852fb3 commit 7e8382c

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
coverage
3+
node_modules

.eslintrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "eslint-config-airbnb-lite",
3+
"env": {
4+
"es6": true,
5+
"mocha": true
6+
},
7+
"rules": {
8+
}
9+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ build/Release
2626
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
2727
node_modules
2828

29+
# added automatically by precommit-hook as defaults
30+
.jshint*
31+
2932
dist/

package.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,20 @@
1111
},
1212
"devDependencies": {
1313
"babel": "^5.8.20",
14+
"babel-eslint": "^4.0.5",
1415
"css-modules-loader-core": "0.0.12",
16+
"eslint": "^1.0.0",
17+
"eslint-config-airbnb": "0.0.7",
18+
"eslint-config-airbnb-lite": "^1.0.3",
19+
"eslint-watch": "^1.2.4",
1520
"in-publish": "^2.0.0",
16-
"mocha": "^2.2.5"
21+
"mocha": "^2.2.5",
22+
"precommit-hook": "^3.0.0"
1723
},
1824
"scripts": {
25+
"start": "esw -w .",
26+
"lint": "eslint .",
27+
"pretest": "npm run -s lint || true",
1928
"test": "npm run -s build && mocha --compilers js:babel/register",
2029
"build": "babel src --out-dir dist",
2130
"prepublish": "in-publish && npm run -s build || in-install"
@@ -37,5 +46,9 @@
3746
"bugs": {
3847
"url": "https://github.com/sullenor/css-modules-require-hook/issues"
3948
},
40-
"homepage": "https://github.com/sullenor/css-modules-require-hook"
49+
"homepage": "https://github.com/sullenor/css-modules-require-hook",
50+
"pre-commit": [
51+
"lint",
52+
"test"
53+
]
4154
}

0 commit comments

Comments
 (0)