]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
ESLint: fix `sourceType` for docs md files
authorXhmikosR <xhmikosr@gmail.com>
Mon, 11 Mar 2024 14:35:47 +0000 (16:35 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Mon, 11 Mar 2024 14:37:25 +0000 (16:37 +0200)
.eslintrc.json
site/content/docs/5.3/components/alerts.md
site/content/docs/5.3/getting-started/javascript.md

index 4ded4b402e73d505aa17e0db50aef2e014a3b23d..b8591192de16cac1c9df4d562bd1bd519418586d 100644 (file)
       "files": [
         "**/*.md/*.js"
       ],
-      "extends": "plugin:markdown/recommended",
-      "parserOptions": {
-        "sourceType": "module"
-      }
+      "extends": "plugin:markdown/recommended"
     }
   ]
 }
index 6103898bcdd1d923261be665c6142c19eaca1b20..08510634f43ffcfa8d6f82198c357185b2ceb2e0 100644 (file)
@@ -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
index 73370b62d8afe9806d0616b525f63071c7cc4486..5513eb772788d58facfe69600439884e3585e6b1 100644 (file)
@@ -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