diff --git a/.eslintrc.json b/.eslintrc.json index 4ded4b402e..b8591192de 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -206,10 +206,7 @@ "files": [ "**/*.md/*.js" ], - "extends": "plugin:markdown/recommended", - "parserOptions": { - "sourceType": "module" - } + "extends": "plugin:markdown/recommended" } ] } diff --git a/site/content/docs/5.3/components/alerts.md b/site/content/docs/5.3/components/alerts.md index 6103898bcd..08510634f4 100644 --- a/site/content/docs/5.3/components/alerts.md +++ b/site/content/docs/5.3/components/alerts.md @@ -215,8 +215,8 @@ This makes an alert listen for click events on descendant elements which have th Basic usage: ```js -const alert = bootstrap.Alert.getOrCreateInstance('#myAlert') -alert.close() +const myAlert = bootstrap.Alert.getOrCreateInstance('#myAlert') +myAlert.close() ``` ### Events diff --git a/site/content/docs/5.3/getting-started/javascript.md b/site/content/docs/5.3/getting-started/javascript.md index 73370b62d8..5513eb7727 100644 --- a/site/content/docs/5.3/getting-started/javascript.md +++ b/site/content/docs/5.3/getting-started/javascript.md @@ -160,7 +160,7 @@ In addition to the `getInstance` and `getOrCreateInstance` methods, all plugin c const modal = new bootstrap.Modal('#myModal') const dropdown = new bootstrap.Dropdown('[data-bs-toggle="dropdown"]') const offcanvas = bootstrap.Offcanvas.getInstance('#myOffcanvas') -const alert = bootstrap.Alert.getOrCreateInstance('#myAlert') +const myAlert = bootstrap.Alert.getOrCreateInstance('#myAlert') ``` ### Asynchronous functions and transitions