Skip to content

Commit

Permalink
Improve joshing reporting. Added a JSHint config file.
Browse files Browse the repository at this point in the history
Fixed JSHint warnings.
  • Loading branch information
etimberg committed Feb 14, 2016
1 parent d9af94a commit f695181
Show file tree
Hide file tree
Showing 35 changed files with 238 additions and 232 deletions.
4 changes: 4 additions & 0 deletions config.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"node": true,
"predef": [ "require", "module" ]
}
152 changes: 76 additions & 76 deletions dist/Chart.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -4792,47 +4792,47 @@ window.Color = module.exports = Color
*/


var Chart = require('./core/core.js')()

require('./core/core.helpers')(Chart)
require('./core/core.element')(Chart)
require('./core/core.animation')(Chart)
require('./core/core.controller')(Chart)
require('./core/core.datasetController')(Chart)
require('./core/core.layoutService')(Chart)
require('./core/core.legend')(Chart)
require('./core/core.scale')(Chart)
require('./core/core.scaleService')(Chart)
require('./core/core.title')(Chart)
require('./core/core.tooltip')(Chart)

require('./controllers/controller.bar')(Chart)
require('./controllers/controller.bubble')(Chart)
require('./controllers/controller.doughnut')(Chart)
require('./controllers/controller.line')(Chart)
require('./controllers/controller.polarArea')(Chart)
require('./controllers/controller.radar')(Chart)

require('./scales/scale.category')(Chart)
require('./scales/scale.linear')(Chart)
require('./scales/scale.logarithmic')(Chart)
require('./scales/scale.radialLinear')(Chart)
require('./scales/scale.time')(Chart)

require('./elements/element.arc')(Chart)
require('./elements/element.line')(Chart)
require('./elements/element.point')(Chart)
require('./elements/element.rectangle')(Chart)

require('./charts/Chart.Bar')(Chart)
require('./charts/Chart.Bubble')(Chart)
require('./charts/Chart.Doughnut')(Chart)
require('./charts/Chart.Line')(Chart)
require('./charts/Chart.PolarArea')(Chart)
require('./charts/Chart.Radar')(Chart)
require('./charts/Chart.Scatter')(Chart)

window.Chart = module.exports = Chart
var Chart = require('./core/core.js')();

require('./core/core.helpers')(Chart);
require('./core/core.element')(Chart);
require('./core/core.animation')(Chart);
require('./core/core.controller')(Chart);
require('./core/core.datasetController')(Chart);
require('./core/core.layoutService')(Chart);
require('./core/core.legend')(Chart);
require('./core/core.scale')(Chart);
require('./core/core.scaleService')(Chart);
require('./core/core.title')(Chart);
require('./core/core.tooltip')(Chart);

require('./controllers/controller.bar')(Chart);
require('./controllers/controller.bubble')(Chart);
require('./controllers/controller.doughnut')(Chart);
require('./controllers/controller.line')(Chart);
require('./controllers/controller.polarArea')(Chart);
require('./controllers/controller.radar')(Chart);

require('./scales/scale.category')(Chart);
require('./scales/scale.linear')(Chart);
require('./scales/scale.logarithmic')(Chart);
require('./scales/scale.radialLinear')(Chart);
require('./scales/scale.time')(Chart);

require('./elements/element.arc')(Chart);
require('./elements/element.line')(Chart);
require('./elements/element.point')(Chart);
require('./elements/element.rectangle')(Chart);

require('./charts/Chart.Bar')(Chart);
require('./charts/Chart.Bubble')(Chart);
require('./charts/Chart.Doughnut')(Chart);
require('./charts/Chart.Line')(Chart);
require('./charts/Chart.PolarArea')(Chart);
require('./charts/Chart.Radar')(Chart);
require('./charts/Chart.Scatter')(Chart);

