Skip to content

Commit 2f5e288

Browse files
committed
Merge pull request #43 from oredi/master
Developer: Adding jshint and jscs for code styling
2 parents 58a087c + 6e10551 commit 2f5e288

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

.jscsrc

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"preset": "google",
3+
"fileExtensions": [".js", "jscs"],
4+
5+
"requireSemicolons": true,
6+
"requireParenthesesAroundIIFE": true,
7+
"maximumLineLength": 120,
8+
"validateLineBreaks": "LF",
9+
"validateIndentation": 4,
10+
"disallowTrailingComma": true,
11+
"disallowUnusedParams": true,
12+
13+
"disallowSpacesInsideObjectBrackets": null,
14+
"disallowImplicitTypeConversion": ["string"],
15+
16+
"safeContextKeyword": "_this",
17+
18+
"jsDoc": {
19+
"checkAnnotations": "closurecompiler",
20+
"checkParamNames": true,
21+
"requireParamTypes": true,
22+
"checkRedundantParams": true,
23+
"checkReturnTypes": true,
24+
"checkRedundantReturns": true,
25+
"requireReturnTypes": true,
26+
"checkTypes": "capitalizedNativeCase",
27+
"checkRedundantAccess": true,
28+
"requireNewlineAfterDescription": true
29+
},
30+
31+
"excludeFiles": [
32+
"test/data/**",
33+
"patterns/*",
34+
"node_modules"
35+
]
36+
}

.jshintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.jshintrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"node" : true,
3+
"bitwise" : true,
4+
"undef" : true,
5+
"eqeqeq" : true,
6+
"noarg" : true,
7+
"mocha" : true,
8+
"unused" : true,
9+
"asi" : true
10+
}

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@
2424
"browserify": "~11.1.0",
2525
"chai": "~3.2.0",
2626
"istanbul": "~0.3.17",
27+
"jscs": "^2.1.1",
28+
"jshint": "^2.8.0",
2729
"mocha": "~2.3.2",
2830
"moment": "~2.10.6"
2931
},
3032
"scripts": {
33+
"lint": "jshint . && jscs .",
3134
"docs": "npm run example && npm run readme",
3235
"readme": "mdp --force -v",
3336
"example": "mdp --force -v -i doc/example.json -o EXAMPLE.md",

0 commit comments

Comments
 (0)