Skip to content

Commit 100adf2

Browse files
author
Alexej Yaroshevich
committed
Misc: add linters
1 parent 8a3abb0 commit 100adf2

File tree

4 files changed

+42
-1
lines changed

4 files changed

+42
-1
lines changed

.jscsrc

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

.jshintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
jscs-browser.js
3+
test/data/**

.jshintrc

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

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "ECMAScript reserved words checker",
55
"main": "lib/index.js",
66
"scripts": {
7-
"test": "mocha"
7+
"test": "jshint && jscs lib test && mocha"
88
},
99
"repository": {
1010
"type": "git",

0 commit comments

Comments
 (0)