Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
santam85 committed Nov 17, 2020
1 parent b93cabe commit 7b9e760
Show file tree
Hide file tree
Showing 40 changed files with 537 additions and 501 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ extends: chartjs

parserOptions:
sourceType: module
ecmaVersion: 2016
ecmaVersion: 2015

env:
browser: true
node: true
es6: true
2 changes: 1 addition & 1 deletion docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ For example:

```javascript
// Change default options for ALL charts
Chart.helpers.merge(Chart.defaults.plugins.datalabels, {
Chart.defaults.set('plugins.datalabels', {
color: '#FE777B'
});

Expand Down
8 changes: 4 additions & 4 deletions docs/guide/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ The following table lists all available options:
| `borderWidth` | `number` | Yes | Yes | `0`
| [`clamp`](positioning.md#clamping) | `boolean` | Yes | Yes | `false`
| [`clip`](positioning.md#clipping) | `boolean` | Yes | Yes | `false`
| `color` | [`Style`](#style-options) | Yes | Yes | [`fontColor`](http://www.chartjs.org/docs/latest/general/fonts.html)
| `color` | [`Style`](#style-options) | Yes | Yes | [`font.color`](http://www.chartjs.org/docs/latest/general/fonts.html)
| [`display`](positioning.md#visibility) | `boolean` \| `string` | Yes | Yes | `true`
| `font` | `object` | Yes | Yes | -
| `font.family` | `string` | - | - | [`fontFamily`](http://www.chartjs.org/docs/latest/general/fonts.html)
| `font.size` | `string` | - | - | [`fontSize`](http://www.chartjs.org/docs/latest/general/fonts.html)
| `font.style` | `string` | - | - | [`fontStyle`](http://www.chartjs.org/docs/latest/general/fonts.html)
| `font.family` | `string` | - | - | [`font.family`](http://www.chartjs.org/docs/latest/general/fonts.html)
| `font.size` | `string` | - | - | [`font.size`](http://www.chartjs.org/docs/latest/general/fonts.html)
| `font.style` | `string` | - | - | [`font.style`](http://www.chartjs.org/docs/latest/general/fonts.html)
| `font.weight` | `string` | - | - | `'normal'`
| [`font.lineHeight`](formatting.md#multiline-labels) | `number` \| `string` | - | - | `1.2`
| [`formatter`](formatting.md#data-transformation) | `function` \| `null` | - | - | -
Expand Down
15 changes: 3 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* global Promise */

var gulp = require('gulp');
var gulpIf = require('gulp-if');
var eslint = require('gulp-eslint');
var file = require('gulp-file');
var replace = require('gulp-replace');
Expand All @@ -18,11 +19,6 @@ var argv = require('yargs')
.option('www-dir', {default: 'www'})
.argv;

function isFixed(f) {
// Has ESLint fixed the file contents?
return f.eslint !== null && f.eslint.fixed;
}

function run(bin, args) {
return new Promise((resolve, reject) => {
var exe = path.join('node_modules', '.bin', bin);
Expand Down Expand Up @@ -73,17 +69,12 @@ gulp.task('lint', function() {
'samples/**/*.html',
'src/**/*.js',
'test/**/*.js',
'types/**/*.d.ts',
'*.js'
];

return gulp.src(files)
.pipe(eslint({fix: argv.fix}))
.pipe(eslint())
.pipe(eslint.format())
.pipe(gulpIf(isFixed, gulp.dest(f => f.base)))
// To have the process exit with an error code (1) on
// lint error, return the stream and pipe to failAfterError
// last.
.pipe(eslint.failAfterError());
});

Expand Down
Loading

0 comments on commit 7b9e760

Please sign in to comment.