From 7f673f450dfba01633213efe3e7b362fed3771cb Mon Sep 17 00:00:00 2001 From: Kevin van Zonneveld Date: Tue, 19 Jan 2016 23:51:10 +0100 Subject: [PATCH] Fix & check linting in our examples too --- package.json | 4 ++-- website/src/examples/dragdrop/app.es6 | 10 +++++----- website/src/examples/dropbox/app.es6 | 10 +++++----- website/src/examples/i18n/app.es6 | 12 ++++++------ website/src/examples/multipart/app.es6 | 10 +++++----- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 11acb0fef..923e1835f 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "build": "npm run build:lib && npm run build:umd && npm run build:umd:min && npm run build:css", "clean": "rm -rf lib && rm -rf dist", "docs": "cd website && node build-documentation.js", - "lint": "eslint src/**/*.js", - "fix": "eslint src/**/*.js --fix", + "lint": "eslint src/**/*.js website/src/examples/*/*.es6", + "fix": "eslint src/**/*.js website/src/examples/*/*.es6 --fix", "server": "browser-sync start --config .browsersync.js", "start": "npm run build && npm run web", "test:phantom": "zuul test/spec/upload.js --phantom", diff --git a/website/src/examples/dragdrop/app.es6 b/website/src/examples/dragdrop/app.es6 index 42a3c92cd..b65097d7f 100644 --- a/website/src/examples/dragdrop/app.es6 +++ b/website/src/examples/dragdrop/app.es6 @@ -1,10 +1,10 @@ -import Uppy from 'uppy/core'; -import { DragDrop, Tus10 } from 'uppy/plugins'; +import Uppy from 'uppy/core' +import { DragDrop, Tus10 } from 'uppy/plugins' -const uppy = new Uppy({wait: false}); +const uppy = new Uppy({wait: false}) const files = uppy .use(DragDrop, {selector: '#upload-target'}) .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'}) - .run(); + .run() -console.log('Uppy ' + uppy.type + ' loaded'); +console.log('Uppy ' + uppy.type + ' loaded') diff --git a/website/src/examples/dropbox/app.es6 b/website/src/examples/dropbox/app.es6 index 0071565ad..3212c182d 100644 --- a/website/src/examples/dropbox/app.es6 +++ b/website/src/examples/dropbox/app.es6 @@ -1,9 +1,9 @@ -import Uppy from 'uppy/core'; -import { Dropbox } from 'uppy/plugins'; +import Uppy from 'uppy/core' +import { Dropbox } from 'uppy/plugins' -const uppy = new Uppy({wait: false}); +const uppy = new Uppy({wait: false}) const files = uppy .use(Dropbox, {selector: '#target'}) - .run(); + .run() -console.log(uppy.type); +console.log(uppy.type) diff --git a/website/src/examples/i18n/app.es6 b/website/src/examples/i18n/app.es6 index ca4432315..0f84943f9 100644 --- a/website/src/examples/i18n/app.es6 +++ b/website/src/examples/i18n/app.es6 @@ -1,11 +1,11 @@ -import Uppy from 'uppy/core'; -import { DragDrop, Tus10 } from 'uppy/plugins'; +import Uppy from 'uppy/core' +import { DragDrop, Tus10 } from 'uppy/plugins' -const ru = require('../../../../src/locale/ru.js'); +const ru = require('../../../../src/locale/ru.js') -const uppy = new Uppy({wait: false, locale: ru}); +const uppy = new Uppy({wait: false, locale: ru}) const files = uppy .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'}) - .run(); + .run() -console.log('--> Uppy Bundled version with Tus10 & Russian language pack has loaded'); +console.log('--> Uppy Bundled version with Tus10 & Russian language pack has loaded') diff --git a/website/src/examples/multipart/app.es6 b/website/src/examples/multipart/app.es6 index 3bee54381..e18b2348b 100644 --- a/website/src/examples/multipart/app.es6 +++ b/website/src/examples/multipart/app.es6 @@ -1,7 +1,7 @@ -import Uppy from 'uppy/core'; -import { Formtag, Multipart } from 'uppy/plugins'; +import Uppy from 'uppy/core' +import { Formtag, Multipart } from 'uppy/plugins' -const uppy = new Uppy({wait: false}); +const uppy = new Uppy({wait: false}) const files = uppy .use(Formtag, { selector: '#myform1 [type="file"],#myform2 [type="file"]', @@ -12,6 +12,6 @@ const files = uppy bundle : true, fieldName: 'files[]' }) - .run(); + .run() -console.log('Uppy ' + uppy.type + ' loaded'); +console.log('Uppy ' + uppy.type + ' loaded')