Skip to content

Commit

Permalink
Merge branch 'main' into issue/1197
Browse files Browse the repository at this point in the history
  • Loading branch information
mmunro-ltrr committed Jul 26, 2024
2 parents 9661b64 + 41b6da0 commit ee1bde6
Show file tree
Hide file tree
Showing 20 changed files with 276 additions and 102 deletions.
7 changes: 1 addition & 6 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,5 @@ module.exports = {
modules: false
}
]
],
env: {
test: {
plugins: [ 'istanbul' ]
}
}
]
};
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
**/vendor/
/_site/
/js/coverage/
/site/assets/js/
/site/static/sw.js
/site/layouts/partials/
/site/**/*.md
167 changes: 140 additions & 27 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,35 @@
"error",
"never"
],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "always"
}
],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-absolute-path": "error",
"import/no-amd": "error",
"import/no-cycle": [
"error",
{
"ignoreExternal": true
}
],
"import/no-duplicates": "error",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-named-default": "error",
"import/no-self-import": "error",
"import/no-unassigned-import": [
"error"
],
"import/no-useless-path-segments": "error",
"import/order": "error",
"indent": [
"error",
2,
Expand All @@ -22,18 +51,22 @@
"SwitchCase": 1
}
],
"logical-assignment-operators": "off",
"max-params": [
"warn",
5
],
"multiline-ternary": [
"error",
"always-multiline"
],
"new-cap": [
"error",
{
"properties": false
}
],
"no-console": "error",
"no-mixed-operators": "off",
"no-negated-condition": "off",
"object-curly-spacing": [
"error",
Expand All @@ -43,40 +76,31 @@
"error",
"after"
],
"prefer-object-has-own": "off",
"prefer-template": "error",
"semi": [
"error",
"never"
],
"unicorn/consistent-function-scoping": "off",
"strict": "error",
"unicorn/explicit-length-check": "off",
"unicorn/filename-case": "off",
"unicorn/no-anonymous-default-export": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-method-this-argument": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/no-typeof-undefined": "off",
"unicorn/no-unused-properties": "error",
"unicorn/no-useless-undefined": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-array-find": "off",
"unicorn/prefer-array-flat": "off",
"unicorn/prefer-at": "off",
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-dom-node-remove": "off",
"unicorn/prefer-includes": "off",
"unicorn/prefer-math-trunc": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-number-properties": "off",
"unicorn/prefer-optional-catch-binding": "off",
"unicorn/prefer-prototype-methods": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-reflect-apply": "off",
"unicorn/prefer-set-has": "off",
"unicorn/prefer-spread": "off",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prefer-string-raw": "off",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-structured-clone": "off",
"unicorn/prevent-abbreviations": "off"
},
"overrides": [
Expand All @@ -98,23 +122,112 @@
},
{
"files": [
"site/**"
"js/**"
],
"parserOptions": {
"sourceType": "module"
}
},
{
"files": [
"js/tests/*.js",
"js/tests/integration/rollup*.js"
],
"env": {
"es6": false,
"jquery": true
"node": true
},
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script"
}
},
{
"files": [
"js/tests/unit/**"
],
"env": {
"jasmine": true
},
"rules": {
"no-console": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-add-event-listener": "off"
}
},
{
"files": [
"js/tests/visual/**"
],
"plugins": [
"html"
],
"settings": {
"html/html-extensions": [
".html"
]
},
"rules": {
"no-console": "off",
"no-new": "off",
"unicorn/no-array-for-each": "off"
}
},
{
"files": [
"scss/tests/**"
],
"env": {
"node": true
},
"parserOptions": {
"sourceType": "script"
}
},
{
"files": [
"site/**"
],
"env": {
"browser": true,
"node": false
},
"parserOptions": {
"sourceType": "script",
"ecmaVersion": 2019
},
"rules": {
"no-new": "off",
"unicorn/no-array-for-each": "off"
}
},
{
"files": [
"site/assets/js/**"
],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020
}
},
{
"files": [
"**/*.md"
],
"plugins": [
"markdown"
],
"processor": "markdown/markdown"
},
{
"files": [
"**/*.md/*.js",
"**/*.md/*.mjs"
],
"extends": "plugin:markdown/recommended-legacy",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-var": "off",
"object-shorthand": "off",
"prefer-arrow-callback": "off",
"prefer-destructuring": "off",
"prefer-template": "off",
"strict": "error",
"unicorn/prefer-node-protocol": "off"
}
}
Expand Down
66 changes: 66 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"extends": [
"stylelint-config-twbs-bootstrap"
],
"reportInvalidScopeDisables": true,
"reportNeedlessDisables": true,
"overrides": [
{
"files": "**/*.scss",
"rules": {
"declaration-property-value-disallowed-list": {
"border": "none",
"outline": "none"
},
"function-disallowed-list": [
"calc",
"lighten",
"darken"
],
"property-disallowed-list": [
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-right-radius",
"border-bottom-left-radius",
"transition"
],
"scss/dollar-variable-default": [
true,
{
"ignore": "local"
}
],
"scss/selector-no-union-class-name": true
}
},
{
"files": "scss/**/*.{test,spec}.scss",
"rules": {
"scss/dollar-variable-default": null,
"declaration-no-important": null
}
},
{
"files": "scss/*.scss",
"rules": {
"scss/dollar-variable-default": null,
}
},
{
"files": "site/**/*.scss",
"rules": {
"scss/dollar-variable-default": null
}
},
{
"files": "site/**/examples/**/*.css",
"rules": {
"comment-empty-line-before": null,
"property-no-vendor-prefix": null,
"selector-no-qualifying-type": null,
"value-no-vendor-prefix": null
}
}
]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 node:20.14.0-bookworm-slim
FROM --platform=linux/amd64 node:20.15.1-bookworm-slim

