Skip to content

Commit 1559487

Browse files
committed
add jscs
1 parent 3d5541e commit 1559487

File tree

5 files changed

+188
-2
lines changed

5 files changed

+188
-2
lines changed

.jscs.json

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
{
2+
"disallowDanglingUnderscores": {
3+
"allExcept": [
4+
"__dirname"
5+
]
6+
},
7+
"disallowEmptyBlocks": true,
8+
"disallowImplicitTypeConversion": [
9+
"numeric",
10+
"boolean",
11+
"binary",
12+
"string"
13+
],
14+
"disallowKeywordsInComments": [
15+
"TODO",
16+
"FIXME"
17+
],
18+
"disallowKeywordsOnNewLine": [
19+
"else"
20+
],
21+
"disallowKeywords": ["with"],
22+
"disallowMixedSpacesAndTabs": true,
23+
"disallowMultipleLineBreaks": true,
24+
"disallowMultipleLineStrings": true,
25+
"disallowMultipleSpaces": true,
26+
"disallowNewlineBeforeBlockStatements": true,
27+
"disallowPaddingNewlinesBeforeKeywords": [
28+
"else",
29+
"case",
30+
"catch"
31+
],
32+
"disallowPaddingNewlinesInBlocks": true,
33+
"disallowSpaceAfterLineComment": true,
34+
"disallowSpaceAfterObjectKeys": true,
35+
"disallowSpaceBeforeBinaryOperators": [
36+
","
37+
],
38+
"disallowSpaceBeforePostfixUnaryOperators": [
39+
"++",
40+
"--"
41+
],
42+
"disallowSpacesInCallExpression": true,
43+
"disallowSpacesInFunctionDeclaration": {
44+
"beforeOpeningRoundBrace": true
45+
},
46+
"disallowSpacesInNamedFunctionExpression": {
47+
"beforeOpeningRoundBrace": true
48+
},
49+
"disallowSpacesInsideObjectBrackets": "all",
50+
"disallowSpacesInsideParentheses": true,
51+
"disallowTrailingComma": true,
52+
"disallowTrailingWhitespace": true,
53+
"disallowYodaConditions": true,
54+
"maximumLineLength": 400,
55+
"requireBlocksOnNewline": true,
56+
"requireCamelCaseOrUpperCaseIdentifiers": true,
57+
"requireCapitalizedConstructors": true,
58+
"requireCommaBeforeLineBreak": true,
59+
"requireCurlyBraces": [
60+
"if",
61+
"else",
62+
"for",
63+
"while",
64+
"do",
65+
"try",
66+
"catch"
67+
],
68+
"requireDollarBeforejQueryAssignment": true,
69+
"requireDollarBeforejQueryAssignment": true,
70+
"requireKeywordsOnNewLine": [
71+
"switch",
72+
"do",
73+
"try",
74+
"for"
75+
],
76+
"requireLineBreakAfterVariableAssignment": true,
77+
"requireLineFeedAtFileEnd": true,
78+
"requireOperatorBeforeLineBreak": [
79+
"?",
80+
"=",
81+
"+",
82+
"-",
83+
"/",
84+
"*",
85+
"==",
86+
"===",
87+
"!=",
88+
"!==",
89+
">",
90+
">=",
91+
"<",
92+
"<="
93+
],
94+
"requirePaddingNewLinesInObjects": true,
95+
"requireParenthesesAroundIIFE": true,
96+
"requireSemicolons": true,
97+
"requireSpaceAfterBinaryOperators": [
98+
"=",
99+
",",
100+
"+",
101+
"-",
102+
"/",
103+
"*",
104+
"==",
105+
"===",
106+
"!=",
107+
"!=="
108+
],
109+
"requireSpaceAfterKeywords": [
110+
"do",
111+
"for",
112+
"if",
113+
"else",
114+
"switch",
115+
"case",
116+
"try",
117+
"catch",
118+
"void",
119+
"while",
120+
"with",
121+
"return",
122+
"typeof",
123+
"function"
124+
],
125+
"requireSpaceBeforeBinaryOperators": [
126+
"=",
127+
"+",
128+
"-",
129+
"/",
130+
"*",
131+
"==",
132+
"===",
133+
"!=",
134+
"!=="
135+
],
136+
"requireSpaceBeforeBlockStatements": true,
137+
"requireSpaceBeforeKeywords": [],
138+
"requireSpaceBeforeObjectValues": true,
139+
"requireSpaceBetweenArguments": true,
140+
"requireSpacesInAnonymousFunctionExpression": {
141+
"beforeOpeningRoundBrace": true,
142+
"beforeOpeningCurlyBrace": true
143+
},
144+
"requireSpacesInConditionalExpression": {
145+
"afterTest": true,
146+
"beforeConsequent": true,
147+
"afterConsequent": true,
148+
"beforeAlternate": true
149+
},
150+
"requireSpacesInForStatement": true,
151+
"requireSpacesInFunctionDeclaration": {
152+
"beforeOpeningCurlyBrace": true
153+
},
154+
"requireSpacesInFunctionExpression": {
155+
"beforeOpeningCurlyBrace": true
156+
},
157+
"requireSpacesInFunction": {
158+
"beforeOpeningCurlyBrace": true
159+
},
160+
"requireSpacesInNamedFunctionExpression": {
161+
"beforeOpeningCurlyBrace": true
162+
},
163+
"safeContextKeyword": [
164+
"self"
165+
],
166+
"validateIndentation": 4,
167+
"validateLineBreaks": "LF",
168+
"validateParameterSeparator": ", ",
169+
"validateQuoteMarks": "'"
170+
}

Gruntfile.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@ module.exports = function (grunt) {
7474
}
7575
},
7676

77+
jscs: {
78+
full: {
79+
options: {
80+
config: '.jscs.json'
81+
},
82+
files: {
83+
src: [
84+
'angular-web-notification.js'
85+
]
86+
}
87+
}
88+
},
89+
7790
todos: {
7891
options: {
7992
priorities: {
@@ -123,6 +136,7 @@ module.exports = function (grunt) {
123136
'jshint:full',
124137
'jslint:full',
125138
'eslint:full',
139+
'jscs:full',
126140
'todos:full',
127141
'jsdoc2md:api',
128142
'coverage'
@@ -138,6 +152,7 @@ module.exports = function (grunt) {
138152
'jshint:full',
139153
'jslint:full',
140154
'eslint:full',
155+
'jscs:full',
141156
'todos:full',
142157
'coverage',
143158
'coveralls:full'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ See full docs at: [API Docs](docs/api.md)
7575

7676
| Date | Version | Description |
7777
| ----------- | ------- | ----------- |
78-
| 2015-03-13 | v0.0.14 | Maintenance |
78+
| 2015-04-05 | v0.0.15 | Maintenance |
7979
| 2015-02-16 | v0.0.7 | Automatic unit tests via karma |
8080
| 2015-02-05 | v0.0.5 | Doc changes |
8181
| 2014-12-30 | v0.0.4 | Doc changes |

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-web-notification",
3-
"version": "0.0.14",
3+
"version": "0.0.15",
44
"authors": [
55
"Sagie Gur-Ari <[email protected]>"
66
],

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"grunt-contrib-jshint": "*",
2929
"grunt-coveralls": "*",
3030
"grunt-eslint": "*",
31+
"grunt-jscs": "*",
3132
"grunt-jsdoc-to-markdown": "*",
3233
"grunt-jslint": "*",
3334
"grunt-jsonlint": "*",

0 commit comments

Comments
 (0)