diff options
| author | XhmikosR <[email protected]> | 2023-03-29 20:49:30 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-29 13:49:30 -0400 |
| commit | ae43f0c48bf7acede8a325b24197001fe2b2f416 (patch) | |
| tree | 780ea3b362bff6b88eaed4f4387217264c3b3189 /site | |
| parent | 3aabfc70c38db03e77229a49f4f8c7ed58169cf7 (diff) | |
| download | bootstrap-ae43f0c48bf7acede8a325b24197001fe2b2f416.tar.xz bootstrap-ae43f0c48bf7acede8a325b24197001fe2b2f416.zip | |
Tweak and re-organize ESLint config (#38369)
* Tweak and re-organize ESLint config
* merge individual configs to the root config
* enable more eslint-plugin-import rules
* lint markdown files
* Lint
Diffstat (limited to 'site')
| -rw-r--r-- | site/.eslintrc.json | 55 | ||||
| -rw-r--r-- | site/content/docs/5.3/getting-started/javascript.md | 2 |
2 files changed, 2 insertions, 55 deletions
diff --git a/site/.eslintrc.json b/site/.eslintrc.json deleted file mode 100644 index 0a16f82f9..000000000 --- a/site/.eslintrc.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "extends": "../.eslintrc.json", - "env": { - "browser": true, - "node": false - }, - "parserOptions": { - "sourceType": "script" - }, - "plugins": [ - "markdown" - ], - "rules": { - "no-new": "off", - "strict": "error", - "unicorn/no-array-for-each": "off", - "unicorn/numeric-separators-style": "off", - "unicorn/prefer-node-protocol": "off" - }, - "overrides": [ - { - // 2. Enable the Markdown processor for all .md files. - "files": [ - "./**/*.md" - ], - "processor": "markdown/markdown" - }, - { - // In v2, configuration for fenced code blocks is separate from the - // containing Markdown file. Each code block has a virtual filename - // appended to the Markdown file's path. - "files": [ - "./**/*.md/*.js" - ], - // Configuration for fenced code blocks goes with the override for - // the code block's virtual filename, for example: - "parserOptions": { - "ecmaFeatures": { - "impliedStrict": true - } - }, - "rules": { - "no-array-for-each": "off", - "no-labels": "off", - "no-redeclare": "off", - "no-undef": "off", - "no-unused-expressions": "off", - "no-unused-labels": "off", - "no-unused-vars": "off", - "unicorn/no-array-for-each": "off", - "unicorn/numeric-separators-style": "off" - } - } - ] -} diff --git a/site/content/docs/5.3/getting-started/javascript.md b/site/content/docs/5.3/getting-started/javascript.md index 739e9ef63..ef3c3ba64 100644 --- a/site/content/docs/5.3/getting-started/javascript.md +++ b/site/content/docs/5.3/getting-started/javascript.md @@ -30,6 +30,7 @@ A better alternative for those using this type of frameworks is to use a framewo We provide a version of Bootstrap built as `ESM` (`bootstrap.esm.js` and `bootstrap.esm.min.js`) which allows you to use Bootstrap as a module in the browser, if your [targeted browsers support it](https://caniuse.com/es6-module). +<!-- eslint-skip --> ```html <script type="module"> import { Toast } from 'bootstrap.esm.min.js' @@ -54,6 +55,7 @@ Uncaught TypeError: Failed to resolve module specifier "@popperjs/core". Relativ To fix this, you can use an `importmap` to resolve the arbitrary module names to complete paths. If your [targeted browsers](https://caniuse.com/?search=importmap) do not support `importmap`, you'll need to use the [es-module-shims](https://github.com/guybedford/es-module-shims) project. Here's how it works for Bootstrap and Popper: +<!-- eslint-skip --> ```html <!doctype html> <html lang="en"> |