ENV LANG C.UTF-8

Expand Down
9 changes: 6 additions & 3 deletions build/build-plugins.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

/*!
* Script to build our plugins to use them separately.
* Copyright 2020-2023 The Bootstrap Authors
* Copyright 2020-2024 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { babel } from '@rollup/plugin-babel'
import globby from 'globby'
import { globby } from 'globby'
import { rollup } from 'rollup'
import banner from './banner.mjs'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(fileURLToPath(import.meta.url))

const sourcePath = path.resolve(__dirname, '../js/src/').replace(/\\/g, '/')
const jsFiles = globby.sync(`${sourcePath}/**/*.js`)
const jsFiles = await globby(`${sourcePath}/**/*.js`)

// Array which holds the resolved plugins
const resolvedPlugins = []
Expand All @@ -37,6 +37,9 @@ for (const file of jsFiles) {
}

const build = async plugin => {
/**
* @type {import('rollup').GlobalsOption}
*/
const globals = {}

const bundle = await rollup({
Expand Down
6 changes: 1 addition & 5 deletions build/vnu-jar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*!
* Script to run vnu-jar if Java is available.
* Copyright 2017-2023 The Bootstrap Authors
* Copyright 2017-2024 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

Expand All @@ -27,10 +27,6 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
// Firefox's non-standard autocomplete behavior - see https://bugzilla.mozilla.org/show_bug.cgi?id=654072
'Attribute “autocomplete” is only allowed when the input type is.*',
'Attribute “autocomplete” not allowed on element “button” at this point.',
// Explicit role="main" is redundant for other modern browsers, but still valid.
'The “main” role is unnecessary for element “main”.',
'Self-closing tag syntax in text/html documents is widely discouraged;.*',
'Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.',
// Per https://www.w3.org/TR/html-aria/#docconformance having "aria-disabled" on a link is
// NOT RECOMMENDED, but it's still valid - we explain in the docs that it's not ideal,
// and offer more robust alternatives, but also need to show a less-than-ideal example
Expand Down
2 changes: 1 addition & 1 deletion dist/js/arizona-bootstrap.bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/arizona-bootstrap.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/arizona-bootstrap.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit ee1bde6

Please sign in to comment.