diff --git a/babel.config.js b/babel.config.js index ba179669..91be2448 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,5 @@ module.exports = { presets: [ - '@vue/app' - ] -} + '@vue/app', + ], +}; diff --git a/package-lock.json b/package-lock.json index 2956f9df..b29d4215 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3521,6 +3521,12 @@ "typedarray": "^0.0.6" } }, + "confusing-browser-globals": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.8.tgz", + "integrity": "sha512-lI7asCibVJ6Qd3FGU7mu4sfG4try4LX3+GVS+Gv8UlrEf2AeW57piecapnog2UHZSbcX/P/1UDWVaTsblowlZg==", + "dev": true + }, "connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -4700,6 +4706,28 @@ } } }, + "eslint-config-airbnb": { + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.0.1.tgz", + "integrity": "sha512-hLb/ccvW4grVhvd6CT83bECacc+s4Z3/AEyWQdIT2KeTsG9dR7nx1gs7Iw4tDmGKozCNHFn4yZmRm3Tgy+XxyQ==", + "dev": true, + "requires": { + "eslint-config-airbnb-base": "^14.0.0", + "object.assign": "^4.1.0", + "object.entries": "^1.1.0" + } + }, + "eslint-config-airbnb-base": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.0.0.tgz", + "integrity": "sha512-2IDHobw97upExLmsebhtfoD3NAKhV4H0CJWP3Uprd/uk+cHuWYOczPVxQ8PxLFUAw7o3Th1RAU8u1DoUpr+cMA==", + "dev": true, + "requires": { + "confusing-browser-globals": "^1.0.7", + "object.assign": "^4.1.0", + "object.entries": "^1.1.0" + } + }, "eslint-config-standard": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", @@ -8231,6 +8259,18 @@ "object-keys": "^1.0.11" } }, + "object.entries": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", + "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, "object.getownpropertydescriptors": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", diff --git a/package.json b/package.json index e9a88ec9..165af5f0 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@vue/eslint-config-standard": "^4.0.0", "babel-eslint": "^10.0.1", "eslint": "^5.16.0", + "eslint-config-airbnb": "^18.0.1", "eslint-plugin-vue": "^5.0.0", "sass": "^1.18.0", "sass-loader": "^7.1.0", @@ -37,9 +38,12 @@ }, "extends": [ "plugin:vue/essential", - "@vue/standard" + "@vue/standard", + "airbnb-base" ], - "rules": {}, + "rules": { + "import/no-unresolved": "off" + }, "parserOptions": { "parser": "babel-eslint" } diff --git a/server.js b/server.js index 352d07dc..a4e51510 100644 --- a/server.js +++ b/server.js @@ -1,14 +1,13 @@ -var connect = require('connect') -var serveStatic = require('serve-static') - -const port = process.env.PORT || 3002 - -try { - connect() - .use(serveStatic(__dirname + '/dist')) - .listen(port, () => - console.log(`Boom, app is running on port ${port}`) - ) -} catch (error) { - console.log('Something fucked up', error) +const connect = require('connect'); +const serveStatic = require('serve-static'); + +const port = process.env.PORT || 3002; + +/* eslint no-console: 0 */ +try { + connect() + .use(serveStatic(`${__dirname}/dist`)) + .listen(port, () => console.log(`Boom, app is running on port ${port}`)); +} catch (error) { + console.log('Something fucked up', error); } diff --git a/src/App.vue b/src/App.vue index 3e4e0914..f07f76ea 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,14 +7,14 @@ + + + + + {{ title }} + + + + + + + + + + + + + diff --git a/src/components/FilterTile.vue b/src/components/FilterTile.vue index 2d10c1ca..35398d73 100644 --- a/src/components/FilterTile.vue +++ b/src/components/FilterTile.vue @@ -1,118 +1,119 @@ - - - - Search - - - - - - - - - - + + + + Search + + + + + + + + + + diff --git a/src/components/Footer.vue b/src/components/Footer.vue index aba2cdf1..c40ddee0 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -1,41 +1,41 @@ - - - - - - - - + + + + + + + + diff --git a/src/components/Header.vue b/src/components/Header.vue index c2067027..cc37abd3 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -1,33 +1,34 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue index 12730605..1b6ba1c2 100644 --- a/src/components/HelloWorld.vue +++ b/src/components/HelloWorld.vue @@ -9,9 +9,9 @@ export default { name: 'HelloWorld', props: { - msg: String - } -} + msg: String, + }, +}; diff --git a/src/components/Item.vue b/src/components/Item.vue index 2db8ead5..8e2470bd 100644 --- a/src/components/Item.vue +++ b/src/components/Item.vue @@ -1,136 +1,134 @@ - - - - - {{ title }} - ... - - - - - - - - - - + + + + + {{ title }} + ... + + + + + + + + + + diff --git a/src/components/ItemGroup.vue b/src/components/ItemGroup.vue index 7b39d44c..4ae444ad 100644 --- a/src/components/ItemGroup.vue +++ b/src/components/ItemGroup.vue @@ -1,55 +1,55 @@ - - - - No Items to Show Yet - - - - - - - - - - + + + + No Items to Show Yet + + + + + + + + + + diff --git a/src/components/Nav.vue b/src/components/Nav.vue index faf04c2a..44e0410d 100644 --- a/src/components/Nav.vue +++ b/src/components/Nav.vue @@ -1,41 +1,41 @@ - - - Home - About - - - - - - - + + + Home + About + + + + + + + diff --git a/src/components/PageTitle.vue b/src/components/PageTitle.vue index 42e6250d..9ecf6bcf 100644 --- a/src/components/PageTitle.vue +++ b/src/components/PageTitle.vue @@ -1,36 +1,36 @@ - - - Pannel - Awesome subtitle - - - - - - + + + Pannel + Awesome subtitle + + + + + + diff --git a/src/main.js b/src/main.js index 08204ceb..219d4eee 100644 --- a/src/main.js +++ b/src/main.js @@ -1,14 +1,14 @@ -import Vue from 'vue' -import Element from 'element-ui' -import 'element-ui/lib/theme-chalk/index.css'; -import App from './App.vue' -import router from './router' -import './registerServiceWorker' - -Vue.use(Element) -Vue.config.productionTip = false - -new Vue({ - router, - render: h => h(App) -}).$mount('#app') +import Vue from 'vue'; +import Element from 'element-ui'; +import 'element-ui/lib/theme-chalk/index.css'; +import App from './App.vue'; +import router from './router'; +import './registerServiceWorker'; + +Vue.use(Element); +Vue.config.productionTip = false; + +new Vue({ + router, + render: (h) => h(App), +}).$mount('#app'); diff --git a/src/registerServiceWorker.js b/src/registerServiceWorker.js index 76cede07..e32aa92b 100644 --- a/src/registerServiceWorker.js +++ b/src/registerServiceWorker.js @@ -1,32 +1,32 @@ /* eslint-disable no-console */ -import { register } from 'register-service-worker' +import { register } from 'register-service-worker'; if (process.env.NODE_ENV === 'production') { register(`${process.env.BASE_URL}service-worker.js`, { - ready () { + ready() { console.log( - 'App is being served from cache by a service worker.\n' + - 'For more details, visit https://goo.gl/AFskqB' - ) + 'App is being served from cache by a service worker.\n' + + 'For more details, visit https://goo.gl/AFskqB', + ); }, - registered () { - console.log('Service worker has been registered.') + registered() { + console.log('Service worker has been registered.'); }, - cached () { - console.log('Content has been cached for offline use.') + cached() { + console.log('Content has been cached for offline use.'); }, - updatefound () { - console.log('New content is downloading.') + updatefound() { + console.log('New content is downloading.'); }, - updated () { - console.log('New content is available; please refresh.') + updated() { + console.log('New content is available; please refresh.'); }, - offline () { - console.log('No internet connection found. App is running in offline mode.') + offline() { + console.log('No internet connection found. App is running in offline mode.'); }, - error (error) { - console.error('Error during service worker registration:', error) - } - }) + error(error) { + console.error('Error during service worker registration:', error); + }, + }); } diff --git a/src/router.js b/src/router.js index b4a893fe..e540d9a4 100644 --- a/src/router.js +++ b/src/router.js @@ -1,15 +1,15 @@ -import Vue from 'vue' -import Router from 'vue-router' -import Home from './views/Home.vue' +import Vue from 'vue'; +import Router from 'vue-router'; +import Home from './views/Home.vue'; -Vue.use(Router) +Vue.use(Router); export default new Router({ routes: [ { path: '/', name: 'home', - component: Home + component: Home, }, { path: '/about', @@ -17,7 +17,7 @@ export default new Router({ // route level code-splitting // this generates a separate chunk (about.[hash].js) for this route // which is lazy-loaded when the route is visited. - component: () => import(/* webpackChunkName: "about" */ './views/About.vue') - } - ] -}) + component: () => import(/* webpackChunkName: "about" */ './views/About.vue'), + }, + ], +}); diff --git a/src/views/Home.vue b/src/views/Home.vue index 38827cab..6987ffea 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -17,47 +17,45 @@