Skip to content

Commit

Permalink
ic:linting
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Dec 3, 2016
1 parent becbb87 commit d8612b6
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/cli/cms/editor/handlebars/sourceAttr.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function sourceAttr(obj, params) {

Array.prototype.forEach.call(params.value, (pValue) => {
if (isSelected(pValue, displayName, str)) {
selected = "selected"
selected = 'selected'
}
})

Expand Down
58 changes: 29 additions & 29 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ program
process.exit(0)
})
}).on('--help', function() {
console.log(' Examples:');
console.log();
console.log(' $ abe generate-posts --path /test --destination result --status publish');
console.log();
});
console.log(' Examples:')
console.log()
console.log(' $ abe generate-posts --path /test --destination result --status publish')
console.log()
})

program
.command('create [path]')
Expand All @@ -77,12 +77,12 @@ program
console.error('Error: no project path specified')
}
}).on('--help', function() {
console.log(' Examples:');
console.log();
console.log(' $ abe create');
console.log(' $ abe create [destination]');
console.log();
});
console.log(' Examples:')
console.log()
console.log(' $ abe create')
console.log(' $ abe create [destination]')
console.log()
})

program
.command('serve')
Expand Down Expand Up @@ -116,11 +116,11 @@ program
cp.stderr.pipe(process.stderr)
cp.stdout.pipe(process.stdout)
}).on('--help', function() {
console.log(' Examples:');
console.log();
console.log(' $ abe serve');
console.log();
});
console.log(' Examples:')
console.log()
console.log(' $ abe serve')
console.log()
})

program
.command('install [plugin]')
Expand All @@ -138,12 +138,12 @@ program
plugins.instance.install(dir)
}
}).on('--help', function() {
console.log(' Examples:');
console.log();
console.log(' $ abe install');
console.log(' $ abe install [plugin]');
console.log();
});
console.log(' Examples:')
console.log()
console.log(' $ abe install')
console.log(' $ abe install [plugin]')
console.log()
})

program
.command('uninstall <plugin>')
Expand All @@ -159,11 +159,11 @@ program
plugins.instance.uninstall(dir, plugin)
}
}).on('--help', function() {
console.log(' Examples:');
console.log();
console.log(' $ abe uninstall');
console.log(' $ abe uninstall [plugin]');
console.log();
});
console.log(' Examples:')
console.log()
console.log(' $ abe uninstall')
console.log(' $ abe uninstall [plugin]')
console.log()
})

program.parse(process.argv);
program.parse(process.argv)
2 changes: 1 addition & 1 deletion src/server/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Array.prototype.forEach.call(workflows, (workflow) => {
if (workflow != 'draft' && workflow != 'publish') {
router.post(`/abe/operations/reject/${workflow}*`, operations.postReject)
}else if (workflow == 'publish') {
router.get(`/abe/operations/unpublish*`, operations.getUnpublish)
router.get('/abe/operations/unpublish*', operations.getUnpublish)
}

router.post(`/abe/operations/submit/${workflow}*`, operations.postSubmit)
Expand Down
4 changes: 2 additions & 2 deletions src/server/middlewares/isAuthorized.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ var middleware = function(req, res, next) {
res.redirect('/abe/editor')
return
}else {
next()
return
next()
return
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/server/public/scripts/modules/EditorAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default class EditorAutocomplete {
if (displayName.toLowerCase().indexOf(val.toLowerCase()) > -1) {
var div = document.createElement('div')
div.addEventListener('mousedown', this._handleSelectValue)
div.setAttribute('data-value', (typeof o == "object") ? JSON.stringify(o) : o)
div.setAttribute('data-value', (typeof o == 'object') ? JSON.stringify(o) : o)
div.setAttribute('data-display', displayName)
if(first) {
div.classList.add('selected')
Expand Down
6 changes: 3 additions & 3 deletions src/server/routes/get-list-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var route = function(router, req, res, next) {
}

var workflowUrl = {}
var previous = ""
var next = ""
var previous = ''
var next = ''
Array.prototype.forEach.call(config.users.workflow, (flow) => {
var current = false
if (flow != 'publish') {
Expand All @@ -42,7 +42,7 @@ var route = function(router, req, res, next) {
}
})
}else {
next = "draft"
next = 'draft'
}
workflowUrl[flow] = [
{url: `/abe/operations/edit/${flow}`, action: 'edit', workflow: flow, previous: previous, next: next},
Expand Down

0 comments on commit d8612b6

Please sign in to comment.