Skip to content

Commit 1493a27

Browse files
committed
Initial commit and setup
1 parent 4857f1d commit 1493a27

File tree

5 files changed

+200
-0
lines changed

5 files changed

+200
-0
lines changed

.jscs.json

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"excludeFiles": ["**/images/**",
3+
"**/styles/**",
4+
"**/views/**",
5+
".git/**",
6+
".grunt/**",
7+
".tmp/**",
8+
"tmp/**",
9+
"dist/**",
10+
"docs/**",
11+
".sass-cache/**",
12+
"config/**",
13+
"script/**",
14+
"node_modules/**",
15+
"out/**"
16+
],
17+
18+
"fileExtensions": [".js"],
19+
20+
"requireCurlyBraces": ["if",
21+
"else",
22+
"for",
23+
"while",
24+
"do",
25+
"try",
26+
"catch"
27+
],
28+
29+
"requireSpaceAfterKeywords": ["if",
30+
"else",
31+
"for",
32+
"while",
33+
"do",
34+
"switch",
35+
"return",
36+
"try",
37+
"catch"
38+
],
39+
40+
"requireSpaceBeforeBlockStatements": true,
41+
42+
"requireParenthesesAroundIIFE": true,
43+
44+
"requireSpacesInConditionalExpression": true,
45+
46+
"requireBlocksOnNewline": true,
47+
48+
"disallowPaddingNewlinesInBlocks": true,
49+
50+
"disallowSpacesInsideArrayBrackets": true,
51+
52+
"requireSpacesInsideObjectBrackets": "all",
53+
54+
"requireSpacesInsideParentheses": "all",
55+
56+
"requireCommaBeforeLineBreak": true,
57+
58+
"disallowSpaceAfterPrefixUnaryOperators": ["++","--","+","-","~","!"],
59+
60+
"disallowSpaceBeforePostfixUnaryOperators": ["++","--"],
61+
62+
"requireSpaceBeforeBinaryOperators": ["=","+","-","/","*","==","===","!=","!==","%"],
63+
64+
"requireSpaceAfterBinaryOperators": ["=",":",",","+","-","/","*","==","===","!=","!==","%"],
65+
66+
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
67+
68+
"disallowKeywords": ["with","eval"],
69+
70+
"disallowMultipleLineStrings": true,
71+
72+
"disallowMultipleLineBreaks": true,
73+
74+
"validateQuoteMarks": { "mark": "'", "escape": true },
75+
76+
"disallowTrailingWhitespace": true,
77+
78+
"disallowTrailingComma": true,
79+
80+
"disallowKeywordsOnNewLine": ["else"],
81+
82+
"requireLineFeedAtFileEnd": true,
83+
84+
"maximumLineLength": 120,
85+
86+
"requireCapitalizedConstructors": true,
87+
88+
//"safeContextKeyword": ["vm"],
89+
90+
"requireDotNotation": true,
91+
92+
// "validateJSDoc": {
93+
// "checkParamNames": true,
94+
// "checkRedundantParams": true,
95+
// "requireParamTypes": true
96+
// },
97+
98+
"disallowNewlineBeforeBlockStatements": true,
99+
100+
"disallowSpaceAfterObjectKeys": true,
101+
102+
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
103+
104+
"disallowSpacesInFunctionExpression": { "beforeOpeningRoundBrace": true },
105+
106+
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
107+
108+
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
109+
110+
"disallowYodaConditions": true
111+
}

.jshintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Gruntfile.js
2+
/node_modules

.jshintrc

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
// Enforcing
3+
"bitwise": true,
4+
"boss": true,
5+
"curly": true,
6+
"eqeqeq": true,
7+
"eqnull": true,
8+
"expr": true,
9+
"forin": true,
10+
"immed": true,
11+
"maxcomplexity": 5,
12+
"newcap": true,
13+
"noarg": true,
14+
"noempty": true,
15+
"nonbsp": true,
16+
"nonew": true,
17+
"quotmark": "single",
18+
"strict": true,
19+
"sub": true,
20+
"trailing": true,
21+
"undef": true,
22+
"unused": true,
23+
24+
// Environment
25+
"node": true
26+
}

Gruntfile.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
'use strict';
2+
3+
module.exports = function( grunt ) {
4+
grunt.initConfig( {
5+
jscs: {
6+
default: {
7+
src: '**/*.js',
8+
options: {
9+
config: '.jscs.json'
10+
}
11+
}
12+
},
13+
jshint: {
14+
options: {
15+
jshintrc: true
16+
},
17+
all: ['./src/**.js']
18+
},
19+
githooks: {
20+
all: {
21+
'pre-push': 'jscs jshint'
22+
}
23+
}
24+
} );
25+
26+
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
27+
grunt.loadNpmTasks( 'grunt-jscs' );
28+
grunt.loadNpmTasks( 'grunt-githooks' );
29+
grunt.registerTask( 'default', ['jshint'] );
30+
};

package.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "protractorhelpers",
3+
"version": "0.1.0",
4+
"description": "a collection of functions for protractor",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/zerogravit1/protractorHelpers.git"
12+
},
13+
"keywords": [
14+
"protractor",
15+
"support",
16+
"helper"
17+
],
18+
"author": "Jonathan Schaffer",
19+
"license": "MIT",
20+
"bugs": {
21+
"url": "https://github.com/zerogravit1/protractorHelpers/issues"
22+
},
23+
"homepage": "https://github.com/zerogravit1/protractorHelpers#readme",
24+
"dependencies": {
25+
"grunt": "^1.0.1",
26+
"grunt-contrib-jshint": "^1.1.0",
27+
"grunt-githooks": "*",
28+
"grunt-jscs": "^3.0.1",
29+
"jscs": "^3.0.7"
30+
}
31+
}

0 commit comments

Comments
 (0)