Skip to content

Commit 177bbfc

Browse files
committed
Update jshint integration.
Update jshint rules and ignore patterns, requires that jshint is installed globally.
1 parent 553bcad commit 177bbfc

File tree

7 files changed

+50
-29
lines changed

7 files changed

+50
-29
lines changed

Diff for: .jscsrc

+15-18
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,30 @@
44

55
"requireSemicolons": true,
66
"requireParenthesesAroundIIFE": true,
7-
"maximumLineLength": 120,
7+
"maximumLineLength": 80,
88
"validateLineBreaks": "LF",
99
"validateIndentation": 4,
1010
"disallowTrailingComma": true,
1111
"disallowUnusedParams": true,
12-
1312
"disallowSpacesInsideObjectBrackets": null,
1413
"disallowImplicitTypeConversion": ["string"],
15-
1614
"safeContextKeyword": "_this",
17-
1815
"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
16+
"checkAnnotations": "closurecompiler",
17+
"checkParamNames": true,
18+
"requireParamTypes": true,
19+
"checkRedundantParams": true,
20+
"checkReturnTypes": true,
21+
"checkRedundantReturns": true,
22+
"requireReturnTypes": true,
23+
"checkTypes": "capitalizedNativeCase",
24+
"checkRedundantAccess": true,
25+
"requireNewlineAfterDescription": true
2926
},
30-
3127
"excludeFiles": [
32-
"test/data/**",
33-
"patterns/*",
34-
"node_modules"
28+
"test/**",
29+
"node_modules",
30+
"coverage",
31+
"doc"
3532
]
3633
}

Diff for: .jshintignore

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
node_modules
2+
test
3+
coverage
4+
doc

Diff for: .jshintrc

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
2-
"node" : true,
3-
"bitwise" : true,
4-
"undef" : true,
5-
"eqeqeq" : true,
6-
"noarg" : true,
7-
"mocha" : true,
8-
"unused" : true,
9-
"asi" : true
2+
"laxcomma" : true,
3+
"laxbreak" : true,
4+
"node" : true,
5+
"curly" : true,
6+
"bitwise" : false,
7+
"undef" : true,
8+
"eqeqeq" : true,
9+
"noarg" : true,
10+
"mocha" : true,
11+
"unused" : true,
12+
"asi" : true
1013
}

Diff for: README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Table of Contents
6262
* [Test](#test-1)
6363
* [Spec](#spec)
6464
* [Cover](#cover)
65+
* [Lint](#lint)
6566
* [Browser](#browser)
6667
* [Clean](#clean)
6768
* [Docs](#docs)
@@ -792,7 +793,7 @@ Compare two arrays, return `false` if they are equal otherwise return an array t
792793

793794
## Developer
794795

795-
Clone the repository, run `npm i` and install [mdp](https://github.com/freeformsystems/mdp) globally.
796+
Clone the repository, run `npm i` and install [mdp](https://github.com/freeformsystems/mdp) and [jshint](http://jshint.com/) globally.
796797

797798
### Test
798799

@@ -818,6 +819,14 @@ Generate code coverage:
818819
npm run cover
819820
```
820821

822+
### Lint
823+
824+
Run the source tree through [jshint](http://jshint.com/):
825+
826+
```
827+
npm run lint
828+
```
829+
821830
### Browser
822831

823832
Create a standalone [browserify](http://browserify.org/) build:
@@ -868,4 +877,5 @@ Generated by [mdp(1)](https://github.com/freeformsystems/mdp).
868877
[npm]: http://www.npmjs.org
869878
[mdp]: https://github.com/freeformsystems/mdp
870879
[browserify]: http://browserify.org/
880+
[jshint]: http://jshint.com/
871881
[zephyr]: https://github.com/socialally/zephyr

Diff for: doc/readme/developer.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Developer
22

3-
Clone the repository, run `npm i` and install [mdp][] globally.
3+
Clone the repository, run `npm i` and install [mdp][] and [jshint][] globally.
44

55
### Test
66

@@ -26,6 +26,14 @@ Generate code coverage:
2626
npm run cover
2727
```
2828

29+
### Lint
30+
31+
Run the source tree through [jshint][]:
32+
33+
```
34+
npm run lint
35+
```
36+
2937
### Browser
3038

3139
Create a standalone [browserify][] build:

Diff for: doc/readme/links.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
[npm]: http://www.npmjs.org
33
[mdp]: https://github.com/freeformsystems/mdp
44
[browserify]: http://browserify.org/
5+
[jshint]: http://jshint.com/
56
[zephyr]: https://github.com/socialally/zephyr

Diff for: package.json

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"chai": "~3.2.0",
2626
"istanbul": "~0.3.17",
2727
"jscs": "~2.1.1",
28-
"jshint": "~2.8.0",
2928
"mocha": "~2.3.2",
3029
"moment": "~2.10.6"
3130
},

0 commit comments

Comments
 (0)