Skip to content

Commit 280dec8

Browse files
chore: minor tweaks and fixes (bootstrap-vue#4760)
* Remove redundant default values * Seperate events utils, add `eventOnOff()` util and fix `parseEventOptions()` capture option handling * Remove all unused vars * `opts` => `options` * Correct typo in table docs * Update tabs.js * Update bv-hover-swap.js * Update bv-hover-swap.js * Update bv-hover-swap.spec.js * Update jumbotron.js * `hte` => `the` * Update common-props.json * Update events.spec.js Co-authored-by: Troy Morehouse <troymore@nbnet.nb.ca>
1 parent 7a34f73 commit 280dec8

File tree

89 files changed

+389
-422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+389
-422
lines changed

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ module.exports = {
1414
Vue: true
1515
},
1616
rules: {
17+
'no-unused-vars': [
18+
'error',
19+
{
20+
vars: 'all',
21+
args: 'after-used',
22+
ignoreRestSiblings: false
23+
}
24+
],
1725
'spaced-comment': 'off', // needed to ignore `/*#__PURE__*/` comments
1826
'vue/html-self-closing': [
1927
'error',

docs/common-props.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"description": "Sets the 'placeholder' attribute value on the form control"
127127
},
128128
"readonly": {
129-
"description": "Sets the 'readonly' attribute on hte form control"
129+
"description": "Sets the 'readonly' attribute on the form control"
130130
},
131131
"plaintext": {
132132
"description": "Set the form control as readonly and renders the control to look like plain text (no borders)"

docs/markdown/reference/images/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ In your `nuxt.config.js` file, add the following to your build section:
9797
```js
9898
module.exports = {
9999
build: {
100-
extend(config, ctx) {
100+
extend(config) {
101101
const vueLoader = config.module.rules.find(rule => rule.loader === 'vue-loader')
102102
vueLoader.options.transformAssetUrls = {
103103
video: ['src', 'poster'],

docs/nuxt.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ renderer.blockquote = function(text) {
9999

100100
// Bootstrap v4 table support for markdown renderer
101101
const originalTable = renderer.table
102-
renderer.table = function(header, body) {
102+
renderer.table = function() {
103103
let table = originalTable.apply(this, arguments)
104104
table = table
105105
.replace('<table>', '<table class="b-table table table-bordered table-striped bv-docs-table">')

docs/pages/play.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,15 +597,15 @@ export default {
597597
// appData watcher
598598
this.contentUnWatch = this.$watch(
599599
'appData',
600-
(newVal, oldVal) => {
600+
() => {
601601
this.run()
602602
},
603603
{ deep: true }
604604
)
605605
// Javascript watcher
606606
this.jsUnWatch = this.$watch(
607607
() => this.js.trim(),
608-
(newVal, oldVal) => {
608+
() => {
609609
this.compileJs()
610610
},
611611
{ immediate: true }

docs/plugins/play.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const destroyVM = (name, vm) => {
8686
;[...document.querySelectorAll(`.vue-example-${name}`)].forEach(removeNode)
8787
}
8888

89-
const processExamples = (el, binding, vnode, oldVnode) => {
89+
const processExamples = (el, binding, vnode) => {
9090
if (vnode.context.$options.beforeDestroy) {
9191
vnode.context.$options.beforeDestroy = []
9292
.concat(vnode.context.$options.beforeDestroy)

docs/utils/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const makeTOC = (readme, meta = null) => {
113113
// Filter out un-matched values
114114
.filter(v => Array.isArray(v))
115115
// Create TOC structure
116-
.forEach(([value, tag, id, content]) => {
116+
.forEach(([, tag, id, content]) => {
117117
const href = `#${stripQuotes(id)}`
118118
const label = stripHTML(content)
119119
if (tag === 'h2') {

nuxt/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ module.exports = function nuxtBootstrapVue(moduleOptions = {}) {
9292
if (!usePretranspiled) {
9393
// Use bootstrap-vue source code for smaller prod builds
9494
// by aliasing 'bootstrap-vue' to the source files
95-
this.extendBuild((config, { isServer }) => {
95+
this.extendBuild(config => {
9696
if (!config.resolve.alias) {
9797
config.resolve.alias = {}
9898
}

scripts/postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = ctx => ({
1+
module.exports = () => ({
22
map: {
33
inline: false,
44
annotation: true,

src/components/button-toolbar/button-toolbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const BButtonToolbar = /*#__PURE__*/ Vue.extend({
6161
setItemFocus(item) {
6262
item && item.focus && item.focus()
6363
},
64-
focusFirst(evt) {
64+
focusFirst() {
6565
const items = this.getItems()
6666
this.setItemFocus(items[0])
6767
},
@@ -81,7 +81,7 @@ export const BButtonToolbar = /*#__PURE__*/ Vue.extend({
8181
this.setItemFocus(items[0])
8282
}
8383
},
84-
focusLast(evt) {
84+
focusLast() {
8585
const items = this.getItems().reverse()
8686
this.setItemFocus(items[0])
8787
},

0 commit comments

Comments
 (0)