Skip to content

Commit 45dd3f8

Browse files
Code cleanup
1 parent f97c87b commit 45dd3f8

File tree

9 files changed

+50
-25
lines changed

9 files changed

+50
-25
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Strider Editor/IDE Settings
2+
# This file is used to promote consistent source code standards
3+
# amongst all Strider-CD contributors.
4+
# More information can be found here: http://editorconfig.org/
5+
6+
# General Settings
7+
root = true
8+
9+
# Settings for all files
10+
[*]
11+
indent_style = space
12+
indent_size = 2
13+
end_of_line = lf
14+
charset = utf-8
15+
trim_trailing_whitespace = true
16+
insert_final_newline = true
17+
18+
# Settings specific to Markdown files
19+
[*.md]
20+
trim_trailing_whitespace = false

.eslintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 5,
4+
"sourceType": "script"
5+
},
6+
"env": {
7+
"node": true
8+
},
9+
"extends": "eslint:recommended",
10+
"rules": {
11+
"indent": [2, 2],
12+
"brace-style": [2, "1tbs"],
13+
"quotes": [2, "single"],
14+
"no-console": 0,
15+
"no-use-before-define": [2, "nofunc"],
16+
"no-underscore-dangle": 0,
17+
"no-constant-condition": 0,
18+
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
19+
"func-style": [2, "declaration"]
20+
}
21+
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
.idea/
2+
node_modules/
3+
14
.DS_Store
2-
node_modules
35
*~
46
*#
57
.#*

.jshintrc

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

config/config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
app.controller('NodeController', ['$scope', function ($scope) {
32
$scope.nodeVersions = ['0.10', '0.12', 'lts', 'stable', 'latest', 'whatever', 'custom'];
43
$scope.ioVersions = ['stable', 'latest', 'whatever'];

lib/update-cache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function updateCache(context, projectDir, done) {
1818

1919
async.series([
2020
cachier.update.bind(null, hash, dest),
21-
cachier.update.bind(null, context.branch, dest),
21+
cachier.update.bind(null, context.branch, dest)
2222
], done);
2323
});
2424
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"description": "Run Nodejs tests in Strider",
55
"main": "worker.js",
66
"scripts": {
7-
"test": "jshint webapp.js worker.js lib/ && node test | tap-spec"
7+
"test": "eslint webapp.js worker.js lib/ && node test | tap-spec"
88
},
99
"repository": {
1010
"type": "git",
1111
"url": "https://github.com/Strider-CD/strider-node"
1212
},
13-
"keywords": [
13+
"keywords": [
1414
"strider",
1515
"node"
1616
],
@@ -22,7 +22,7 @@
2222
"fs-extra": "^0.8.1"
2323
},
2424
"devDependencies": {
25-
"jshint": "^2.3.0",
25+
"eslint": "^3.0.1",
2626
"tap-spec": "^2.1.0",
2727
"tape": "^3.0.3"
2828
},

webapp.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
module.exports = {
32
// an object that defines the schema for configuration
43
config: {
@@ -21,7 +20,7 @@ module.exports = {
2120
enum: ['strict', 'loose', 'none'],
2221
default: 'none'
2322
},
24-
test: { type: String, default: 'npm test' },
23+
test: {type: String, default: 'npm test'},
2524
globals: [{
2625
type: String
2726
}]

worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = {
3636
var global = config.globals && config.globals.length;
3737

3838
if (config.test && config.test !== '<none>') {
39-
context.data({ doTest: true }, 'extend');
39+
context.data({doTest: true}, 'extend');
4040
}
4141

4242
if (!npmInstall && !global) {

0 commit comments

Comments
 (0)