Skip to content

Commit d6ab83b

Browse files
committed
Switch to yarn and run standard linter
1 parent 0c7fc46 commit d6ab83b

File tree

9 files changed

+11884
-27618
lines changed

9 files changed

+11884
-27618
lines changed

.eslintrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
extends: [
3+
'plugin:vue/recommended' // Use this if you are using Vue.js 2.x.
4+
],
5+
rules: {
6+
// override/add rules settings here, such as:
7+
'vue/require-default-prop': 'off'
8+
}
9+
}

dev/serve.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import Vue from 'vue';
2-
import Dev from './serve.vue';
1+
import Vue from 'vue'
2+
import Dev from './serve.vue'
33

4-
Vue.config.productionTip = false;
4+
Vue.config.productionTip = false
55

66
new Vue({
7-
render: (h) => h(Dev),
8-
}).$mount('#app');
7+
render: (h) => h(Dev)
8+
}).$mount('#app')

dev/serve.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default Vue.extend({
3939
<template>
4040
<div id="app">
4141
<b-card
42-
title="Event Timeline"
42+
title="Event Timeline"
4343
>
4444
<bootstrap-vue-timeline
4545
:items="timelineItems"

package-lock.json

Lines changed: 0 additions & 27591 deletions
This file was deleted.

package.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",
1717
"build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",
1818
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es",
19-
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"
19+
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife",
20+
"lint": "vue-cli-service lint --fix && standard --fix",
21+
"test": "jest"
2022
},
2123
"dependencies": {
2224
"bootstrap-vue": "^2.21.2",
@@ -25,18 +27,27 @@
2527
"devDependencies": {
2628
"@babel/core": "^7.12.10",
2729
"@babel/preset-env": "^7.12.11",
30+
"@babel/polyfill": "^7.11.5",
2831
"@rollup/plugin-alias": "^3.1.1",
2932
"@rollup/plugin-babel": "^5.2.2",
3033
"@rollup/plugin-commonjs": "^17.0.0",
3134
"@rollup/plugin-node-resolve": "^11.0.1",
3235
"@rollup/plugin-replace": "^2.3.4",
3336
"@vue/cli-plugin-babel": "^4.5.10",
3437
"@vue/cli-service": "^4.5.10",
38+
"@vue/cli-plugin-eslint": "~4.5.0",
3539
"cross-env": "^7.0.3",
40+
"eslint": "^6.7.2",
41+
"eslint-plugin-vue": "^6.2.2",
42+
"jest": "^26.6.3",
3643
"minimist": "^1.2.5",
3744
"rollup": "^2.36.1",
3845
"rollup-plugin-terser": "^7.0.2",
3946
"rollup-plugin-vue": "^5.1.9",
47+
"standard": "^16.0.3",
48+
"stylelint": "^13.12.0",
49+
"stylelint-config-recommended": "^4.0.0",
50+
"stylelint-webpack-plugin": "^2.1.1",
4051
"vue": "^2.6.12",
4152
"vue-template-compiler": "^2.6.12"
4253
},
@@ -45,5 +56,10 @@
4556
},
4657
"engines": {
4758
"node": ">=12"
59+
},
60+
"standard": {
61+
"ignore": [
62+
"*.config.js"
63+
]
4864
}
4965
}

src/bootstrap-vue-timeline.vue

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,32 @@ export default /*#__PURE__*/{
3535
v-for="(item, index) in items"
3636
:key="item.timestamp + item.title"
3737
:href="item.link"
38-
class="flex-column align-items-start">
39-
<div class="item-head">
40-
</div>
38+
class="flex-column align-items-start"
39+
>
40+
<div class="item-head" />
4141
<div
4242
v-if="index !== items.length - 1"
43-
class="item-tail">
44-
</div>
43+
class="item-tail"
44+
/>
4545

4646
<div class="item-content">
4747
<div class="d-flex w-100 justify-content-between">
48-
<h5 class="mb-1">{{ item.title }}</h5>
48+
<h5 class="mb-1">
49+
{{ item.title }}
50+
</h5>
4951
<small
5052
:id="timestampElementId(item)"
5153
> {{ formatAgo(item.timestamp) }}</small>
5254

53-
<b-tooltip :target="timestampElementId(item)"
54-
triggers="hover">
55+
<b-tooltip
56+
:target="timestampElementId(item)"
57+
triggers="hover"
58+
>
5559
{{ formatFull(item.timestamp) }}
5660
</b-tooltip>
5761
</div>
5862

59-
<small class="mb-1" >
63+
<small class="mb-1">
6064
{{ item.content }}
6165
</small>
6266

src/entry.esm.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11

22
// Import vue component
3-
import component from '@/bootstrap-vue-timeline.vue';
3+
import component from '@/bootstrap-vue-timeline.vue'
44

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

1212
// Attach install function executed by Vue.use()
1313
installable.install = (Vue) => {
14-
Vue.component('BootstrapVueTimeline', installable);
15-
};
16-
return installable;
17-
})();
14+
Vue.component('BootstrapVueTimeline', installable)
15+
}
16+
return installable
17+
})()
1818

1919
// It's possible to expose named exports when writing components that can
2020
// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo';

src/entry.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// iife/cjs usage extends esm default export - so import it all
2-
import component, * as namedExports from '@/entry.esm';
2+
import component, * as namedExports from '@/entry.esm'
33

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

11-
export default component;
11+
export default component

0 commit comments

Comments
 (0)