Micha Oberstein commited to a23e7b3 May 23

Refactor some issues found from codacy

Current Status:

Analysed View logs
View on GitHub
Up to standards.

A positive commit.

  • +2 Issues
  • = Duplication
  • = Complexity
  • - Coverage
resources/assets/js/category.js
Identifier 'my_url' is not in camel case. (camelcase)
my_url += "/" + catId;
Unexpected console statement. (no-console)
console.log("Error: " + data.status + " on " + type + ": " + data.responseText);
More


resources/assets/js/app.js
'Vue' is not defined. (no-undef)
Vue.component("example", require("./components/Example.vue"));
resources/assets/js/bootstrap.js
'Laravel' is not defined. (no-undef)
request.headers.set("X-CSRF-TOKEN", Laravel.csrfToken);
resources/assets/js/category.js
'Bloodhound' is not defined. (no-undef)
var parentCategories = new Bloodhound({
Strings must use doublequote. (quotes)
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content")
Unexpected console statement. (no-console)
console.log("Error: ", data);
'initButtonHook' was used before it was defined. (no-use-before-define)
initButtonHook(catId);
Identifier 'parent_category' is not in camel case. (camelcase)
parent_category: $("#parent_category").val()
Identifier 'my_url' is not in camel case. (camelcase)
var my_url = url;
Expected '===' and instead saw '=='. (eqeqeq)
if (state == "update"){
Unexpected console statement. (no-console)
console.log(formData);
Expected property shorthand. (object-shorthand)
type: type,
Identifier 'my_url' is not in camel case. (camelcase)
url: my_url,
Expected method shorthand. (object-shorthand)
422: function(data) {
More
app/Http/Controllers/ChartsController.php
Avoid unused local variables such as '$jsonString'.
$jsonString = '{
gulpfile.js
Strings must use doublequote. (quotes)
const elixir = require('laravel-elixir');
Strings must use doublequote. (quotes)
require('laravel-elixir-vue-2');
Strings must use doublequote. (quotes)
mix.copy('resources/assets/js/typeahead.bundle.js', 'public/js/typeahead.bundle.js');
Strings must use doublequote. (quotes)
mix.copy('resources/assets/css/typeahead.css', 'public/css/typeahead.css');
Strings must use doublequote. (quotes)
mix.copy('resources/assets/js/category.js', 'public/js/category.js');
Strings must use doublequote. (quotes)
mix.copy('node_modules/raphael/raphael.js', 'public/js/raphael.js');
Strings must use doublequote. (quotes)
mix.copy('node_modules/font-awesome/fonts', 'public/fonts');
Strings must use doublequote. (quotes)
mix.copy('node_modules/bootstrap-sass/assets/fonts', 'public/fonts');
Strings must use doublequote. (quotes)
mix.sass('app.scss');
Strings must use doublequote. (quotes)
'./node_modules/sb-admin-2/dist/css/sb-admin-2.css',
Strings must use doublequote. (quotes)
'./node_modules/metismenu/src/metisMenu.css',
Strings must use doublequote. (quotes)
'./node_modules/morris.js/morris.css',
Strings must use doublequote. (quotes)
'./node_modules/bootstrap-tagsinput/src/bootstrap-tagsinput.css'
Strings must use doublequote. (quotes)
'./node_modules/jquery/dist/jquery.js',
Strings must use doublequote. (quotes)
'app.js',
Strings must use doublequote. (quotes)
'./node_modules/metismenu/src/metisMenu.js',
Strings must use doublequote. (quotes)
'./node_modules/morris.js/morris.js',
Strings must use doublequote. (quotes)
'./node_modules/sb-admin-2/data/morris-data.js',
Strings must use doublequote. (quotes)
'./node_modules/sb-admin-2/js/sb-admin-2.js',
Strings must use doublequote. (quotes)
'./node_modules/bootstrap-tagsinput/src/bootstrap-tagsinput.js'
Strings must use doublequote. (quotes)
mix.copy('./node_modules/highcharts/highcharts.js','./public/js/charts.js');
resources/assets/js/app.js
Strings must use doublequote. (quotes)
require('./bootstrap');
Strings must use doublequote. (quotes)
Vue.component('example', require('./components/Example.vue'));
Strings must use doublequote. (quotes)
el: '#app'
resources/assets/js/bootstrap.js
Strings must use doublequote. (quotes)
window._ = require('lodash');
Strings must use doublequote. (quotes)
window.$ = window.jQuery = require('jquery');
Strings must use doublequote. (quotes)
require('bootstrap-sass');
Strings must use doublequote. (quotes)
window.Vue = require('vue');
Strings must use doublequote. (quotes)
require('vue-resource');
Strings must use doublequote. (quotes)
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
resources/assets/js/category.js
Identifier 'parent_categories' is not in camel case. (camelcase)
var parent_categories = new Bloodhound({
Strings must use doublequote. (quotes)
url: '/category?prefetch=parent_categories',
Strings must use doublequote. (quotes)
$('.alert').addClass(type);
Strings must use doublequote. (quotes)
$('#message').html(message);
Strings must use doublequote. (quotes)
$('.alert').fadeIn();
Strings must use doublequote. (quotes)
$('.alert').fadeOut();
Strings must use doublequote. (quotes)
$('.alert').removeClass(alertType);
Strings must use doublequote. (quotes)
$('.close').click(function(){
Strings must use doublequote. (quotes)
$('.delete-task').click(function(){
Identifier 'cat_id' is not in camel case. (camelcase)
var cat_id = $(this).val();
Strings must use doublequote. (quotes)
url: url + '/' + cat_id,
Identifier 'cat_id' is not in camel case. (camelcase)
url: url + '/' + cat_id,
Identifier 'cat_id' is not in camel case. (camelcase)
$("#category-" + cat_id).remove();
Strings must use doublequote. (quotes)
console.log('Error: ', data);
Strings must use doublequote. (quotes)
showAlert('alert-danger', data.responseJSON);
Strings must use doublequote. (quotes)
$('.open-modal').click(function(){
Strings must use doublequote. (quotes)
url: url + '/' + cat_id + '/edit',
Identifier 'cat_id' is not in camel case. (camelcase)
url: url + '/' + cat_id + '/edit',
Strings must use doublequote. (quotes)
$('#modalholder').html(data);
Strings must use doublequote. (quotes)
$('#myModal').modal('show');
Strings must use doublequote. (quotes)
$('#btn-add').click(function(){
Strings must use doublequote. (quotes)
url: url + '/create',
Strings must use doublequote. (quotes)
$('#btn-save').val("add");
Strings must use doublequote. (quotes)
$('#frmTasks').trigger("reset");
Strings must use doublequote. (quotes)
$('#myModal').modal('hide');
Identifier 'cat_id' is not in camel case. (camelcase)
function initButtonHook(cat_id)
Strings must use doublequote. (quotes)
$('#tags').tagsinput('refresh');
Strings must use doublequote. (quotes)
$('#prefetch .typeahead').typeahead({
Strings must use doublequote. (quotes)
name: 'parent_categories',
Identifier 'parent_categories' is not in camel case. (camelcase)
source: parent_categories
Strings must use doublequote. (quotes)
$('.modal').on('shown.bs.modal', function() {
Strings must use doublequote. (quotes)
var input = $(this).find('[autofocus]');
Strings must use doublequote. (quotes)
$('#name').keypress(function(e){
Strings must use doublequote. (quotes)
$('#parent_category').keypress(function(e){
Strings must use doublequote. (quotes)
name: $('#name').val(),
Strings must use doublequote. (quotes)
tags: $('#tags').tagsinput('items'),
More


resources/assets/js/app.js
'Vue' is not defined. (no-undef)
Vue.component('example', require('./components/Example.vue'));
resources/assets/js/bootstrap.js
'Laravel' is not defined. (no-undef)
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
resources/assets/js/category.js
'Bloodhound' is not defined. (no-undef)
var parent_categories = new Bloodhound({
Strings must use doublequote. (quotes)
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
Unexpected console statement. (no-console)
console.log('Error: ', data);
'initButtonHook' was used before it was defined. (no-use-before-define)
initButtonHook(cat_id);
Identifier 'parent_category' is not in camel case. (camelcase)
parent_category: $('#parent_category').val(),
More

Loading...

Loading...

Loading...

Loading...