Skip to content

Commit 4f68f39

Browse files
committed
Refactor
1 parent 72c6994 commit 4f68f39

34 files changed

+83
-51
lines changed

.jscs.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,18 @@
4848
"requireSpaceBetweenArguments": true,
4949
"requireSpacesInForStatement": true,
5050
"validateIndentation": 2,
51-
"validateJSDoc": {
52-
"checkParamNames": true,
53-
"checkRedundantParams": true,
54-
"requireParamTypes": true
55-
},
5651
"validateQuoteMarks": {
5752
"mark": "'",
5853
"escape": true
54+
},
55+
"jsDoc": {
56+
"checkAnnotations": "closurecompiler",
57+
"checkParamNames": true,
58+
"checkRedundantParams": true,
59+
"checkRedundantReturns": true,
60+
"checkReturnTypes": true,
61+
"checkTypes": true,
62+
"requireParamTypes": true,
63+
"requireReturnTypes": true
5964
}
6065
}

.jshint-groups.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

.jshintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
2+
"eqeqeq": true,
3+
"esnext": true,
4+
"freeze": true,
25
"globals": {
36
"afterEach": false,
47
"beforeEach": false,
58
"describe": false,
69
"it": false
710
},
8-
"esnext": true,
911
"node": true,
12+
"strict": true,
1013
"undef": true,
1114
"unused": true,
1215
"-W084": true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
"devDependencies": {
4848
"babel": "^5.5.3",
49-
"jscs": "1.13.1",
49+
"jscs": "2.1.0",
5050
"jshint": "2.8.0",
5151
"mocha": "1.20.1"
5252
},

scripts/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ printf "\n\
1414
----------------\n\
1515
Running JSHint\n\
1616
----------------\n\n"
17-
test ./node_modules/.bin/jshint-groups
17+
test ./node_modules/.bin/jshint ./src
1818

1919
printf "\n\
2020
--------------\n\

src/cli.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
/**
24
* Command line implementation for CSSComb
35
*

src/csscomb.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
let Comb = require('csscomb-core');
24
let gonzales = require('./gonzales');
35
let fs = require('fs');

src/format.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
module.exports = function(string) {
24
return string.replace(/\n\s+/gm, ' ');
35
};

src/gonzales.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
// jscs:disable
1+
// jscs:disable maximumLineLength
2+
3+
'use strict';
4+
25
module.exports = require('../node_modules/csscomb-core/node_modules/gonzales-pe');

src/options/always-semicolon.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var gonzales = require('../gonzales');
24

35
let option = {
@@ -29,8 +31,9 @@ let option = {
2931

3032
/**
3133
* Checks ast for code style errors.
34+
*
3235
* @param {Node} ast
33-
* @return {Array} List of found errors.
36+
* @return {Array?} List of found errors.
3437
*/
3538
lint(ast) {
3639
var errors = [];
@@ -120,7 +123,7 @@ let option = {
120123
/**
121124
* Detects the value of this option in ast.
122125
* @param {Node} ast
123-
* @return {Array} List of detected values
126+
* @return {Array?} List of detected values
124127
*/
125128
detect(ast) {
126129
var detected = [];

0 commit comments

Comments
 (0)