Skip to content

Commit

Permalink
Switch to yarn and run standard linter
Browse files Browse the repository at this point in the history
  • Loading branch information
junjizhi committed Jun 8, 2021
1 parent 0c7fc46 commit d6ab83b
Show file tree
Hide file tree
Showing 9 changed files with 11,884 additions and 27,618 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
extends: [
'plugin:vue/recommended' // Use this if you are using Vue.js 2.x.
],
rules: {
// override/add rules settings here, such as:
'vue/require-default-prop': 'off'
}
}
10 changes: 5 additions & 5 deletions dev/serve.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Vue from 'vue';
import Dev from './serve.vue';
import Vue from 'vue'
import Dev from './serve.vue'

Vue.config.productionTip = false;
Vue.config.productionTip = false

new Vue({
render: (h) => h(Dev),
}).$mount('#app');
render: (h) => h(Dev)
}).$mount('#app')
2 changes: 1 addition & 1 deletion dev/serve.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default Vue.extend({
<template>
<div id="app">
<b-card
title="Event Timeline"
title="Event Timeline"
>
<bootstrap-vue-timeline
:items="timelineItems"
Expand Down
27,591 changes: 0 additions & 27,591 deletions package-lock.json

This file was deleted.

18 changes: 17 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",
"build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es",
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife",
"lint": "vue-cli-service lint --fix && standard --fix",
"test": "jest"
},
"dependencies": {
"bootstrap-vue": "^2.21.2",
Expand All @@ -25,18 +27,27 @@
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/polyfill": "^7.11.5",
"@rollup/plugin-alias": "^3.1.1",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-replace": "^2.3.4",
"@vue/cli-plugin-babel": "^4.5.10",
"@vue/cli-service": "^4.5.10",
"@vue/cli-plugin-eslint": "~4.5.0",
"cross-env": "^7.0.3",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"jest": "^26.6.3",
"minimist": "^1.2.5",
"rollup": "^2.36.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^5.1.9",
"standard": "^16.0.3",
"stylelint": "^13.12.0",
"stylelint-config-recommended": "^4.0.0",
"stylelint-webpack-plugin": "^2.1.1",
"vue": "^2.6.12",
"vue-template-compiler": "^2.6.12"
},
Expand All @@ -45,5 +56,10 @@
},
"engines": {
"node": ">=12"
},
"standard": {
"ignore": [
"*.config.js"
]
}
}
22 changes: 13 additions & 9 deletions src/bootstrap-vue-timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,32 @@ export default /*#__PURE__*/{
v-for="(item, index) in items"
:key="item.timestamp + item.title"
:href="item.link"
class="flex-column align-items-start">
<div class="item-head">
</div>
class="flex-column align-items-start"
>
<div class="item-head" />
<div
v-if="index !== items.length - 1"
class="item-tail">
</div>
class="item-tail"
/>

<div class="item-content">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">{{ item.title }}</h5>
<h5 class="mb-1">
{{ item.title }}
</h5>
<small
:id="timestampElementId(item)"
> {{ formatAgo(item.timestamp) }}</small>

<b-tooltip :target="timestampElementId(item)"
triggers="hover">
<b-tooltip
:target="timestampElementId(item)"
triggers="hover"
>
{{ formatFull(item.timestamp) }}
</b-tooltip>
</div>

<small class="mb-1" >
<small class="mb-1">
{{ item.content }}
</small>

Expand Down
14 changes: 7 additions & 7 deletions src/entry.esm.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@

// Import vue component
import component from '@/bootstrap-vue-timeline.vue';
import component from '@/bootstrap-vue-timeline.vue'

// Default export is installable instance of component.
// IIFE injects install function into component, allowing component
// to be registered via Vue.use() as well as Vue.component(),
export default /*#__PURE__*/(() => {
export default /* #__PURE__ */(() => {
// Get component instance
const installable = component;
const installable = component

// Attach install function executed by Vue.use()
installable.install = (Vue) => {
Vue.component('BootstrapVueTimeline', installable);
};
return installable;
})();
Vue.component('BootstrapVueTimeline', installable)
}
return installable
})()

// It's possible to expose named exports when writing components that can
// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo';
Expand Down
8 changes: 4 additions & 4 deletions src/entry.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// iife/cjs usage extends esm default export - so import it all
import component, * as namedExports from '@/entry.esm';
import component, * as namedExports from '@/entry.esm'

// Attach named exports directly to component. IIFE/CJS will
// only expose one global var, with named exports exposed as properties of
// that global var (eg. plugin.namedExport)
Object.entries(namedExports).forEach(([exportName, exported]) => {
if (exportName !== 'default') component[exportName] = exported;
});
if (exportName !== 'default') component[exportName] = exported
})

export default component;
export default component
Loading

0 comments on commit d6ab83b

Please sign in to comment.