auto eslint and add commands for eslint

This commit is contained in:
Devin Howard 2017-01-10 18:11:19 -05:00
parent da94cd0c8b
commit 71bed1a919
9 changed files with 28 additions and 26 deletions

View file

@ -291,18 +291,18 @@ const Create = {
}, },
source: synapseBloodhound source: synapseBloodhound
}, },
{ {
name: 'existing_synapses', name: 'existing_synapses',
limit: 50, limit: 50,
display: function(s) { return s.label }, display: function(s) { return s.label },
templates: { templates: {
suggestion: function(s) { suggestion: function(s) {
return Hogan.compile($('#synapseAutocompleteTemplate').html()).render(s) return Hogan.compile($('#synapseAutocompleteTemplate').html()).render(s)
},
header: '<h3>Existing synapses</h3>'
}, },
source: existingSynapseBloodhound header: '<h3>Existing synapses</h3>'
}] },
source: existingSynapseBloodhound
}]
) )
$('#synapse_desc').keyup(function(e) { $('#synapse_desc').keyup(function(e) {

View file

@ -14,7 +14,7 @@ module.exports = {
SEND_COORDS: 'SEND_COORDS', SEND_COORDS: 'SEND_COORDS',
DRAG_TOPIC: 'DRAG_TOPIC', DRAG_TOPIC: 'DRAG_TOPIC',
/* EVENTS RECEIVABLE FROM NODE SERVER*/ /* EVENTS RECEIVABLE FROM NODE SERVER */
JUNTO_UPDATED: 'JUNTO_UPDATED', JUNTO_UPDATED: 'JUNTO_UPDATED',
INVITED_TO_CALL: 'INVITED_TO_CALL', INVITED_TO_CALL: 'INVITED_TO_CALL',
INVITED_TO_JOIN: 'INVITED_TO_JOIN', INVITED_TO_JOIN: 'INVITED_TO_JOIN',
@ -29,5 +29,5 @@ module.exports = {
NEW_MAPPER: 'NEW_MAPPER', NEW_MAPPER: 'NEW_MAPPER',
LOST_MAPPER: 'LOST_MAPPER', LOST_MAPPER: 'LOST_MAPPER',
TOPIC_DRAGGED: 'TOPIC_DRAGGED', TOPIC_DRAGGED: 'TOPIC_DRAGGED',
PEER_COORDS_UPDATED: 'PEER_COORDS_UPDATED', PEER_COORDS_UPDATED: 'PEER_COORDS_UPDATED'
} }

View file

@ -9,7 +9,7 @@ import { JUNTO_UPDATED } from '../Realtime/events'
const Views = { const Views = {
init: (serverData) => { init: (serverData) => {
$(document).on(JUNTO_UPDATED, () => ExploreMaps.render()) $(document).on(JUNTO_UPDATED, () => ExploreMaps.render())
ChatView.init([serverData['sounds/MM_sounds.mp3'],serverData['sounds/MM_sounds.ogg']]) ChatView.init([serverData['sounds/MM_sounds.mp3'], serverData['sounds/MM_sounds.ogg']])
}, },
ExploreMaps, ExploreMaps,
ChatView, ChatView,

View file

@ -5,7 +5,9 @@
"scripts": { "scripts": {
"build": "webpack", "build": "webpack",
"build:watch": "webpack --watch", "build:watch": "webpack --watch",
"test": "mocha --compilers js:babel-core/register frontend/test" "test": "mocha --compilers js:babel-core/register frontend/test",
"eslint": "eslint frontend",
"eslint:fix": "eslint --fix frontend"
}, },
"repository": { "repository": {
"type": "git", "type": "git",