alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.18k stars 325 forks source link

Bump the lint group with 4 updates #4911

Closed dependabot[bot] closed 7 months ago

dependabot[bot] commented 7 months ago

Bumps the lint group with 4 updates: @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-plugin-jsdoc and stylelint.

Updates @typescript-eslint/eslint-plugin from 7.3.1 to 7.4.0

Release notes

Sourced from @​typescript-eslint/eslint-plugin's releases.

v7.4.0

7.4.0 (2024-03-25)

🚀 Features

🩹 Fixes

  • eslint-plugin: [prefer-optional-chain] address multipart nullish checks false positive (#8678)
  • eslint-plugin: [prefer-optional-chain] properly disambiguate between boolean and false (#8685)
  • eslint-plugin: [no-unnecessary-type-assertion] avoid remove const casting on template literals with expressions inside (#8740)
  • typescript-eslint: declare peer dependency on utils to ensure npm correctly installs dependencies (#8738)
  • website: visual Editor is not scrolled (#8709)
  • website: make 404 page good again (#8750)

❤️ Thank You

You can read about our versioning strategy and releases on our website.

Changelog

Sourced from @​typescript-eslint/eslint-plugin's changelog.

7.4.0 (2024-03-25)

🚀 Features

  • eslint-plugin: [consistent-type-imports] ignore files with decorators, experimentalDecorators, and emitDecoratorMetadata

  • eslint-plugin: [no-unnecessary-type-arguments] handle tagged templates

  • eslint-plugin: deprecate no-throw-literal and add a renamed only-throw-error

🩹 Fixes

  • eslint-plugin: [prefer-optional-chain] address multipart nullish checks false positive

  • eslint-plugin: [prefer-optional-chain] properly disambiguate between boolean and false

  • eslint-plugin: [no-unnecessary-type-assertion] avoid remove const casting on template literals with expressions inside

❤️ Thank You

  • Abraham Guo
  • Brad Zacher
  • Josh Goldberg ✨
  • Kim Sang Du
  • Kirk Waiblinger
  • Marco Pasqualetti
  • YeonJuan

You can read about our versioning strategy and releases on our website.

Commits
  • 5d24691 chore(release): publish 7.4.0
  • 029fc0b feat(eslint-plugin): deprecate no-throw-literal and add a renamed only-throw-...
  • 2a62a40 fix(eslint-plugin): [no-unnecessary-type-assertion] avoid remove const castin...
  • 990ec22 docs: fix example of binding unbound method (#8754)
  • a08554a feat(eslint-plugin): [no-unnecessary-type-arguments] handle tagged templates ...
  • 2018f91 fix(eslint-plugin): [prefer-optional-chain] properly disambiguate between `bo...
  • 56358a6 fix(eslint-plugin): [prefer-optional-chain] address multipart nullish checks ...
  • 532ae8b docs: fix typo in switch-exhaustiveness-check (#8768)
  • e408b93 feat(eslint-plugin): [consistent-type-imports] ignore files with decorators, ...
  • c787fe4 docs: restrict-template-expressions - remove mention of numbers being allowed...
  • See full diff in compare view


Updates @typescript-eslint/parser from 7.3.1 to 7.4.0

Release notes

Sourced from @​typescript-eslint/parser's releases.

v7.4.0

7.4.0 (2024-03-25)

🚀 Features

🩹 Fixes

  • eslint-plugin: [prefer-optional-chain] address multipart nullish checks false positive (#8678)
  • eslint-plugin: [prefer-optional-chain] properly disambiguate between boolean and false (#8685)
  • eslint-plugin: [no-unnecessary-type-assertion] avoid remove const casting on template literals with expressions inside (#8740)
  • typescript-eslint: declare peer dependency on utils to ensure npm correctly installs dependencies (#8738)
  • website: visual Editor is not scrolled (#8709)
  • website: make 404 page good again (#8750)

❤️ Thank You

You can read about our versioning strategy and releases on our website.

Changelog

Sourced from @​typescript-eslint/parser's changelog.

7.4.0 (2024-03-25)

🚀 Features

  • eslint-plugin: [consistent-type-imports] ignore files with decorators, experimentalDecorators, and emitDecoratorMetadata

❤️ Thank You

  • Abraham Guo
  • Brad Zacher
  • Josh Goldberg ✨
  • Kim Sang Du
  • Kirk Waiblinger
  • Marco Pasqualetti
  • YeonJuan

You can read about our versioning strategy and releases on our website.

Commits
  • 5d24691 chore(release): publish 7.4.0
  • e408b93 feat(eslint-plugin): [consistent-type-imports] ignore files with decorators, ...
  • See full diff in compare view


Updates eslint-plugin-jsdoc from 48.2.1 to 48.2.2

Release notes

Sourced from eslint-plugin-jsdoc's releases.

v48.2.2

48.2.2 (2024-03-28)

Bug Fixes

Commits


Updates stylelint from 16.3.0 to 16.3.1

Release notes

Sourced from stylelint's releases.

16.3.1

Changelog

Sourced from stylelint's changelog.

16.3.1

Commits


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
github-actions[bot] commented 7 months ago

:clipboard: Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 113.25 KiB
dist/govuk-frontend-development.min.js 42.21 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 87.21 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 81.95 KiB
packages/govuk-frontend/dist/govuk/all.mjs 4.17 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.24 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 42.2 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 77.67 KiB 40.19 KiB
accordion.mjs 22.71 KiB 12.85 KiB
button.mjs 5.98 KiB 2.69 KiB
character-count.mjs 22.4 KiB 9.92 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 7.89 KiB 3.46 KiB
exit-this-page.mjs 17.1 KiB 9.26 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 6.26 KiB 2.62 KiB
password-input.mjs 15.15 KiB 7.25 KiB
radios.mjs 4.83 KiB 2.38 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.13 KiB 6.11 KiB

View stats and visualisations on the review app


Action run for 94aad8b9a3afbc6d94868a7a00799b4bf52bd7a9

owenatgov commented 7 months ago

It looks like the failure's being caused by eslint's new rule: prefer-optional-chain. Will dig into if it's easy or risky to apply this in a mo.

owenatgov commented 7 months ago

It turns out we explicitly allow optional chaining and actually already use it 😅 Have pushed a change to fix the failing test. Will provide a review now.

github-actions[bot] commented 7 months ago

JavaScript changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.js b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.js
index 42ac38f54..db99e502b 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.js
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.js
@@ -593,7 +593,7 @@ class Checkboxes extends GOVUKFrontendComponent {
         const t = e.getAttribute("aria-controls");
         if (!t) return;
         const s = document.getElementById(t);
-        if (s && s.classList.contains("govuk-checkboxes__conditional")) {
+        if (null != s && s.classList.contains("govuk-checkboxes__conditional")) {
             const t = e.checked;
             e.setAttribute("aria-expanded", t.toString()), s.classList.toggle("govuk-checkboxes__conditional--hidden", !t)
         }

Action run for 94aad8b9a3afbc6d94868a7a00799b4bf52bd7a9

github-actions[bot] commented 7 months ago

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/all.bundle.js b/packages/govuk-frontend/dist/govuk/all.bundle.js
index 2e6ee3171..66ef07672 100644
--- a/packages/govuk-frontend/dist/govuk/all.bundle.js
+++ b/packages/govuk-frontend/dist/govuk/all.bundle.js
@@ -1232,7 +1232,7 @@
         return;
       }
       const $target = document.getElementById(targetId);
-      if ($target && $target.classList.contains('govuk-checkboxes__conditional')) {
+      if ($target != null && $target.classList.contains('govuk-checkboxes__conditional')) {
         const inputIsChecked = $input.checked;
         $input.setAttribute('aria-expanded', inputIsChecked.toString());
         $target.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked);
diff --git a/packages/govuk-frontend/dist/govuk/all.bundle.mjs b/packages/govuk-frontend/dist/govuk/all.bundle.mjs
index 364ad3342..669d06852 100644
--- a/packages/govuk-frontend/dist/govuk/all.bundle.mjs
+++ b/packages/govuk-frontend/dist/govuk/all.bundle.mjs
@@ -1226,7 +1226,7 @@ class Checkboxes extends GOVUKFrontendComponent {
       return;
     }
     const $target = document.getElementById(targetId);
-    if ($target && $target.classList.contains('govuk-checkboxes__conditional')) {
+    if ($target != null && $target.classList.contains('govuk-checkboxes__conditional')) {
       const inputIsChecked = $input.checked;
       $input.setAttribute('aria-expanded', inputIsChecked.toString());
       $target.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked);
diff --git a/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js b/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js
index e8fb370f5..fa0f0190a 100644
--- a/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js
+++ b/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js
@@ -148,7 +148,7 @@
         return;
       }
       const $target = document.getElementById(targetId);
-      if ($target && $target.classList.contains('govuk-checkboxes__conditional')) {
+      if ($target != null && $target.classList.contains('govuk-checkboxes__conditional')) {
         const inputIsChecked = $input.checked;
         $input.setAttribute('aria-expanded', inputIsChecked.toString());
         $target.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked);
diff --git a/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs b/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs
index 8e414cdba..f8ab886f3 100644
--- a/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs
+++ b/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs
@@ -142,7 +142,7 @@ class Checkboxes extends GOVUKFrontendComponent {
       return;
     }
     const $target = document.getElementById(targetId);
-    if ($target && $target.classList.contains('govuk-checkboxes__conditional')) {
+    if ($target != null && $target.classList.contains('govuk-checkboxes__conditional')) {
       const inputIsChecked = $input.checked;
       $input.setAttribute('aria-expanded', inputIsChecked.toString());
       $target.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked);
diff --git a/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs b/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs
index 53cc4a7a7..f9d7d8fbf 100644
--- a/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs
+++ b/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs
@@ -68,7 +68,7 @@ class Checkboxes extends GOVUKFrontendComponent {
       return;
     }
     const $target = document.getElementById(targetId);
-    if ($target && $target.classList.contains('govuk-checkboxes__conditional')) {
+    if ($target != null && $target.classList.contains('govuk-checkboxes__conditional')) {
       const inputIsChecked = $input.checked;
       $input.setAttribute('aria-expanded', inputIsChecked.toString());
       $target.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked);

Action run for 94aad8b9a3afbc6d94868a7a00799b4bf52bd7a9

domoscargin commented 7 months ago

It turns out we explicitly allow optional chaining and actually already use it 😅 Have pushed a change to fix the failing test. Will provide a review now.

Heads up that the two links in your comment are both to the same thing. But the point still stands!