Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eslint with Google template #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
"extends": "google",
"parserOptions": {
"ecmaVersion": 6
}
};
31 changes: 17 additions & 14 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
// This is a manifest file that'll be compiled into application.js,
// which will include all the files listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts,
// vendor/assets/javascripts, or any plugin's vendor/assets/javascripts
// directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
// It's not advisable to add code directly here, but if you do, it'll appear
// at the bottom of the compiled file. JavaScript code in this file should be
// added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// Read Sprockets README
// (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require tether
//= require bootstrap-sprockets
//= require jquery_ujs
//= require lib/date_picker
//= require turbolinks
//= require_tree .
// = require jquery
// = require tether
// = require bootstrap-sprockets
// = require jquery_ujs
// = require lib/date_picker
// = require turbolinks
// = require_tree .
10 changes: 5 additions & 5 deletions app/assets/javascripts/bets.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$(document).on('turbolinks:load', function() {
$(".table-selectable tr").on('click', function(event){
$("tr").removeClass("table-success");
if (event.target.type !== "radio"){
$(":radio", this).trigger('click')
$('.table-selectable tr').on('click', function(event) {
$('tr').removeClass('table-success');
if (event.target.type !== 'radio') {
$(':radio', this).trigger('click');
}
$(this).addClass("table-success");
$(this).addClass('table-success');
});
});
11 changes: 5 additions & 6 deletions app/assets/javascripts/cable.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// Action Cable provides the framework to deal with WebSockets in Rails.
// You can generate new channels where WebSocket features live using the rails generate channel command.
// You can generate new channels where WebSocket features live using the rails
// generate channel command.
//
//= require action_cable
//= require_self
//= require_tree ./channels
// = require action_cable
// = require_self
// = require_tree ./channels

(function() {
this.App || (this.App = {});

App.cable = ActionCable.createConsumer();

}).call(this);
8 changes: 4 additions & 4 deletions app/assets/javascripts/lib/date_picker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$(document).on("turbolinks:load", function(){
$(".jquery-datepicker").datetimepicker({
minDate: "0",
format: "Y-m-d G:i:s P"
$(document).on('turbolinks:load', function() {
$('.jquery-datepicker').datetimepicker( {
minDate: '0',
format: 'Y-m-d G:i:s P',
});
});
27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "bet_tracker",
"version": "1.0.0",
"description": "This README would normally document whatever steps are necessary to get the application up and running.",
"main": "index.js",
"dependencies": {
"eslint": "^3.19.0",
"eslint-config-google": "^0.7.1"
},
"devDependencies": {
"eslint": "^3.19.0",
"eslint-config-google": "^0.7.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/StemboltHQ/bet_tracker.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/StemboltHQ/bet_tracker/issues"
},
"homepage": "https://github.com/StemboltHQ/bet_tracker#readme"
}