Skip to content

Commit 16fc531

Browse files
authored
Merge pull request #3 from chartjs/use-correct-travis-init
GUI is initialized in before_install
2 parents 829e8df + 37226d8 commit 16fc531

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

.eslintrc.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
extends: chartjs
22

33
parserOptions:
4-
ecmaVersion: 5
5-
sourceType: module
4+
ecmaVersion: 2018
5+
sourceType: 'module'
66

77
env:
88
browser: true
9+
es6: true
910
node: true
1011

1112
rules:

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ node_js:
33
- lts/*
44

55
before_script:
6-
- export DISPLAY=:99.0
7-
- sh -e /etc/init.d/xvfb start
6+
- "export DISPLAY=:99.0"
7+
8+
services:
9+
- xvfb
10+
11+
addons:
12+
firefox: latest
813

914
script:
1015
- gulp lint

test/.eslintrc.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
parserOptions:
2+
ecmaVersion: 6
3+
4+
env:
5+
es6: true # also changes default ecmaVersion to 6
6+
jasmine: true
7+
8+
globals:
9+
acquireChart: true
10+
Chart: true
11+
moment: true
12+
waitForResize: true
13+
14+
# https://eslint.org/docs/rules/
15+
rules:
16+
# Best Practices
17+
complexity: 0
18+
max-statements: 0

test/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ function acquireChart(config, options) {
1313
options.wrapper = options.wrapper || { class: 'chartjs-wrapper' };
1414

1515
for (key in options.canvas) {
16-
if (options.canvas.hasOwnProperty(key)) {
16+
if (Object.prototype.hasOwnProperty.call(options.canvas, key)) {
1717
canvas.setAttribute(key, options.canvas[key]);
1818
}
1919
}
2020

2121
for (key in options.wrapper) {
22-
if (options.wrapper.hasOwnProperty(key)) {
22+
if (Object.prototype.hasOwnProperty.call(options.wrapper, key)) {
2323
wrapper.setAttribute(key, options.wrapper[key]);
2424
}
2525
}

0 commit comments

Comments
 (0)