window.Chart = module.exports = Chart;

},{"./charts/Chart.Bar":8,"./charts/Chart.Bubble":9,"./charts/Chart.Doughnut":10,"./charts/Chart.Line":11,"./charts/Chart.PolarArea":12,"./charts/Chart.Radar":13,"./charts/Chart.Scatter":14,"./controllers/controller.bar":15,"./controllers/controller.bubble":16,"./controllers/controller.doughnut":17,"./controllers/controller.line":18,"./controllers/controller.polarArea":19,"./controllers/controller.radar":20,"./core/core.animation":21,"./core/core.controller":22,"./core/core.datasetController":23,"./core/core.element":24,"./core/core.helpers":25,"./core/core.js":26,"./core/core.layoutService":27,"./core/core.legend":28,"./core/core.scale":29,"./core/core.scaleService":30,"./core/core.title":31,"./core/core.tooltip":32,"./elements/element.arc":33,"./elements/element.line":34,"./elements/element.point":35,"./elements/element.rectangle":36,"./scales/scale.category":37,"./scales/scale.linear":38,"./scales/scale.logarithmic":39,"./scales/scale.radialLinear":40,"./scales/scale.time":41}],8:[function(require,module,exports){
"use strict";
Expand Down Expand Up @@ -4903,7 +4903,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

var defaultConfig = {
aspectRatio: 1,
Expand Down Expand Up @@ -4972,7 +4972,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.bar = {
hover: {
Expand Down Expand Up @@ -5279,7 +5279,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.bubble = {
hover: {
Expand Down Expand Up @@ -5449,7 +5449,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.doughnut = {
animation: {
Expand Down Expand Up @@ -5701,7 +5701,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.line = {
showLines: true,
Expand Down Expand Up @@ -5993,7 +5993,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.polarArea = {

Expand Down Expand Up @@ -6223,7 +6223,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;


Chart.defaults.radar = {
Expand Down Expand Up @@ -6431,7 +6431,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.global.animation = {
duration: 1000,
Expand Down Expand Up @@ -6550,7 +6550,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;
//Create a dictionary of chart types, to allow for extension of existing types
Chart.types = {};

Expand Down Expand Up @@ -7112,7 +7112,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

// Base class for all dataset controllers (line, bar, etc)
Chart.DatasetController = function(chart, datasetIndex) {
Expand Down Expand Up @@ -7187,7 +7187,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.elements = {};

Expand Down Expand Up @@ -7282,7 +7282,7 @@ module.exports = function(Chart) {
/*global document: false */
"use strict";

var color = require('chartjs-color')
var color = require('chartjs-color');

module.exports = function(Chart) {

Expand Down Expand Up @@ -8173,7 +8173,7 @@ module.exports = function(Chart) {
}
};

}
};

},{"chartjs-color":5}],26:[function(require,module,exports){
"use strict";
Expand Down Expand Up @@ -8275,9 +8275,9 @@ module.exports = function() {
return text.join("");
}
},
}
};

return Chart
return Chart;

};

Expand All @@ -8286,7 +8286,7 @@ module.exports = function() {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

// The layout service is very self explanatory. It's responsible for the layout within a chart.
// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need
Expand Down Expand Up @@ -8611,7 +8611,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.global.legend = {

Expand Down Expand Up @@ -8937,7 +8937,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.scale = {
display: true,
Expand Down Expand Up @@ -9612,7 +9612,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.scaleService = {
// Scale registration object. Extensions can register new scale types (such as log or DB scales) and then
Expand Down Expand Up @@ -9648,7 +9648,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.global.title = {
display: false,
Expand Down Expand Up @@ -9843,7 +9843,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.global.tooltips = {
enabled: true,
Expand Down Expand Up @@ -10457,7 +10457,7 @@ module.exports = function(Chart) {

module.exports = function(Chart, moment) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.global.elements.arc = {
backgroundColor: Chart.defaults.global.defaultColor,
Expand Down Expand Up @@ -10540,7 +10540,7 @@ module.exports = function(Chart, moment) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.global.elements.line = {
tension: 0.4,
Expand Down Expand Up @@ -10703,7 +10703,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.global.elements.point = {
radius: 3,
Expand Down Expand Up @@ -10765,8 +10765,8 @@ module.exports = function(Chart) {

var radius = vm.radius || Chart.defaults.global.elements.point.radius;

var xOffset
var yOffset
var xOffset;
var yOffset;

switch (vm.pointStyle) {
// Default includes circle
Expand Down Expand Up @@ -10854,7 +10854,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

Chart.defaults.global.elements.rectangle = {
backgroundColor: Chart.defaults.global.defaultColor,
Expand Down Expand Up @@ -10942,7 +10942,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;
// Default config for a category scale
var defaultConfig = {
position: "bottom",
Expand Down Expand Up @@ -10992,7 +10992,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

var defaultConfig = {
position: "left",
Expand Down Expand Up @@ -11076,7 +11076,7 @@ module.exports = function(Chart) {
helpers.each(valuesPerType, function(valuesForType) {
var values = valuesForType.positiveValues.concat(valuesForType.negativeValues);
var minVal = helpers.min(values);
var maxVal = helpers.max(values)
var maxVal = helpers.max(values);
this.min = this.min === null ? minVal : Math.min(this.min, minVal);
this.max = this.max === null ? maxVal : Math.max(this.max, maxVal);
}, this);
Expand Down Expand Up @@ -11250,7 +11250,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

var defaultConfig = {
position: "left",
Expand Down Expand Up @@ -11444,7 +11444,7 @@ module.exports = function(Chart) {

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

var defaultConfig = {
display: true,
Expand Down Expand Up @@ -11876,12 +11876,12 @@ module.exports = function(Chart) {
/*global window: false */
"use strict";

var moment = require('moment')
moment = typeof(moment) === 'function' ? moment : window.moment
var moment = require('moment');
moment = typeof(moment) === 'function' ? moment : window.moment;

module.exports = function(Chart) {

var helpers = Chart.helpers
var helpers = Chart.helpers;

if (!moment) {
console.warn('Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at http://momentjs.com/');
Expand Down
Loading

0 comments on commit f695181

Please sign in to comment.