Browse Source

Improves linting

pull/1629/merge
Ændrew Rininsland 7 years ago committed by Yoshiya Hinosawa
parent
commit
81e29c3176
  1. 15
      .jshintrc
  2. 4
      Gruntfile.coffee
  3. 1
      src/api.region.js
  4. 4
      src/axis.js
  5. 2
      src/class-utils.js
  6. 6
      src/core.js
  7. 4
      src/index.js
  8. 1
      src/title.js

15
.jshintrc

@ -1,4 +1,5 @@
{
"esversion": 6,
"eqeqeq": true,
"curly": true,
"strict": false,
@ -8,7 +9,6 @@
"undef": true,
"unused": true,
"indent": 4,
"eqnull": true,
"expr": true,
"newcap": false,
@ -16,18 +16,9 @@
"bitwise": false,
"browser": true,
"jasmine": true,
"globals": {
"jasmine": false,
"describe": false,
"beforeEach": false,
"beforeAll": false,
"it": false,
"expect": false,
"d3": false,
"module": false,
"require": false,
"define": false
"d3": false
}
}

4
Gruntfile.coffee

@ -8,8 +8,8 @@ module.exports = (grunt) ->
files: ['src/scss/*.scss']
jshint:
c3: 'c3.js'
spec: 'spec/*.js'
c3: 'src/**/*.js'
spec: 'spec/**/*.js'
options:
reporter: require('jshint-stylish')
jshintrc: '.jshintrc'

1
src/api.region.js

@ -1,6 +1,5 @@
import CLASS from './class';
import { c3_chart_fn } from './core';
import { getOption } from './util';
c3_chart_fn.regions = function (regions) {
var $$ = this.internal, config = $$.config;

4
src/axis.js

@ -1,7 +1,7 @@
import CLASS from './class';
import { inherit, API } from './core'
import { inherit, API } from './core';
import { isValue, isFunction, isString, isEmpty } from './util';
import c3_axis from './c3.axis'
import c3_axis from './c3.axis';
export default function Axis(owner) {
API.call(this, owner);

2
src/class-utils.js

@ -1,4 +1,4 @@
import CLASS from './class'
import CLASS from './class';
import { c3_chart_internal_fn } from './core';
c3_chart_internal_fn.generateClass = function (prefix, targetId) {

6
src/core.js

@ -1,3 +1,4 @@
import * as d3 from 'd3';
import Axis from './axis';
import CLASS from './class';
import { isValue, isFunction, isString, isUndefined, isDefined, ceil10, asHalfPixel, diffDomain, isEmpty, notEmpty, getOption, hasValue, sanitise, getPathBox } from './util';
@ -8,8 +9,6 @@ export var c3_chart_fn;
export var c3_chart_internal_fn;
export var c3_chart_internal_axis_fn;
var d3 = window.d3 ? window.d3 : typeof require !== 'undefined' ? require("d3") : undefined;
export function API(owner) {
this.owner = owner;
}
@ -50,7 +49,7 @@ function Chart(config) {
function ChartInternal(api) {
var $$ = this;
$$.d3 = d3
$$.d3 = d3;
$$.api = api;
$$.config = $$.getDefaultConfig();
$$.data = {};
@ -1084,4 +1083,3 @@ c3_chart_internal_fn.hasValue = hasValue;
c3_chart_internal_fn.sanitise = sanitise;
c3_chart_internal_fn.getPathBox = getPathBox;
c3_chart_internal_fn.CLASS = CLASS;

4
src/index.js

@ -1,4 +1,4 @@
import { c3 } from './core'
import { c3 } from './core';
import './polyfill';
@ -55,4 +55,4 @@ import './ua';
import './util';
import './zoom';
export default c3
export default c3;

1
src/title.js

@ -1,4 +1,3 @@
import CLASS from './class';
import { c3_chart_internal_fn } from './core';
c3_chart_internal_fn.initTitle = function () {

Loading…
Cancel
Save