From 35818ce568f16bc845cd00133a5bf23e6a9a2fc2 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Tue, 23 Jul 2024 13:59:31 +0100 Subject: [PATCH 01/14] chore(eslint-config-pie): DSW-000 add rule for consistent type imports --- .changeset/blue-readers-decide.md | 5 +++++ packages/tools/eslint-config-pie/strict/rules/imports.js | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/blue-readers-decide.md diff --git a/.changeset/blue-readers-decide.md b/.changeset/blue-readers-decide.md new file mode 100644 index 0000000000..2b47498996 --- /dev/null +++ b/.changeset/blue-readers-decide.md @@ -0,0 +1,5 @@ +--- +"@justeattakeaway/eslint-config-pie": minor +--- + +[Added] - `@typescript-eslint/consistent-type-imports` rule diff --git a/packages/tools/eslint-config-pie/strict/rules/imports.js b/packages/tools/eslint-config-pie/strict/rules/imports.js index ff068ec425..3799d47037 100755 --- a/packages/tools/eslint-config-pie/strict/rules/imports.js +++ b/packages/tools/eslint-config-pie/strict/rules/imports.js @@ -1,5 +1,6 @@ module.exports = { rules: { 'import/prefer-default-export': 'off', + '@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', fixStyle: 'inline-type-imports' }], }, }; From 2dacf177a13c69b781adf66a95e750e1f990a045 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Tue, 23 Jul 2024 15:01:45 +0100 Subject: [PATCH 02/14] chore(eslint-config-pie): DSW-000 update type-only imports --- .changeset/heavy-phones-talk.md | 20 +++++++++++++++++++ .../stories/pie-assistive-text.stories.ts | 4 ++-- .../pie-assistive-text/src/defs-react.ts | 2 +- .../pie-assistive-text/src/index.ts | 4 ++-- .../accessibility/pie-assistive-text.spec.ts | 2 +- .../components/pie-button/src/defs-react.ts | 2 +- packages/components/pie-button/src/index.ts | 4 ++-- .../test/accessibility/pie-button.spec.ts | 2 +- .../test/component/pie-button.spec.ts | 2 +- .../components/pie-card/src/defs-react.ts | 2 +- packages/components/pie-card/src/index.ts | 4 ++-- .../test/accessibility/pie-card.spec.ts | 2 +- .../pie-card/test/component/pie-card.spec.ts | 2 +- .../pie-checkbox-group/src/defs-react.ts | 2 +- .../pie-checkbox-group/src/index.ts | 4 ++-- .../accessibility/pie-checkbox-group.spec.ts | 2 +- .../test/component/pie-checkbox-group.spec.ts | 2 +- .../test/visual/pie-checkbox-group.spec.ts | 2 +- .../components/pie-checkbox/src/defs-react.ts | 2 +- packages/components/pie-checkbox/src/index.ts | 4 ++-- .../test/accessibility/pie-checkbox.spec.ts | 2 +- .../test/component/pie-checkbox.spec.ts | 2 +- .../components/pie-chip/src/defs-react.ts | 2 +- packages/components/pie-chip/src/index.ts | 4 ++-- .../test/accessibility/pie-chip.spec.ts | 2 +- .../pie-chip/test/component/pie-chip.spec.ts | 2 +- .../components/pie-divider/src/defs-react.ts | 2 +- packages/components/pie-divider/src/index.ts | 2 +- .../test/accessibility/pie-divider.spec.ts | 2 +- .../test/component/pie-divider.spec.ts | 2 +- .../pie-form-label/src/defs-react.ts | 2 +- .../components/pie-form-label/src/index.ts | 6 +++--- .../test/accessibility/pie-form-label.spec.ts | 2 +- .../test/component/pie-form-label.spec.ts | 4 ++-- .../test/visual/pie-form-label.spec.ts | 2 +- .../components/pie-modal/src/defs-react.ts | 2 +- packages/components/pie-modal/src/defs.ts | 2 +- packages/components/pie-modal/src/index.ts | 2 +- .../pie-modal/test/helpers/index.ts | 2 +- .../pie-modal/test/visual/pie-modal.spec.ts | 2 +- .../pie-notification/src/defs-react.ts | 2 +- .../accessibility/pie-notification.spec.ts | 2 +- .../components/pie-spinner/src/defs-react.ts | 2 +- packages/components/pie-spinner/src/index.ts | 2 +- .../test/accessibility/pie-spinner.spec.ts | 2 +- .../components/pie-switch/src/defs-react.ts | 2 +- packages/components/pie-switch/src/index.ts | 6 +++--- .../test/component/pie-switch.spec.ts | 2 +- .../pie-switch/test/visual/pie-switch.spec.ts | 2 +- packages/components/pie-tag/src/defs-react.ts | 2 +- packages/components/pie-tag/src/index.ts | 2 +- .../test/accessibility/pie-tag.spec.ts | 2 +- .../pie-tag/test/component/pie-tag.spec.ts | 2 +- .../pie-webc-core/src/mixins/rtl/rtlMixin.ts | 2 +- .../src/app/templates/src/defs-react.ts | 2 +- .../generator-pie-component/src/app/types.ts | 2 +- .../generator-pie-component/src/app/utils.ts | 2 +- yarn.lock | 2 -- 58 files changed, 88 insertions(+), 70 deletions(-) create mode 100644 .changeset/heavy-phones-talk.md diff --git a/.changeset/heavy-phones-talk.md b/.changeset/heavy-phones-talk.md new file mode 100644 index 0000000000..eda72e050e --- /dev/null +++ b/.changeset/heavy-phones-talk.md @@ -0,0 +1,20 @@ +--- +"@justeattakeaway/pie-assistive-text": patch +"@justeattakeaway/pie-checkbox-group": patch +"@justeattakeaway/generator-pie-component": patch +"@justeattakeaway/pie-notification": patch +"@justeattakeaway/pie-form-label": patch +"@justeattakeaway/pie-webc-core": patch +"@justeattakeaway/pie-checkbox": patch +"@justeattakeaway/pie-divider": patch +"@justeattakeaway/pie-spinner": patch +"@justeattakeaway/pie-button": patch +"@justeattakeaway/pie-switch": patch +"@justeattakeaway/pie-modal": patch +"@justeattakeaway/pie-card": patch +"@justeattakeaway/pie-chip": patch +"@justeattakeaway/pie-tag": patch +"pie-storybook": patch +--- + +[Fixed] - Imports to align with new linting rule diff --git a/apps/pie-storybook/stories/pie-assistive-text.stories.ts b/apps/pie-storybook/stories/pie-assistive-text.stories.ts index 669bdae31f..6ca0fed983 100644 --- a/apps/pie-storybook/stories/pie-assistive-text.stories.ts +++ b/apps/pie-storybook/stories/pie-assistive-text.stories.ts @@ -2,10 +2,10 @@ import { html } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; /* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-assistive-text'; -import { AssistiveTextProps as AssistiveTextBaseProps, variants, defaultProps } from '@justeattakeaway/pie-assistive-text'; +import { type AssistiveTextProps as AssistiveTextBaseProps, variants, defaultProps } from '@justeattakeaway/pie-assistive-text'; /* eslint-enable import/no-duplicates */ -import { type StoryMeta, SlottedComponentProps } from '../types'; +import { type StoryMeta, type SlottedComponentProps } from '../types'; import { createStory, type TemplateFunction, sanitizeAndRenderHTML } from '../utilities'; type AssistiveTextProps = SlottedComponentProps; diff --git a/packages/components/pie-assistive-text/src/defs-react.ts b/packages/components/pie-assistive-text/src/defs-react.ts index 97258f7d24..2714b9afa2 100644 --- a/packages/components/pie-assistive-text/src/defs-react.ts +++ b/packages/components/pie-assistive-text/src/defs-react.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; /** * TODO: Verify if ReactBaseType can be set as a more specific React interface * Use the React IntrinsicElements interface to find how to map standard HTML elements to existing React Interfaces diff --git a/packages/components/pie-assistive-text/src/index.ts b/packages/components/pie-assistive-text/src/index.ts index fe403a0179..8224a720f3 100644 --- a/packages/components/pie-assistive-text/src/index.ts +++ b/packages/components/pie-assistive-text/src/index.ts @@ -1,5 +1,5 @@ import { - LitElement, html, unsafeCSS, nothing, TemplateResult, + LitElement, html, unsafeCSS, nothing, type TemplateResult, } from 'lit'; import { property } from 'lit/decorators.js'; @@ -9,7 +9,7 @@ import '@justeattakeaway/pie-icons-webc/dist/IconAlertCircle.js'; import '@justeattakeaway/pie-icons-webc/dist/IconCheckCircle.js'; import styles from './assistive-text.scss?inline'; -import { AssistiveTextProps, variants, defaultProps } from './defs'; +import { type AssistiveTextProps, variants, defaultProps } from './defs'; // Valid values available to consumers export * from './defs'; diff --git a/packages/components/pie-assistive-text/test/accessibility/pie-assistive-text.spec.ts b/packages/components/pie-assistive-text/test/accessibility/pie-assistive-text.spec.ts index 435bc12821..00e863e283 100644 --- a/packages/components/pie-assistive-text/test/accessibility/pie-assistive-text.spec.ts +++ b/packages/components/pie-assistive-text/test/accessibility/pie-assistive-text.spec.ts @@ -1,5 +1,5 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieAssistiveText, AssistiveTextProps } from '../../src/index.ts'; +import { PieAssistiveText, type AssistiveTextProps } from '../../src/index.ts'; import { variants } from '../../src/defs.ts'; test.describe('PieAssistiveText - Accessibility tests', () => { diff --git a/packages/components/pie-button/src/defs-react.ts b/packages/components/pie-button/src/defs-react.ts index 19e2118376..ff16599649 100644 --- a/packages/components/pie-button/src/defs-react.ts +++ b/packages/components/pie-button/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.ButtonHTMLAttributes diff --git a/packages/components/pie-button/src/index.ts b/packages/components/pie-button/src/index.ts index a0806de40e..151a9cfa62 100644 --- a/packages/components/pie-button/src/index.ts +++ b/packages/components/pie-button/src/index.ts @@ -1,11 +1,11 @@ import { - LitElement, html, unsafeCSS, nothing, PropertyValues, TemplateResult, + LitElement, html, unsafeCSS, nothing, type PropertyValues, type TemplateResult, } from 'lit'; import { property } from 'lit/decorators.js'; import { ifDefined } from 'lit/directives/if-defined.js'; import { validPropertyValues, defineCustomElement, FormControlMixin } from '@justeattakeaway/pie-webc-core'; import { - ButtonProps, sizes, types, variants, iconPlacements, defaultProps, + type ButtonProps, sizes, types, variants, iconPlacements, defaultProps, } from './defs'; import styles from './button.scss?inline'; import 'element-internals-polyfill'; diff --git a/packages/components/pie-button/test/accessibility/pie-button.spec.ts b/packages/components/pie-button/test/accessibility/pie-button.spec.ts index 08c2387318..78f3ceb17f 100644 --- a/packages/components/pie-button/test/accessibility/pie-button.spec.ts +++ b/packages/components/pie-button/test/accessibility/pie-button.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; import { getAllPropCombinations, splitCombinationsByPropertyValue } from '@justeattakeaway/pie-webc-testing/src/helpers/get-all-prop-combos.ts'; -import { PropObject, WebComponentPropValues } from '@justeattakeaway/pie-webc-testing/src/helpers/defs.ts'; +import { type PropObject, type WebComponentPropValues } from '@justeattakeaway/pie-webc-testing/src/helpers/defs.ts'; import { PieButton } from '../../src/index.ts'; import { sizes, variants } from '../../src/defs.ts'; diff --git a/packages/components/pie-button/test/component/pie-button.spec.ts b/packages/components/pie-button/test/component/pie-button.spec.ts index 3a92b4a698..3af1585916 100644 --- a/packages/components/pie-button/test/component/pie-button.spec.ts +++ b/packages/components/pie-button/test/component/pie-button.spec.ts @@ -1,6 +1,6 @@ import { getShadowElementStylePropValues } from '@justeattakeaway/pie-webc-testing/src/helpers/get-shadow-element-style-prop-values.ts'; import { test, expect } from '@sand4rt/experimental-ct-web'; -import { PieButton, ButtonProps } from '../../src/index.ts'; +import { PieButton, type ButtonProps } from '../../src/index.ts'; const props: Partial = { size: 'large', diff --git a/packages/components/pie-card/src/defs-react.ts b/packages/components/pie-card/src/defs-react.ts index f44318b24b..4a387f4797 100644 --- a/packages/components/pie-card/src/defs-react.ts +++ b/packages/components/pie-card/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.AnchorHTMLAttributes & React.ButtonHTMLAttributes diff --git a/packages/components/pie-card/src/index.ts b/packages/components/pie-card/src/index.ts index 95143eb618..4a892df108 100644 --- a/packages/components/pie-card/src/index.ts +++ b/packages/components/pie-card/src/index.ts @@ -1,5 +1,5 @@ import { - html, LitElement, unsafeCSS, nothing, TemplateResult, + html, LitElement, unsafeCSS, nothing, type TemplateResult, } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; import { property } from 'lit/decorators.js'; @@ -8,7 +8,7 @@ import styles from './card.scss?inline'; import { variants, tags, - CardProps, + type CardProps, defaultProps, paddingValues, } from './defs'; diff --git a/packages/components/pie-card/test/accessibility/pie-card.spec.ts b/packages/components/pie-card/test/accessibility/pie-card.spec.ts index ba975bb8f8..ce0a88f28e 100644 --- a/packages/components/pie-card/test/accessibility/pie-card.spec.ts +++ b/packages/components/pie-card/test/accessibility/pie-card.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieCard, CardProps } from '../../src/index.ts'; +import { PieCard, type CardProps } from '../../src/index.ts'; import { tags } from '../../src/defs.ts'; test.describe('PieCard - Accessibility tests', () => { diff --git a/packages/components/pie-card/test/component/pie-card.spec.ts b/packages/components/pie-card/test/component/pie-card.spec.ts index a3b67a052a..ae3dfbf496 100644 --- a/packages/components/pie-card/test/component/pie-card.spec.ts +++ b/packages/components/pie-card/test/component/pie-card.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@sand4rt/experimental-ct-web'; -import { PieCard, CardProps } from '../../src/index.ts'; +import { PieCard, type CardProps } from '../../src/index.ts'; import { tags, paddingValues } from '../../src/defs.ts'; const componentSelector = '[data-test-id="pie-card"]'; diff --git a/packages/components/pie-checkbox-group/src/defs-react.ts b/packages/components/pie-checkbox-group/src/defs-react.ts index 3f39c4cc6b..dda858c02f 100644 --- a/packages/components/pie-checkbox-group/src/defs-react.ts +++ b/packages/components/pie-checkbox-group/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.FieldsetHTMLAttributes diff --git a/packages/components/pie-checkbox-group/src/index.ts b/packages/components/pie-checkbox-group/src/index.ts index 9d302749c5..3a62332a2e 100644 --- a/packages/components/pie-checkbox-group/src/index.ts +++ b/packages/components/pie-checkbox-group/src/index.ts @@ -1,5 +1,5 @@ import { - LitElement, html, unsafeCSS, PropertyValues, + LitElement, html, unsafeCSS, type PropertyValues, } from 'lit'; import { property, queryAssignedElements } from 'lit/decorators.js'; import { @@ -12,7 +12,7 @@ import { ifDefined } from 'lit/directives/if-defined.js'; import styles from './checkbox-group.scss?inline'; import { ON_CHECKBOX_GROUP_DISABLED, - CheckboxGroupProps, + type CheckboxGroupProps, defaultProps, statusTypes, } from './defs'; diff --git a/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts b/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts index 6ba0f358f2..97d2b37218 100644 --- a/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts +++ b/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieCheckboxGroup, CheckboxGroupProps } from '../../src/index.ts'; +import { PieCheckboxGroup, type CheckboxGroupProps } from '../../src/index.ts'; test.describe('PieCheckboxGroup - Accessibility tests', () => { test('a11y - should test the PieCheckboxGroup component WCAG compliance', async ({ makeAxeBuilder, mount }) => { diff --git a/packages/components/pie-checkbox-group/test/component/pie-checkbox-group.spec.ts b/packages/components/pie-checkbox-group/test/component/pie-checkbox-group.spec.ts index f7572a06dd..88a9b00cb4 100644 --- a/packages/components/pie-checkbox-group/test/component/pie-checkbox-group.spec.ts +++ b/packages/components/pie-checkbox-group/test/component/pie-checkbox-group.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@sand4rt/experimental-ct-web'; import { PieAssistiveText } from '@justeattakeaway/pie-assistive-text'; import { PieCheckbox } from '@justeattakeaway/pie-checkbox'; -import { PieCheckboxGroup, CheckboxGroupProps } from '../../src/index.ts'; +import { PieCheckboxGroup, type CheckboxGroupProps } from '../../src/index.ts'; import { statusTypes } from '../../src/defs.ts'; const componentSelector = '[data-test-id="pie-checkbox-group"]'; diff --git a/packages/components/pie-checkbox-group/test/visual/pie-checkbox-group.spec.ts b/packages/components/pie-checkbox-group/test/visual/pie-checkbox-group.spec.ts index 57e9c5c0a9..a8fd3b89cb 100644 --- a/packages/components/pie-checkbox-group/test/visual/pie-checkbox-group.spec.ts +++ b/packages/components/pie-checkbox-group/test/visual/pie-checkbox-group.spec.ts @@ -1,7 +1,7 @@ import { test } from '@sand4rt/experimental-ct-web'; import percySnapshot from '@percy/playwright'; -import { PieCheckboxGroup, CheckboxGroupProps } from '../../src/index.ts'; +import { PieCheckboxGroup, type CheckboxGroupProps } from '../../src/index.ts'; test.describe('PieCheckboxGroup - Visual tests`', () => { test('should display the PieCheckboxGroup component successfully', async ({ page, mount }) => { diff --git a/packages/components/pie-checkbox/src/defs-react.ts b/packages/components/pie-checkbox/src/defs-react.ts index 2cbcb3a6d7..f4a0d157f6 100644 --- a/packages/components/pie-checkbox/src/defs-react.ts +++ b/packages/components/pie-checkbox/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.InputHTMLAttributes diff --git a/packages/components/pie-checkbox/src/index.ts b/packages/components/pie-checkbox/src/index.ts index 1ade8ef93b..0fa684fb23 100644 --- a/packages/components/pie-checkbox/src/index.ts +++ b/packages/components/pie-checkbox/src/index.ts @@ -1,5 +1,5 @@ import { - LitElement, html, unsafeCSS, PropertyValues, nothing, + LitElement, html, unsafeCSS, nothing, } from 'lit'; import { property, query, state } from 'lit/decorators.js'; import { ifDefined } from 'lit/directives/if-defined.js'; @@ -15,7 +15,7 @@ import { import '@justeattakeaway/pie-assistive-text'; import styles from './checkbox.scss?inline'; -import { CheckboxProps, defaultProps, statusTypes } from './defs'; +import { type CheckboxProps, defaultProps, statusTypes } from './defs'; // Valid values available to consumers export * from './defs'; diff --git a/packages/components/pie-checkbox/test/accessibility/pie-checkbox.spec.ts b/packages/components/pie-checkbox/test/accessibility/pie-checkbox.spec.ts index 5c6a62dd16..3e245d24f5 100644 --- a/packages/components/pie-checkbox/test/accessibility/pie-checkbox.spec.ts +++ b/packages/components/pie-checkbox/test/accessibility/pie-checkbox.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieCheckbox, CheckboxProps } from '../../src/index.ts'; +import { PieCheckbox, type CheckboxProps } from '../../src/index.ts'; test.describe('PieCheckbox - Accessibility tests', () => { test('a11y - should test the PieCheckbox component WCAG compliance', async ({ makeAxeBuilder, mount }) => { diff --git a/packages/components/pie-checkbox/test/component/pie-checkbox.spec.ts b/packages/components/pie-checkbox/test/component/pie-checkbox.spec.ts index 20f9825561..75dee8ee70 100644 --- a/packages/components/pie-checkbox/test/component/pie-checkbox.spec.ts +++ b/packages/components/pie-checkbox/test/component/pie-checkbox.spec.ts @@ -2,7 +2,7 @@ import { setupFormDataExtraction, getFormDataObject } from '@justeattakeaway/pie-webc-testing/src/helpers/form-helpers.ts'; import { test, expect } from '@sand4rt/experimental-ct-web'; import { PieAssistiveText } from '@justeattakeaway/pie-assistive-text'; -import { PieCheckbox, CheckboxProps } from '../../src/index.ts'; +import { PieCheckbox, type CheckboxProps } from '../../src/index.ts'; import { statusTypes } from '../../src/defs.ts'; const inputSelector = '[data-test-id="checkbox-input"]'; diff --git a/packages/components/pie-chip/src/defs-react.ts b/packages/components/pie-chip/src/defs-react.ts index 97258f7d24..2714b9afa2 100644 --- a/packages/components/pie-chip/src/defs-react.ts +++ b/packages/components/pie-chip/src/defs-react.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; /** * TODO: Verify if ReactBaseType can be set as a more specific React interface * Use the React IntrinsicElements interface to find how to map standard HTML elements to existing React Interfaces diff --git a/packages/components/pie-chip/src/index.ts b/packages/components/pie-chip/src/index.ts index 0f15233619..df568b6782 100644 --- a/packages/components/pie-chip/src/index.ts +++ b/packages/components/pie-chip/src/index.ts @@ -1,5 +1,5 @@ import { - LitElement, html, unsafeCSS, TemplateResult, nothing, + LitElement, html, unsafeCSS, type TemplateResult, nothing, } from 'lit'; import { property } from 'lit/decorators.js'; import { ifDefined } from 'lit/directives/if-defined.js'; @@ -9,7 +9,7 @@ import { } from '@justeattakeaway/pie-webc-core'; import styles from './chip.scss?inline'; import { - ChipProps, variants, ON_CHIP_CLOSE_EVENT, defaultProps, + type ChipProps, variants, ON_CHIP_CLOSE_EVENT, defaultProps, } from './defs'; import '@justeattakeaway/pie-icons-webc/dist/IconCloseCircleFilled.js'; import '@justeattakeaway/pie-spinner'; diff --git a/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts b/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts index 71bdd5f129..498146e74d 100644 --- a/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts +++ b/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieChip, ChipProps } from '../../src/index.ts'; +import { PieChip, type ChipProps } from '../../src/index.ts'; test.describe('PieChip - Accessibility tests', () => { test('a11y - should test the PieChip component WCAG compliance', async ({ makeAxeBuilder, mount }) => { diff --git a/packages/components/pie-chip/test/component/pie-chip.spec.ts b/packages/components/pie-chip/test/component/pie-chip.spec.ts index 91c58e1687..84af49c51d 100644 --- a/packages/components/pie-chip/test/component/pie-chip.spec.ts +++ b/packages/components/pie-chip/test/component/pie-chip.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@sand4rt/experimental-ct-web'; -import { PieChip, ChipProps } from '../../src/index.ts'; +import { PieChip, type ChipProps } from '../../src/index.ts'; import { ON_CHIP_CLOSE_EVENT } from '../../src/defs.ts'; const componentSelector = '[data-test-id="pie-chip"]'; diff --git a/packages/components/pie-divider/src/defs-react.ts b/packages/components/pie-divider/src/defs-react.ts index dd246fc973..c1a6c1ca70 100644 --- a/packages/components/pie-divider/src/defs-react.ts +++ b/packages/components/pie-divider/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.HTMLAttributes diff --git a/packages/components/pie-divider/src/index.ts b/packages/components/pie-divider/src/index.ts index f901c071b5..77ad5cff3e 100644 --- a/packages/components/pie-divider/src/index.ts +++ b/packages/components/pie-divider/src/index.ts @@ -3,7 +3,7 @@ import { property } from 'lit/decorators.js'; import { validPropertyValues, defineCustomElement } from '@justeattakeaway/pie-webc-core'; import styles from './divider.scss?inline'; import { - DividerProps, variants, orientations, defaultProps, + type DividerProps, variants, orientations, defaultProps, } from './defs'; // Valid values available to consumers diff --git a/packages/components/pie-divider/test/accessibility/pie-divider.spec.ts b/packages/components/pie-divider/test/accessibility/pie-divider.spec.ts index e51ceb0729..31fdb36803 100644 --- a/packages/components/pie-divider/test/accessibility/pie-divider.spec.ts +++ b/packages/components/pie-divider/test/accessibility/pie-divider.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieDivider, DividerProps } from '../../src/index.ts'; +import { PieDivider, type DividerProps } from '../../src/index.ts'; test.describe('PieDivider - Accessibility tests', () => { test('a11y - should test the PieDivider component WCAG compliance', async ({ makeAxeBuilder, mount }) => { diff --git a/packages/components/pie-divider/test/component/pie-divider.spec.ts b/packages/components/pie-divider/test/component/pie-divider.spec.ts index 2ffd2bae7a..86479051f2 100644 --- a/packages/components/pie-divider/test/component/pie-divider.spec.ts +++ b/packages/components/pie-divider/test/component/pie-divider.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@sand4rt/experimental-ct-web'; -import { PieDivider, DividerProps } from '../../src/index.ts'; +import { PieDivider, type DividerProps } from '../../src/index.ts'; const componentSelector = '[data-test-id="pie-divider"]'; diff --git a/packages/components/pie-form-label/src/defs-react.ts b/packages/components/pie-form-label/src/defs-react.ts index 1ee7736e03..71af56ea6e 100644 --- a/packages/components/pie-form-label/src/defs-react.ts +++ b/packages/components/pie-form-label/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.LabelHTMLAttributes diff --git a/packages/components/pie-form-label/src/index.ts b/packages/components/pie-form-label/src/index.ts index c9554ef3e6..ab703ef2f4 100644 --- a/packages/components/pie-form-label/src/index.ts +++ b/packages/components/pie-form-label/src/index.ts @@ -1,11 +1,11 @@ import { - LitElement, TemplateResult, html, nothing, unsafeCSS, + LitElement, type TemplateResult, html, nothing, unsafeCSS, } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; -import { RtlMixin, defineCustomElement, PIEInputElement } from '@justeattakeaway/pie-webc-core'; +import { RtlMixin, defineCustomElement, type PIEInputElement } from '@justeattakeaway/pie-webc-core'; import { property } from 'lit/decorators.js'; import styles from './form-label.scss?inline'; -import { FormLabelProps } from './defs'; +import { type FormLabelProps } from './defs'; // Valid values available to consumers export * from './defs'; diff --git a/packages/components/pie-form-label/test/accessibility/pie-form-label.spec.ts b/packages/components/pie-form-label/test/accessibility/pie-form-label.spec.ts index 2d629b8a27..0217bc7199 100644 --- a/packages/components/pie-form-label/test/accessibility/pie-form-label.spec.ts +++ b/packages/components/pie-form-label/test/accessibility/pie-form-label.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieFormLabel, FormLabelProps } from '../../src/index.ts'; +import { PieFormLabel, type FormLabelProps } from '../../src/index.ts'; test.describe('PieFormLabel - Accessibility tests', () => { test('a11y - should test the PieFormLabel component WCAG compliance', async ({ makeAxeBuilder, mount }) => { diff --git a/packages/components/pie-form-label/test/component/pie-form-label.spec.ts b/packages/components/pie-form-label/test/component/pie-form-label.spec.ts index 54c2ed81ff..3d14436887 100644 --- a/packages/components/pie-form-label/test/component/pie-form-label.spec.ts +++ b/packages/components/pie-form-label/test/component/pie-form-label.spec.ts @@ -1,7 +1,7 @@ -import { test, expect, MountOptions } from '@sand4rt/experimental-ct-web'; +import { test, expect, type MountOptions } from '@sand4rt/experimental-ct-web'; import { PieTextInput } from '@justeattakeaway/pie-text-input'; import { PieSwitch } from '@justeattakeaway/pie-switch'; -import { PieFormLabel, FormLabelProps } from '../../src/index.ts'; +import { PieFormLabel, type FormLabelProps } from '../../src/index.ts'; const componentSelector = '[data-test-id="pie-form-label"]'; diff --git a/packages/components/pie-form-label/test/visual/pie-form-label.spec.ts b/packages/components/pie-form-label/test/visual/pie-form-label.spec.ts index b7bbd8d74e..95b0b90652 100644 --- a/packages/components/pie-form-label/test/visual/pie-form-label.spec.ts +++ b/packages/components/pie-form-label/test/visual/pie-form-label.spec.ts @@ -12,7 +12,7 @@ import { createTestWebComponent, } from '@justeattakeaway/pie-webc-testing/src/helpers/rendering.ts'; import { PieFormLabel } from '../../src/index.ts'; -import { FormLabelProps } from '../../src/defs.ts'; +import { type FormLabelProps } from '../../src/defs.ts'; const renderTestPieDivider = (propVals: WebComponentPropValues) => `Label`; diff --git a/packages/components/pie-modal/src/defs-react.ts b/packages/components/pie-modal/src/defs-react.ts index c4ea8bb179..4cbb7074b1 100644 --- a/packages/components/pie-modal/src/defs-react.ts +++ b/packages/components/pie-modal/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.DialogHTMLAttributes diff --git a/packages/components/pie-modal/src/defs.ts b/packages/components/pie-modal/src/defs.ts index 80cd9515bd..1a322b4e94 100644 --- a/packages/components/pie-modal/src/defs.ts +++ b/packages/components/pie-modal/src/defs.ts @@ -1,6 +1,6 @@ import { type ComponentDefaultProps } from '@justeattakeaway/pie-webc-core'; -import { Variant } from '@justeattakeaway/pie-button/src/defs.ts'; +import { type Variant } from '@justeattakeaway/pie-button/src/defs.ts'; export const headingLevels = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const; export const sizes = ['small', 'medium', 'large'] as const; diff --git a/packages/components/pie-modal/src/index.ts b/packages/components/pie-modal/src/index.ts index 7494042a05..39df8422f4 100644 --- a/packages/components/pie-modal/src/index.ts +++ b/packages/components/pie-modal/src/index.ts @@ -1,5 +1,5 @@ import { - LitElement, nothing, TemplateResult, unsafeCSS, PropertyValues, + LitElement, nothing, type TemplateResult, unsafeCSS, type PropertyValues, } from 'lit'; import { html, unsafeStatic } from 'lit/static-html.js'; import { property, query } from 'lit/decorators.js'; diff --git a/packages/components/pie-modal/test/helpers/index.ts b/packages/components/pie-modal/test/helpers/index.ts index c48a655877..e8ae0c9d53 100644 --- a/packages/components/pie-modal/test/helpers/index.ts +++ b/packages/components/pie-modal/test/helpers/index.ts @@ -1,4 +1,4 @@ -import { ModalProps } from '../../src/defs.ts'; +import { type ModalProps } from '../../src/defs.ts'; // Renders a HTML string with the given prop values export const renderTestPieModal = ({ diff --git a/packages/components/pie-modal/test/visual/pie-modal.spec.ts b/packages/components/pie-modal/test/visual/pie-modal.spec.ts index 95001bbb65..fe0816bb85 100644 --- a/packages/components/pie-modal/test/visual/pie-modal.spec.ts +++ b/packages/components/pie-modal/test/visual/pie-modal.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@sand4rt/experimental-ct-web'; import { percyWidths } from '@justeattakeaway/pie-webc-testing/src/percy/breakpoints.ts'; import percySnapshot from '@percy/playwright'; import { PieModal } from '../../src/index.ts'; -import { ModalProps, sizes, positions } from '../../src/defs.ts'; +import { type ModalProps, sizes, positions } from '../../src/defs.ts'; const componentSelector = '[data-test-id="pie-modal"]'; const componentFooterSelector = '[data-test-id="pie-modal-footer"]'; diff --git a/packages/components/pie-notification/src/defs-react.ts b/packages/components/pie-notification/src/defs-react.ts index 27b43e5caa..9eaa52f9c4 100644 --- a/packages/components/pie-notification/src/defs-react.ts +++ b/packages/components/pie-notification/src/defs-react.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; /** * TODO: Update the React base type as soon as the notification component markup is defined * Use the React IntrinsicElements interface to find how to map standard HTML elements to existing React Interfaces diff --git a/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts b/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts index 9308bc8f67..c8b4fc205a 100644 --- a/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts +++ b/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieNotification, NotificationProps } from '../../src/index.ts'; +import { PieNotification, type NotificationProps } from '../../src/index.ts'; test.describe('PieNotification - Accessibility tests', () => { test('a11y - should test the PieNotification component WCAG compliance', async ({ makeAxeBuilder, mount }) => { diff --git a/packages/components/pie-spinner/src/defs-react.ts b/packages/components/pie-spinner/src/defs-react.ts index 2d11e0eaa5..3e2ac78ef3 100644 --- a/packages/components/pie-spinner/src/defs-react.ts +++ b/packages/components/pie-spinner/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.HTMLAttributes diff --git a/packages/components/pie-spinner/src/index.ts b/packages/components/pie-spinner/src/index.ts index 7f0113c79f..c18d4aa30b 100644 --- a/packages/components/pie-spinner/src/index.ts +++ b/packages/components/pie-spinner/src/index.ts @@ -5,7 +5,7 @@ import { property } from 'lit/decorators.js'; import { validPropertyValues, defineCustomElement } from '@justeattakeaway/pie-webc-core'; import styles from './spinner.scss?inline'; import { - SpinnerProps, + type SpinnerProps, sizes, variants, type AriaProps, diff --git a/packages/components/pie-spinner/test/accessibility/pie-spinner.spec.ts b/packages/components/pie-spinner/test/accessibility/pie-spinner.spec.ts index bcc09a26f7..606062b7a8 100644 --- a/packages/components/pie-spinner/test/accessibility/pie-spinner.spec.ts +++ b/packages/components/pie-spinner/test/accessibility/pie-spinner.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieSpinner, SpinnerProps } from '../../src/index.ts'; +import { PieSpinner, type SpinnerProps } from '../../src/index.ts'; test.describe('PieSpinner - Accessibility tests', () => { test('a11y - should test the PieSpinner component WCAG compliance', async ({ makeAxeBuilder, mount }) => { diff --git a/packages/components/pie-switch/src/defs-react.ts b/packages/components/pie-switch/src/defs-react.ts index 2cbcb3a6d7..f4a0d157f6 100644 --- a/packages/components/pie-switch/src/defs-react.ts +++ b/packages/components/pie-switch/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.InputHTMLAttributes diff --git a/packages/components/pie-switch/src/index.ts b/packages/components/pie-switch/src/index.ts index 5ca99f66a0..44f1550c21 100644 --- a/packages/components/pie-switch/src/index.ts +++ b/packages/components/pie-switch/src/index.ts @@ -1,13 +1,13 @@ import { - LitElement, html, unsafeCSS, nothing, TemplateResult, PropertyValues, + LitElement, html, unsafeCSS, nothing, type TemplateResult, type PropertyValues, } from 'lit'; import { property, query } from 'lit/decorators.js'; import { - RtlMixin, validPropertyValues, defineCustomElement, FormControlMixin, wrapNativeEvent, PIEInputElement, + RtlMixin, validPropertyValues, defineCustomElement, FormControlMixin, wrapNativeEvent, type PIEInputElement, } from '@justeattakeaway/pie-webc-core'; import styles from './switch.scss?inline'; import { - SwitchProps, AriaProps, labelPlacements, defaultProps, + type SwitchProps, type AriaProps, labelPlacements, defaultProps, } from './defs'; import 'element-internals-polyfill'; import '@justeattakeaway/pie-icons-webc/dist/IconCheck.js'; diff --git a/packages/components/pie-switch/test/component/pie-switch.spec.ts b/packages/components/pie-switch/test/component/pie-switch.spec.ts index 6d6ca32708..5a54d2fcf8 100644 --- a/packages/components/pie-switch/test/component/pie-switch.spec.ts +++ b/packages/components/pie-switch/test/component/pie-switch.spec.ts @@ -1,7 +1,7 @@ import { test, expect } from '@sand4rt/experimental-ct-web'; import { PieSwitch } from '../../src/index.ts'; import { - SwitchProps, + type SwitchProps, type LabelPlacement, labelPlacements, ON_SWITCH_CHANGED_EVENT, diff --git a/packages/components/pie-switch/test/visual/pie-switch.spec.ts b/packages/components/pie-switch/test/visual/pie-switch.spec.ts index 5ed230b32b..c09edf31e2 100644 --- a/packages/components/pie-switch/test/visual/pie-switch.spec.ts +++ b/packages/components/pie-switch/test/visual/pie-switch.spec.ts @@ -3,7 +3,7 @@ import percySnapshot from '@percy/playwright'; import { percyWidths } from '@justeattakeaway/pie-webc-testing/src/percy/breakpoints.ts'; import { setRTL } from '@justeattakeaway/pie-webc-testing/src/helpers/set-rtl-direction.ts'; import { PieSwitch } from '../../src/index.ts'; -import { SwitchProps, labelPlacements } from '../../src/defs.ts'; +import { type SwitchProps, labelPlacements } from '../../src/defs.ts'; [ [false, false], diff --git a/packages/components/pie-tag/src/defs-react.ts b/packages/components/pie-tag/src/defs-react.ts index e497429733..431e300510 100644 --- a/packages/components/pie-tag/src/defs-react.ts +++ b/packages/components/pie-tag/src/defs-react.ts @@ -1,3 +1,3 @@ -import React from 'react'; +import type React from 'react'; export type ReactBaseType = React.HTMLAttributes diff --git a/packages/components/pie-tag/src/index.ts b/packages/components/pie-tag/src/index.ts index 449260f734..9e3ad18a2b 100644 --- a/packages/components/pie-tag/src/index.ts +++ b/packages/components/pie-tag/src/index.ts @@ -5,7 +5,7 @@ import { property } from 'lit/decorators.js'; import { validPropertyValues, defineCustomElement } from '@justeattakeaway/pie-webc-core'; import styles from './tag.scss?inline'; import { - TagProps, variants, sizes, defaultProps, + type TagProps, variants, sizes, defaultProps, } from './defs'; // Valid values available to consumers diff --git a/packages/components/pie-tag/test/accessibility/pie-tag.spec.ts b/packages/components/pie-tag/test/accessibility/pie-tag.spec.ts index a75e149d61..9bc69b9f48 100644 --- a/packages/components/pie-tag/test/accessibility/pie-tag.spec.ts +++ b/packages/components/pie-tag/test/accessibility/pie-tag.spec.ts @@ -1,7 +1,7 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; import { getAllPropCombinations, splitCombinationsByPropertyValue } from '@justeattakeaway/pie-webc-testing/src/helpers/get-all-prop-combos.ts'; -import { PropObject, WebComponentPropValues } from '@justeattakeaway/pie-webc-testing/src/helpers/defs.ts'; +import { type PropObject, type WebComponentPropValues } from '@justeattakeaway/pie-webc-testing/src/helpers/defs.ts'; import { PieTag } from '../../src/index.ts'; import { sizes, variants } from '../../src/defs.ts'; diff --git a/packages/components/pie-tag/test/component/pie-tag.spec.ts b/packages/components/pie-tag/test/component/pie-tag.spec.ts index cc1e062437..ac97eda7d0 100644 --- a/packages/components/pie-tag/test/component/pie-tag.spec.ts +++ b/packages/components/pie-tag/test/component/pie-tag.spec.ts @@ -1,6 +1,6 @@ import { getShadowElementStylePropValues } from '@justeattakeaway/pie-webc-testing/src/helpers/get-shadow-element-style-prop-values.ts'; import { test, expect } from '@sand4rt/experimental-ct-web'; -import { PieTag, TagProps } from '../../src/index.ts'; +import { PieTag, type TagProps } from '../../src/index.ts'; const componentSelector = '[data-test-id="pie-tag"]'; const tagIconSelector = '[data-test-id="tag-icon"]'; diff --git a/packages/components/pie-webc-core/src/mixins/rtl/rtlMixin.ts b/packages/components/pie-webc-core/src/mixins/rtl/rtlMixin.ts index 67ab3e3250..d71aca64b3 100644 --- a/packages/components/pie-webc-core/src/mixins/rtl/rtlMixin.ts +++ b/packages/components/pie-webc-core/src/mixins/rtl/rtlMixin.ts @@ -1,5 +1,5 @@ /* eslint-disable max-classes-per-file */ -import { LitElement, isServer } from 'lit'; +import { type LitElement, isServer } from 'lit'; import type { GenericConstructor } from '../types/GenericConstructor'; /** diff --git a/packages/tools/generator-pie-component/src/app/templates/src/defs-react.ts b/packages/tools/generator-pie-component/src/app/templates/src/defs-react.ts index 97258f7d24..2714b9afa2 100644 --- a/packages/tools/generator-pie-component/src/app/templates/src/defs-react.ts +++ b/packages/tools/generator-pie-component/src/app/templates/src/defs-react.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; /** * TODO: Verify if ReactBaseType can be set as a more specific React interface * Use the React IntrinsicElements interface to find how to map standard HTML elements to existing React Interfaces diff --git a/packages/tools/generator-pie-component/src/app/types.ts b/packages/tools/generator-pie-component/src/app/types.ts index 0cfd4f570a..a1aed3434f 100644 --- a/packages/tools/generator-pie-component/src/app/types.ts +++ b/packages/tools/generator-pie-component/src/app/types.ts @@ -1,4 +1,4 @@ -import { Answers } from 'yeoman-generator'; +import { type Answers } from 'yeoman-generator'; export type TransformedName = { componentName: string; diff --git a/packages/tools/generator-pie-component/src/app/utils.ts b/packages/tools/generator-pie-component/src/app/utils.ts index 35a5187d6d..7e3a15c214 100644 --- a/packages/tools/generator-pie-component/src/app/utils.ts +++ b/packages/tools/generator-pie-component/src/app/utils.ts @@ -1,5 +1,5 @@ import { startCase, snakeCase, camelCase } from 'lodash'; -import { TransformedName } from './types'; +import { type TransformedName } from './types'; function trim (str: string) { return str.replace(/\s/g, ''); diff --git a/yarn.lock b/yarn.lock index e05de7ba38..b48cfd152d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39142,8 +39142,6 @@ __metadata: "@babel/plugin-transform-runtime": 7.24.3 "@babel/preset-env": 7.24.5 "@babel/preset-react": 7.24.1 - "@justeattakeaway/pie-button": 0.47.8 - "@justeattakeaway/pie-cookie-banner": 0.21.0 "@justeattakeaway/pie-css": 0.12.1 "@justeattakeaway/pie-webc": 0.5.13 "@lit/react": 1.0.2 From 031a48716deb7433a5f55c91e5cd17446c1bcd00 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Thu, 25 Jul 2024 11:04:27 +0100 Subject: [PATCH 03/14] Changes from self-review --- .changeset/heavy-phones-talk.md | 29 +++++++++++++------ .../components/pie-cookie-banner/src/defs.ts | 5 +--- .../src/localisation-utils.ts | 4 +-- .../src/app/templates/src/index.ts | 2 +- .../accessibility/pie-placeholder.__spec__.ts | 2 +- .../component/pie-placeholder.__spec__.ts | 2 +- .../test/visual/pie-placeholder.__spec__.ts | 2 +- packages/tools/pie-wrapper-react/README.md | 2 +- .../scripts/add-react-wrapper.js | 2 +- 9 files changed, 28 insertions(+), 22 deletions(-) diff --git a/.changeset/heavy-phones-talk.md b/.changeset/heavy-phones-talk.md index eda72e050e..619213e581 100644 --- a/.changeset/heavy-phones-talk.md +++ b/.changeset/heavy-phones-talk.md @@ -1,19 +1,30 @@ --- -"@justeattakeaway/pie-assistive-text": patch -"@justeattakeaway/pie-checkbox-group": patch "@justeattakeaway/generator-pie-component": patch -"@justeattakeaway/pie-notification": patch -"@justeattakeaway/pie-form-label": patch -"@justeattakeaway/pie-webc-core": patch +"@justeattakeaway/pie-assistive-text": patch +"@justeattakeaway/pie-button": patch +"@justeattakeaway/pie-card": patch "@justeattakeaway/pie-checkbox": patch +"@justeattakeaway/pie-checkbox-group": patch +"@justeattakeaway/pie-chip": patch +"@justeattakeaway/pie-cookie-banner": patch +"@justeattakeaway/pie-css": patch "@justeattakeaway/pie-divider": patch +"@justeattakeaway/pie-form-label": patch +"@justeattakeaway/pie-icon-button": patch +"@justeattakeaway/pie-icons-react": patch +"@justeattakeaway/pie-icons-vue": patch +"@justeattakeaway/pie-link": patch +"@justeattakeaway/pie-modal": patch +"@justeattakeaway/pie-notification": patch "@justeattakeaway/pie-spinner": patch -"@justeattakeaway/pie-button": patch "@justeattakeaway/pie-switch": patch -"@justeattakeaway/pie-modal": patch -"@justeattakeaway/pie-card": patch -"@justeattakeaway/pie-chip": patch "@justeattakeaway/pie-tag": patch +"@justeattakeaway/pie-text-input": patch +"@justeattakeaway/pie-textarea": patch +"@justeattakeaway/pie-toast": patch +"@justeattakeaway/pie-webc-core": patch +"@justeattakeaway/pie-webc-testing": patch +"@justeattakeaway/pie-wrapper-react": patch "pie-storybook": patch --- diff --git a/packages/components/pie-cookie-banner/src/defs.ts b/packages/components/pie-cookie-banner/src/defs.ts index 87f6c5b28c..1cadc308b2 100644 --- a/packages/components/pie-cookie-banner/src/defs.ts +++ b/packages/components/pie-cookie-banner/src/defs.ts @@ -1,9 +1,6 @@ +import { type TemplateResult } from 'lit'; import { type ComponentDefaultProps } from '@justeattakeaway/pie-webc-core'; -import { - type TemplateResult, -} from 'lit'; - export interface CookieBannerLocale { banner: { title: string; diff --git a/packages/components/pie-cookie-banner/src/localisation-utils.ts b/packages/components/pie-cookie-banner/src/localisation-utils.ts index 2289dcf0cc..0383331a17 100644 --- a/packages/components/pie-cookie-banner/src/localisation-utils.ts +++ b/packages/components/pie-cookie-banner/src/localisation-utils.ts @@ -1,6 +1,4 @@ -import { - type TemplateResult, -} from 'lit'; +import { type TemplateResult } from 'lit'; import { type CookieBannerLocale, diff --git a/packages/tools/generator-pie-component/src/app/templates/src/index.ts b/packages/tools/generator-pie-component/src/app/templates/src/index.ts index 0d5f535282..596258eed6 100644 --- a/packages/tools/generator-pie-component/src/app/templates/src/index.ts +++ b/packages/tools/generator-pie-component/src/app/templates/src/index.ts @@ -2,7 +2,7 @@ import { LitElement, html, unsafeCSS } from 'lit'; <% if (needsRTL) { %>import { RtlMixin, defineCustomElement } from '@justeattakeaway/pie-webc-core';<% } %> <% if (!needsRTL) { %>import { defineCustomElement } from '@justeattakeaway/pie-webc-core';<% } %> import styles from './<%= fileName %>.scss?inline'; -import { <%= componentName %>Props } from './defs'; +import { type <%= componentName %>Props } from './defs'; // Valid values available to consumers export * from './defs'; diff --git a/packages/tools/generator-pie-component/src/app/templates/test/accessibility/pie-placeholder.__spec__.ts b/packages/tools/generator-pie-component/src/app/templates/test/accessibility/pie-placeholder.__spec__.ts index 8478071c9f..a779e0ae27 100644 --- a/packages/tools/generator-pie-component/src/app/templates/test/accessibility/pie-placeholder.__spec__.ts +++ b/packages/tools/generator-pie-component/src/app/templates/test/accessibility/pie-placeholder.__spec__.ts @@ -1,6 +1,6 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { Pie<%= componentName %>, <%= componentName %>Props } from '../../src/index.ts'; +import { Pie<%= componentName %>, type <%= componentName %>Props } from '../../src/index.ts'; test.describe('Pie<%= componentName %> - Accessibility tests', () => { test('a11y - should test the Pie<%= componentName %> component WCAG compliance', async ({ makeAxeBuilder, mount }) => { diff --git a/packages/tools/generator-pie-component/src/app/templates/test/component/pie-placeholder.__spec__.ts b/packages/tools/generator-pie-component/src/app/templates/test/component/pie-placeholder.__spec__.ts index 31a2f0c27a..0837b77feb 100644 --- a/packages/tools/generator-pie-component/src/app/templates/test/component/pie-placeholder.__spec__.ts +++ b/packages/tools/generator-pie-component/src/app/templates/test/component/pie-placeholder.__spec__.ts @@ -1,6 +1,6 @@ import { test, expect } from '@sand4rt/experimental-ct-web'; -import { Pie<%= componentName %>, <%= componentName %>Props } from '../../src/index.ts'; +import { Pie<%= componentName %>, type <%= componentName %>Props } from '../../src/index.ts'; const componentSelector = '[data-test-id="pie-<%= fileName %>"]'; diff --git a/packages/tools/generator-pie-component/src/app/templates/test/visual/pie-placeholder.__spec__.ts b/packages/tools/generator-pie-component/src/app/templates/test/visual/pie-placeholder.__spec__.ts index 1f474520c0..0b2726ffc4 100644 --- a/packages/tools/generator-pie-component/src/app/templates/test/visual/pie-placeholder.__spec__.ts +++ b/packages/tools/generator-pie-component/src/app/templates/test/visual/pie-placeholder.__spec__.ts @@ -1,7 +1,7 @@ import { test } from '@sand4rt/experimental-ct-web'; import percySnapshot from '@percy/playwright'; -import { Pie<%= componentName %>, <%= componentName %>Props } from '../../src/index.ts'; +import { Pie<%= componentName %>, type <%= componentName %>Props } from '../../src/index.ts'; test.describe('Pie<%= componentName %> - Visual tests`', () => { test('should display the Pie<%= componentName %> component successfully', async ({ page, mount }) => { diff --git a/packages/tools/pie-wrapper-react/README.md b/packages/tools/pie-wrapper-react/README.md index 88d8730f79..efd79940e7 100644 --- a/packages/tools/pie-wrapper-react/README.md +++ b/packages/tools/pie-wrapper-react/README.md @@ -105,7 +105,7 @@ With this package, the below code (example of `pie-button`) is automatically gen import * as React from 'react'; import { createComponent } from '@lit/react'; import { PieButton as PieButtonLit } from './index'; -import { ButtonProps } from './defs'; +import { type ButtonProps } from './defs'; const PieButtonReact = createComponent({ displayName: 'PieButton', diff --git a/packages/tools/pie-wrapper-react/scripts/add-react-wrapper.js b/packages/tools/pie-wrapper-react/scripts/add-react-wrapper.js index 023fe53599..c13d61cf71 100755 --- a/packages/tools/pie-wrapper-react/scripts/add-react-wrapper.js +++ b/packages/tools/pie-wrapper-react/scripts/add-react-wrapper.js @@ -190,7 +190,7 @@ export function addReactWrapper (customElementsObject) { componentSrc = `import * as React from 'react'; import { createComponent${component.class.events?.length > 0 ? ', type EventName' : ''} } from '@lit/react'; import { ${component.class.name} as ${component.class.name}Lit } from './index'; -import { ${componentPropsExportName} } from './defs'; +import { type ${componentPropsExportName} } from './defs'; export * from './defs'; From 39d883ff2dce8f0cb9c8c5e176445824d317b9be Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Fri, 26 Jul 2024 10:39:19 +0100 Subject: [PATCH 04/14] Remove unused import --- .../stories/pie-form-label.stories.ts | 2 +- yarn.lock | 129 +++++------------- 2 files changed, 34 insertions(+), 97 deletions(-) diff --git a/apps/pie-storybook/stories/pie-form-label.stories.ts b/apps/pie-storybook/stories/pie-form-label.stories.ts index caa61c31a1..ec94852202 100644 --- a/apps/pie-storybook/stories/pie-form-label.stories.ts +++ b/apps/pie-storybook/stories/pie-form-label.stories.ts @@ -1,4 +1,4 @@ -import { html, nothing } from 'lit'; +import { html } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; /* eslint-disable import/no-duplicates */ diff --git a/yarn.lock b/yarn.lock index 575bda55a2..01ba8237e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5277,7 +5277,7 @@ __metadata: languageName: unknown linkType: soft -"@justeattakeaway/pie-button@0.47.8, @justeattakeaway/pie-button@workspace:packages/components/pie-button": +"@justeattakeaway/pie-button@0.48.0, @justeattakeaway/pie-button@workspace:packages/components/pie-button": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-button@workspace:packages/components/pie-button" dependencies: @@ -5303,7 +5303,7 @@ __metadata: languageName: unknown linkType: soft -"@justeattakeaway/pie-checkbox-group@0.2.0, @justeattakeaway/pie-checkbox-group@workspace:packages/components/pie-checkbox-group": +"@justeattakeaway/pie-checkbox-group@0.3.0, @justeattakeaway/pie-checkbox-group@workspace:packages/components/pie-checkbox-group": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-checkbox-group@workspace:packages/components/pie-checkbox-group" dependencies: @@ -5315,16 +5315,7 @@ __metadata: languageName: unknown linkType: soft -"@justeattakeaway/pie-checkbox-group@npm:0.1.0": - version: 0.1.0 - resolution: "@justeattakeaway/pie-checkbox-group@npm:0.1.0" - dependencies: - "@justeattakeaway/pie-webc-core": 0.24.0 - checksum: 69880b2b6246610f9a0939b76a6f2490c5e66236826c80d4778b48e98d3a3e10c38187226c62514d6662e221e1fdca49005d3abddae47d0c3bfcaaf5a168aa45 - languageName: node - linkType: hard - -"@justeattakeaway/pie-checkbox@0.8.0, @justeattakeaway/pie-checkbox@workspace:packages/components/pie-checkbox": +"@justeattakeaway/pie-checkbox@0.9.0, @justeattakeaway/pie-checkbox@workspace:packages/components/pie-checkbox": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-checkbox@workspace:packages/components/pie-checkbox" dependencies: @@ -5336,16 +5327,6 @@ __metadata: languageName: unknown linkType: soft -"@justeattakeaway/pie-checkbox@npm:0.7.1": - version: 0.7.1 - resolution: "@justeattakeaway/pie-checkbox@npm:0.7.1" - dependencies: - "@justeattakeaway/pie-assistive-text": 0.5.1 - "@justeattakeaway/pie-webc-core": 0.24.0 - checksum: 81e8ec89d8ac719753d1060e73d2fbe0d22c8813306ba4b5b314a6191b890aca6adf536e4f3163ab7519f5cd8aa2fe0f982289b75b37ca2c50a9f59935c2495b - languageName: node - linkType: hard - "@justeattakeaway/pie-chip@0.7.1, @justeattakeaway/pie-chip@workspace:packages/components/pie-chip": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-chip@workspace:packages/components/pie-chip" @@ -5371,40 +5352,25 @@ __metadata: languageName: unknown linkType: soft -"@justeattakeaway/pie-cookie-banner@0.22.0, @justeattakeaway/pie-cookie-banner@workspace:packages/components/pie-cookie-banner": +"@justeattakeaway/pie-cookie-banner@0.22.1, @justeattakeaway/pie-cookie-banner@workspace:packages/components/pie-cookie-banner": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-cookie-banner@workspace:packages/components/pie-cookie-banner" dependencies: "@custom-elements-manifest/analyzer": 0.9.0 "@justeat/pie-design-tokens": 6.3.1 - "@justeattakeaway/pie-button": 0.47.8 + "@justeattakeaway/pie-button": 0.48.0 "@justeattakeaway/pie-components-config": 0.16.0 "@justeattakeaway/pie-divider": 0.13.7 "@justeattakeaway/pie-icon-button": 0.28.9 "@justeattakeaway/pie-link": 0.17.7 - "@justeattakeaway/pie-modal": 0.43.4 - "@justeattakeaway/pie-switch": 0.29.10 + "@justeattakeaway/pie-modal": 0.43.5 + "@justeattakeaway/pie-switch": 0.29.11 "@justeattakeaway/pie-webc-core": 0.24.0 "@justeattakeaway/pie-wrapper-react": 0.14.1 cem-plugin-module-file-extensions: 0.0.5 languageName: unknown linkType: soft -"@justeattakeaway/pie-cookie-banner@npm:0.21.0": - version: 0.21.0 - resolution: "@justeattakeaway/pie-cookie-banner@npm:0.21.0" - dependencies: - "@justeattakeaway/pie-button": 0.47.8 - "@justeattakeaway/pie-divider": 0.13.7 - "@justeattakeaway/pie-icon-button": 0.28.9 - "@justeattakeaway/pie-link": 0.17.7 - "@justeattakeaway/pie-modal": 0.43.4 - "@justeattakeaway/pie-switch": 0.29.10 - "@justeattakeaway/pie-webc-core": 0.24.0 - checksum: 77f6b404d43b33653a96f2d4ec91fd355cd318ee9ddd653993ef0fd0a6138adcfde98fc384b930b7d0479e71728cf6225fcb7216bb3ff8c2df3d697e9490ec3c - languageName: node - linkType: hard - "@justeattakeaway/pie-css@0.12.1, @justeattakeaway/pie-css@workspace:packages/tools/pie-css": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-css@workspace:packages/tools/pie-css" @@ -5435,7 +5401,7 @@ __metadata: dependencies: "@custom-elements-manifest/analyzer": 0.9.0 "@justeattakeaway/pie-components-config": 0.16.0 - "@justeattakeaway/pie-switch": 0.29.10 + "@justeattakeaway/pie-switch": 0.29.11 "@justeattakeaway/pie-text-input": 0.23.1 "@justeattakeaway/pie-webc-core": 0.24.0 "@justeattakeaway/pie-wrapper-react": 0.14.1 @@ -5559,13 +5525,13 @@ __metadata: languageName: unknown linkType: soft -"@justeattakeaway/pie-modal@0.43.4, @justeattakeaway/pie-modal@workspace:packages/components/pie-modal": +"@justeattakeaway/pie-modal@0.43.5, @justeattakeaway/pie-modal@workspace:packages/components/pie-modal": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-modal@workspace:packages/components/pie-modal" dependencies: "@custom-elements-manifest/analyzer": 0.9.0 "@justeat/pie-design-tokens": 6.3.1 - "@justeattakeaway/pie-button": 0.47.8 + "@justeattakeaway/pie-button": 0.48.0 "@justeattakeaway/pie-components-config": 0.16.0 "@justeattakeaway/pie-icon-button": 0.28.9 "@justeattakeaway/pie-icons-webc": 0.24.2 @@ -5605,7 +5571,7 @@ __metadata: languageName: unknown linkType: soft -"@justeattakeaway/pie-switch@0.29.10, @justeattakeaway/pie-switch@workspace:packages/components/pie-switch": +"@justeattakeaway/pie-switch@0.29.11, @justeattakeaway/pie-switch@workspace:packages/components/pie-switch": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-switch@workspace:packages/components/pie-switch" dependencies: @@ -5689,26 +5655,26 @@ __metadata: languageName: unknown linkType: soft -"@justeattakeaway/pie-webc@0.5.14, @justeattakeaway/pie-webc@workspace:packages/components/pie-webc": +"@justeattakeaway/pie-webc@0.5.15, @justeattakeaway/pie-webc@workspace:packages/components/pie-webc": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-webc@workspace:packages/components/pie-webc" dependencies: "@justeattakeaway/pie-assistive-text": 0.5.1 - "@justeattakeaway/pie-button": 0.47.8 + "@justeattakeaway/pie-button": 0.48.0 "@justeattakeaway/pie-card": 0.19.7 - "@justeattakeaway/pie-checkbox": 0.8.0 - "@justeattakeaway/pie-checkbox-group": 0.2.0 + "@justeattakeaway/pie-checkbox": 0.9.0 + "@justeattakeaway/pie-checkbox-group": 0.3.0 "@justeattakeaway/pie-chip": 0.7.1 "@justeattakeaway/pie-components-config": 0.16.0 - "@justeattakeaway/pie-cookie-banner": 0.22.0 + "@justeattakeaway/pie-cookie-banner": 0.22.1 "@justeattakeaway/pie-divider": 0.13.7 "@justeattakeaway/pie-form-label": 0.13.6 "@justeattakeaway/pie-icon-button": 0.28.9 "@justeattakeaway/pie-link": 0.17.7 - "@justeattakeaway/pie-modal": 0.43.4 + "@justeattakeaway/pie-modal": 0.43.5 "@justeattakeaway/pie-notification": 0.9.3 "@justeattakeaway/pie-spinner": 0.6.6 - "@justeattakeaway/pie-switch": 0.29.10 + "@justeattakeaway/pie-switch": 0.29.11 "@justeattakeaway/pie-tag": 0.9.8 "@justeattakeaway/pie-text-input": 0.23.1 "@justeattakeaway/pie-textarea": 0.4.0 @@ -5719,35 +5685,6 @@ __metadata: languageName: unknown linkType: soft -"@justeattakeaway/pie-webc@npm:0.5.13": - version: 0.5.13 - resolution: "@justeattakeaway/pie-webc@npm:0.5.13" - dependencies: - "@justeattakeaway/pie-assistive-text": 0.5.1 - "@justeattakeaway/pie-button": 0.47.8 - "@justeattakeaway/pie-card": 0.19.7 - "@justeattakeaway/pie-checkbox": 0.7.1 - "@justeattakeaway/pie-checkbox-group": 0.1.0 - "@justeattakeaway/pie-chip": 0.7.1 - "@justeattakeaway/pie-cookie-banner": 0.21.0 - "@justeattakeaway/pie-divider": 0.13.7 - "@justeattakeaway/pie-form-label": 0.13.6 - "@justeattakeaway/pie-icon-button": 0.28.9 - "@justeattakeaway/pie-link": 0.17.7 - "@justeattakeaway/pie-modal": 0.43.4 - "@justeattakeaway/pie-notification": 0.9.3 - "@justeattakeaway/pie-spinner": 0.6.6 - "@justeattakeaway/pie-switch": 0.29.10 - "@justeattakeaway/pie-tag": 0.9.8 - "@justeattakeaway/pie-text-input": 0.23.1 - "@justeattakeaway/pie-textarea": 0.4.0 - "@justeattakeaway/pie-toast": 0.1.1 - bin: - add-components: src/index.js - checksum: 85f02764232dee61d10e4929b63fe52928160a483e289ea788360645dc4a681661c05147ec5c7c64f7d350318c5f8d5331b8263a73b0f9a4dd6d5c5766861f30 - languageName: node - linkType: hard - "@justeattakeaway/pie-wrapper-react@0.14.1, @justeattakeaway/pie-wrapper-react@workspace:packages/tools/pie-wrapper-react": version: 0.0.0-use.local resolution: "@justeattakeaway/pie-wrapper-react@workspace:packages/tools/pie-wrapper-react" @@ -27718,12 +27655,12 @@ __metadata: dependencies: "@justeat/pie-design-tokens": 6.3.1 "@justeattakeaway/pie-assistive-text": 0.5.1 - "@justeattakeaway/pie-button": 0.47.8 + "@justeattakeaway/pie-button": 0.48.0 "@justeattakeaway/pie-card": 0.19.7 - "@justeattakeaway/pie-checkbox": 0.8.0 - "@justeattakeaway/pie-checkbox-group": 0.2.0 + "@justeattakeaway/pie-checkbox": 0.9.0 + "@justeattakeaway/pie-checkbox-group": 0.3.0 "@justeattakeaway/pie-chip": 0.7.1 - "@justeattakeaway/pie-cookie-banner": 0.22.0 + "@justeattakeaway/pie-cookie-banner": 0.22.1 "@justeattakeaway/pie-css": 0.12.1 "@justeattakeaway/pie-divider": 0.13.7 "@justeattakeaway/pie-form-label": 0.13.6 @@ -27731,10 +27668,10 @@ __metadata: "@justeattakeaway/pie-icons-configs": 4.5.1 "@justeattakeaway/pie-icons-webc": 0.24.2 "@justeattakeaway/pie-link": 0.17.7 - "@justeattakeaway/pie-modal": 0.43.4 + "@justeattakeaway/pie-modal": 0.43.5 "@justeattakeaway/pie-notification": 0.9.3 "@justeattakeaway/pie-spinner": 0.6.6 - "@justeattakeaway/pie-switch": 0.29.10 + "@justeattakeaway/pie-switch": 0.29.11 "@justeattakeaway/pie-tag": 0.9.8 "@justeattakeaway/pie-text-input": 0.23.1 "@justeattakeaway/pie-textarea": 0.4.0 @@ -35778,7 +35715,7 @@ __metadata: "@angular/platform-browser-dynamic": 15.2.0 "@angular/router": 15.2.0 "@justeattakeaway/pie-css": 0.12.1 - "@justeattakeaway/pie-webc": 0.5.14 + "@justeattakeaway/pie-webc": 0.5.15 rxjs: 7.8.0 tslib: 2.3.0 typescript: 4.9.4 @@ -35795,7 +35732,7 @@ __metadata: "@babel/preset-env": 7.24.5 "@babel/preset-react": 7.24.1 "@justeattakeaway/pie-css": 0.12.1 - "@justeattakeaway/pie-webc": 0.5.14 + "@justeattakeaway/pie-webc": 0.5.15 "@lit/react": 1.0.2 babel-loader: 8 eslint: 8.37.0 @@ -35812,7 +35749,7 @@ __metadata: resolution: "wc-next13@workspace:apps/examples/wc-next13" dependencies: "@justeattakeaway/pie-css": 0.12.1 - "@justeattakeaway/pie-webc": 0.5.14 + "@justeattakeaway/pie-webc": 0.5.15 "@lit-labs/nextjs": 0.2.0 "@lit/react": 1.0.5 "@types/react": 18.3.3 @@ -35835,7 +35772,7 @@ __metadata: dependencies: "@babel/preset-env": 7.24.5 "@justeattakeaway/pie-css": 0.12.1 - "@justeattakeaway/pie-webc": 0.5.14 + "@justeattakeaway/pie-webc": 0.5.15 babel-loader: 8 core-js: 3.30.0 nuxt: 2.17.0 @@ -35850,7 +35787,7 @@ __metadata: resolution: "wc-nuxt3@workspace:apps/examples/wc-nuxt3" dependencies: "@justeattakeaway/pie-css": 0.12.1 - "@justeattakeaway/pie-webc": 0.5.14 + "@justeattakeaway/pie-webc": 0.5.15 "@types/node": 18 nuxt: 3.4.3 nuxt-ssr-lit: 1.6.5 @@ -35862,7 +35799,7 @@ __metadata: resolution: "wc-react17@workspace:apps/examples/wc-react17" dependencies: "@justeattakeaway/pie-css": 0.12.1 - "@justeattakeaway/pie-webc": 0.5.13 + "@justeattakeaway/pie-webc": 0.5.15 "@lit/react": 1.0.5 "@types/react": ^17.0.2 "@types/react-dom": ^17.0.2 @@ -35882,7 +35819,7 @@ __metadata: resolution: "wc-react18@workspace:apps/examples/wc-react18" dependencies: "@justeattakeaway/pie-css": 0.12.1 - "@justeattakeaway/pie-webc": 0.5.13 + "@justeattakeaway/pie-webc": 0.5.15 "@lit/react": 1.0.5 "@types/react": 18.3.3 "@types/react-dom": 18.3.0 @@ -35904,7 +35841,7 @@ __metadata: "@justeat/pie-design-tokens": 6.3.1 "@justeattakeaway/pie-css": 0.12.1 "@justeattakeaway/pie-icons-webc": 0.24.2 - "@justeattakeaway/pie-webc": 0.5.14 + "@justeattakeaway/pie-webc": 0.5.15 vite: 4.5.3 languageName: unknown linkType: soft @@ -35914,7 +35851,7 @@ __metadata: resolution: "wc-vue3@workspace:apps/examples/wc-vue3" dependencies: "@justeattakeaway/pie-css": 0.12.1 - "@justeattakeaway/pie-webc": 0.5.14 + "@justeattakeaway/pie-webc": 0.5.15 "@types/node": 18.15.11 "@vitejs/plugin-vue": 4.0.0 "@vue/tsconfig": 0.1.3 From 07acaadbaa2bb5f1c98658341a644ac84ed72080 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Fri, 26 Jul 2024 11:26:53 +0100 Subject: [PATCH 05/14] Align eslint version --- package.json | 2 +- packages/tools/pie-icons-vue/.eslintignore | 1 - packages/tools/pie-icons-vue/package.json | 2 +- yarn.lock | 61 ++-------------------- 4 files changed, 5 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index d19bfc1345..33bf9d034a 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "cz-customizable": "7.2.1", "danger": "11.3.0", "dree": "3.4.5", - "eslint": "8.56.0", + "eslint": "8.57.0", "eslint-plugin-import": "2.27.5", "eslint-plugin-json-format": "2.0.1", "eslint-plugin-vitest": "0.3.22", diff --git a/packages/tools/pie-icons-vue/.eslintignore b/packages/tools/pie-icons-vue/.eslintignore index aae73804be..a255f3435e 100644 --- a/packages/tools/pie-icons-vue/.eslintignore +++ b/packages/tools/pie-icons-vue/.eslintignore @@ -3,4 +3,3 @@ dist coverage example generated -icons diff --git a/packages/tools/pie-icons-vue/package.json b/packages/tools/pie-icons-vue/package.json index 41560618f3..0ed996872d 100644 --- a/packages/tools/pie-icons-vue/package.json +++ b/packages/tools/pie-icons-vue/package.json @@ -60,7 +60,7 @@ "@rollup/plugin-commonjs": "25.0.8", "@vue/babel-preset-jsx": "1.4.0", "@vue/test-utils": "1.1.3", - "eslint": "8.37.0", + "eslint": "8.57.0", "eslint-plugin-vue": "^9.9.0", "fs-extra": "9.1.0", "lodash.kebabcase": "4.1.1", diff --git a/yarn.lock b/yarn.lock index 01ba8237e9..6cf8cf6fe4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4832,13 +4832,6 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.56.0": - version: 8.56.0 - resolution: "@eslint/js@npm:8.56.0" - checksum: 5804130574ef810207bdf321c265437814e7a26f4e6fac9b496de3206afd52f533e09ec002a3be06cd9adcc9da63e727f1883938e663c4e4751c007d5b58e539 - languageName: node - linkType: hard - "@eslint/js@npm:8.57.0": version: 8.57.0 resolution: "@eslint/js@npm:8.57.0" @@ -5004,7 +4997,7 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.13, @humanwhocodes/config-array@npm:^0.11.14, @humanwhocodes/config-array@npm:^0.11.8": +"@humanwhocodes/config-array@npm:^0.11.14, @humanwhocodes/config-array@npm:^0.11.8": version: 0.11.14 resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: @@ -5464,7 +5457,7 @@ __metadata: "@vue/babel-helper-vue-jsx-merge-props": 1.4.0 "@vue/babel-preset-jsx": 1.4.0 "@vue/test-utils": 1.1.3 - eslint: 8.37.0 + eslint: 8.57.0 eslint-plugin-vue: ^9.9.0 fs-extra: 9.1.0 lodash.kebabcase: 4.1.1 @@ -18892,54 +18885,6 @@ __metadata: languageName: node linkType: hard -"eslint@npm:8.56.0": - version: 8.56.0 - resolution: "eslint@npm:8.56.0" - dependencies: - "@eslint-community/eslint-utils": ^4.2.0 - "@eslint-community/regexpp": ^4.6.1 - "@eslint/eslintrc": ^2.1.4 - "@eslint/js": 8.56.0 - "@humanwhocodes/config-array": ^0.11.13 - "@humanwhocodes/module-importer": ^1.0.1 - "@nodelib/fs.walk": ^1.2.8 - "@ungap/structured-clone": ^1.2.0 - ajv: ^6.12.4 - chalk: ^4.0.0 - cross-spawn: ^7.0.2 - debug: ^4.3.2 - doctrine: ^3.0.0 - escape-string-regexp: ^4.0.0 - eslint-scope: ^7.2.2 - eslint-visitor-keys: ^3.4.3 - espree: ^9.6.1 - esquery: ^1.4.2 - esutils: ^2.0.2 - fast-deep-equal: ^3.1.3 - file-entry-cache: ^6.0.1 - find-up: ^5.0.0 - glob-parent: ^6.0.2 - globals: ^13.19.0 - graphemer: ^1.4.0 - ignore: ^5.2.0 - imurmurhash: ^0.1.4 - is-glob: ^4.0.0 - is-path-inside: ^3.0.3 - js-yaml: ^4.1.0 - json-stable-stringify-without-jsonify: ^1.0.1 - levn: ^0.4.1 - lodash.merge: ^4.6.2 - minimatch: ^3.1.2 - natural-compare: ^1.4.0 - optionator: ^0.9.3 - strip-ansi: ^6.0.1 - text-table: ^0.2.0 - bin: - eslint: bin/eslint.js - checksum: 883436d1e809b4a25d9eb03d42f584b84c408dbac28b0019f6ea07b5177940bf3cca86208f749a6a1e0039b63e085ee47aca1236c30721e91f0deef5cc5a5136 - languageName: node - linkType: hard - "eslint@npm:8.57.0": version: 8.57.0 resolution: "eslint@npm:8.57.0" @@ -27618,7 +27563,7 @@ __metadata: cz-customizable: 7.2.1 danger: 11.3.0 dree: 3.4.5 - eslint: 8.56.0 + eslint: 8.57.0 eslint-plugin-import: 2.27.5 eslint-plugin-json-format: 2.0.1 eslint-plugin-vitest: 0.3.22 From 5599ff4c422824199bd0aa97add47f0b1e775a11 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Thu, 1 Aug 2024 13:14:30 +0100 Subject: [PATCH 06/14] Update eslint version in next10 example app --- apps/examples/wc-next10/package.json | 2 +- yarn.lock | 82 +++------------------------- 2 files changed, 10 insertions(+), 74 deletions(-) diff --git a/apps/examples/wc-next10/package.json b/apps/examples/wc-next10/package.json index 64c4a68e6e..d232d5a39b 100644 --- a/apps/examples/wc-next10/package.json +++ b/apps/examples/wc-next10/package.json @@ -24,7 +24,7 @@ "@babel/preset-env": "7.24.5", "@babel/preset-react": "7.24.1", "babel-loader": "8", - "eslint": "8.37.0", + "eslint": "8.57.0", "eslint-config-next": "13.2.4" }, "engines": { diff --git a/yarn.lock b/yarn.lock index 63424f38fc..bc2e91b0a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5095,14 +5095,14 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": version: 4.11.0 resolution: "@eslint-community/regexpp@npm:4.11.0" checksum: 97d2fe46690b69417a551bd19a3dc53b6d9590d2295c43cc4c4e44e64131af541e2f4a44d5c12e87de990403654d3dae9d33600081f3a2f0386b368abc9111ec languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.0.2, @eslint/eslintrc@npm:^2.1.4": +"@eslint/eslintrc@npm:^2.1.4": version: 2.1.4 resolution: "@eslint/eslintrc@npm:2.1.4" dependencies: @@ -5119,13 +5119,6 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.37.0": - version: 8.37.0 - resolution: "@eslint/js@npm:8.37.0" - checksum: 7a07fb085c94ce1538949012c292fd3a6cd734f149bc03af6157dfbd8a7477678899ef57b4a27e15b36470a997389ad79a0533d5880c71e67720ae1a7de7c62d - languageName: node - linkType: hard - "@eslint/js@npm:8.57.0": version: 8.57.0 resolution: "@eslint/js@npm:8.57.0" @@ -5246,7 +5239,7 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.14, @humanwhocodes/config-array@npm:^0.11.8": +"@humanwhocodes/config-array@npm:^0.11.14": version: 0.11.14 resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: @@ -11540,7 +11533,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.1.0, ajv@npm:^6.10.0, ajv@npm:^6.10.2, ajv@npm:^6.12.4, ajv@npm:^6.12.5": +"ajv@npm:^6.1.0, ajv@npm:^6.10.2, ajv@npm:^6.12.4, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -17472,63 +17465,13 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 36e9ef87fca698b6fd7ca5ca35d7b2b6eeaaf106572e2f7fd31c12d3bfdaccdb587bba6d3621067e5aece31c8c3a348b93922ab8f7b2cbc6aaab5e1d89040c60 languageName: node linkType: hard -"eslint@npm:8.37.0": - version: 8.37.0 - resolution: "eslint@npm:8.37.0" - dependencies: - "@eslint-community/eslint-utils": ^4.2.0 - "@eslint-community/regexpp": ^4.4.0 - "@eslint/eslintrc": ^2.0.2 - "@eslint/js": 8.37.0 - "@humanwhocodes/config-array": ^0.11.8 - "@humanwhocodes/module-importer": ^1.0.1 - "@nodelib/fs.walk": ^1.2.8 - ajv: ^6.10.0 - chalk: ^4.0.0 - cross-spawn: ^7.0.2 - debug: ^4.3.2 - doctrine: ^3.0.0 - escape-string-regexp: ^4.0.0 - eslint-scope: ^7.1.1 - eslint-visitor-keys: ^3.4.0 - espree: ^9.5.1 - esquery: ^1.4.2 - esutils: ^2.0.2 - fast-deep-equal: ^3.1.3 - file-entry-cache: ^6.0.1 - find-up: ^5.0.0 - glob-parent: ^6.0.2 - globals: ^13.19.0 - grapheme-splitter: ^1.0.4 - ignore: ^5.2.0 - import-fresh: ^3.0.0 - imurmurhash: ^0.1.4 - is-glob: ^4.0.0 - is-path-inside: ^3.0.3 - js-sdsl: ^4.1.4 - js-yaml: ^4.1.0 - json-stable-stringify-without-jsonify: ^1.0.1 - levn: ^0.4.1 - lodash.merge: ^4.6.2 - minimatch: ^3.1.2 - natural-compare: ^1.4.0 - optionator: ^0.9.1 - strip-ansi: ^6.0.1 - strip-json-comments: ^3.1.0 - text-table: ^0.2.0 - bin: - eslint: bin/eslint.js - checksum: 80f3d5cdce2d671f4794e392d234a78d039c347673defb0596268bd481e8f30a53d93c01ff4f66a546c87d97ab4122c0e9cafe1371f87cb03cee6b7d5aa97595 - languageName: node - linkType: hard - "eslint@npm:8.57.0": version: 8.57.0 resolution: "eslint@npm:8.57.0" @@ -17577,7 +17520,7 @@ __metadata: languageName: node linkType: hard -"espree@npm:^9.3.1, espree@npm:^9.5.1, espree@npm:^9.6.0, espree@npm:^9.6.1": +"espree@npm:^9.3.1, espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" dependencies: @@ -21401,13 +21344,6 @@ __metadata: languageName: node linkType: hard -"js-sdsl@npm:^4.1.4": - version: 4.4.2 - resolution: "js-sdsl@npm:4.4.2" - checksum: ba705adc1788bf3c6f6c8e5077824f2bb4f0acab5a984420ce5cc492c7fff3daddc26335ad2c9a67d4f5e3241ec790f9e5b72a625adcf20cf321d2fd85e62b8b - languageName: node - linkType: hard - "js-stringify@npm:^1.0.2": version: 1.0.2 resolution: "js-stringify@npm:1.0.2" @@ -25210,7 +25146,7 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.9.1, optionator@npm:^0.9.3": +"optionator@npm:^0.9.3": version: 0.9.4 resolution: "optionator@npm:0.9.4" dependencies: @@ -31032,7 +30968,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.0.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.0.1, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -33974,7 +33910,7 @@ __metadata: "@justeattakeaway/pie-webc": 0.5.16 "@lit/react": 1.0.2 babel-loader: 8 - eslint: 8.37.0 + eslint: 8.57.0 eslint-config-next: 13.2.4 next: 10.2.3 next-transpile-modules: 4.1.0 From 3fbafddcd3f9c90c83fa7753041b3cfce1870f0e Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Thu, 1 Aug 2024 13:24:01 +0100 Subject: [PATCH 07/14] Update pie-wrapper-react test snapshots --- .../__tests__/__snapshots__/wrapper.test.js.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/tools/pie-wrapper-react/__tests__/__snapshots__/wrapper.test.js.snap b/packages/tools/pie-wrapper-react/__tests__/__snapshots__/wrapper.test.js.snap index 439a68bae5..3d5fe2da32 100644 --- a/packages/tools/pie-wrapper-react/__tests__/__snapshots__/wrapper.test.js.snap +++ b/packages/tools/pie-wrapper-react/__tests__/__snapshots__/wrapper.test.js.snap @@ -2,9 +2,9 @@ exports[`React Wrapper > should be added from mock custom elements JSON 1`] = ` "import * as React from 'react'; -import { createComponent, EventName } from '@lit/react'; +import { createComponent, type EventName } from '@lit/react'; import { MockComponent as MockComponentLit } from './index'; -import { MockComponentProps } from './defs'; +import { type MockComponentProps } from './defs'; export * from './defs'; @@ -33,7 +33,7 @@ exports[`React Wrapper > should be named the same as the component itself 1`] = "import * as React from 'react'; import { createComponent } from '@lit/react'; import { ButtonComponent as ButtonComponentLit } from './index'; -import { ButtonComponentProps } from './defs'; +import { type ButtonComponentProps } from './defs'; export * from './defs'; @@ -54,7 +54,7 @@ exports[`React Wrapper > should leave the events object empty if the component c "import * as React from 'react'; import { createComponent } from '@lit/react'; import { MockComponent as MockComponentLit } from './index'; -import { MockComponentProps } from './defs'; +import { type MockComponentProps } from './defs'; export * from './defs'; From b758dbcb3fb47a5e27a14dd17c9c0c256f9a1302 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Mon, 16 Sep 2024 09:03:22 +0100 Subject: [PATCH 08/14] Remove unused linting rules --- .../stories/pie-assistive-text.stories.ts | 3 +-- apps/pie-storybook/stories/pie-card.stories.ts | 2 -- .../stories/pie-checkbox-group.stories.ts | 10 ++++------ apps/pie-storybook/stories/pie-checkbox.stories.ts | 3 +-- apps/pie-storybook/stories/pie-chip.stories.ts | 2 -- apps/pie-storybook/stories/pie-divider.stories.ts | 3 --- apps/pie-storybook/stories/pie-form-label.stories.ts | 2 -- apps/pie-storybook/stories/pie-icon-button.stories.ts | 2 -- apps/pie-storybook/stories/pie-link.stories.ts | 3 +-- .../pie-storybook/stories/pie-lottie-player.stories.ts | 3 +-- apps/pie-storybook/stories/pie-modal.stories.ts | 7 +------ apps/pie-storybook/stories/pie-notification.stories.ts | 5 +---- apps/pie-storybook/stories/pie-spinner.stories.ts | 2 -- apps/pie-storybook/stories/pie-switch.stories.ts | 2 -- apps/pie-storybook/stories/pie-textarea.stories.ts | 4 ++-- apps/pie-storybook/stories/pie-toast.stories.ts | 1 + 16 files changed, 13 insertions(+), 41 deletions(-) diff --git a/apps/pie-storybook/stories/pie-assistive-text.stories.ts b/apps/pie-storybook/stories/pie-assistive-text.stories.ts index 6ca0fed983..b000466a68 100644 --- a/apps/pie-storybook/stories/pie-assistive-text.stories.ts +++ b/apps/pie-storybook/stories/pie-assistive-text.stories.ts @@ -1,9 +1,8 @@ import { html } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; -/* eslint-disable import/no-duplicates */ + import '@justeattakeaway/pie-assistive-text'; import { type AssistiveTextProps as AssistiveTextBaseProps, variants, defaultProps } from '@justeattakeaway/pie-assistive-text'; -/* eslint-enable import/no-duplicates */ import { type StoryMeta, type SlottedComponentProps } from '../types'; import { createStory, type TemplateFunction, sanitizeAndRenderHTML } from '../utilities'; diff --git a/apps/pie-storybook/stories/pie-card.stories.ts b/apps/pie-storybook/stories/pie-card.stories.ts index 26ef53b4d2..2fe87d1e9b 100644 --- a/apps/pie-storybook/stories/pie-card.stories.ts +++ b/apps/pie-storybook/stories/pie-card.stories.ts @@ -2,12 +2,10 @@ import { nothing } from 'lit'; import { html } from 'lit/static-html.js'; import { ifDefined } from 'lit/directives/if-defined.js'; -/* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-card'; import { type CardProps as CardPropsBase, variants, tags, paddingValues, defaultProps, } from '@justeattakeaway/pie-card'; -/* eslint-enable import/no-duplicates */ import type { StoryMeta, SlottedComponentProps } from '../types'; import { createStory, type TemplateFunction, sanitizeAndRenderHTML } from '../utilities'; diff --git a/apps/pie-storybook/stories/pie-checkbox-group.stories.ts b/apps/pie-storybook/stories/pie-checkbox-group.stories.ts index 8377b80fa5..5fabc26ebe 100644 --- a/apps/pie-storybook/stories/pie-checkbox-group.stories.ts +++ b/apps/pie-storybook/stories/pie-checkbox-group.stories.ts @@ -1,17 +1,15 @@ import { html, nothing } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; -/* eslint-disable import/no-duplicates */ + import '@justeattakeaway/pie-checkbox-group'; import { type CheckboxGroupProps as CheckboxGroupPropsBase, defaultProps, statusTypes } from '@justeattakeaway/pie-checkbox-group'; -/* eslint-enable import/no-duplicates */ - -import { type StoryMeta } from '../types'; -import { createStory } from '../utilities'; - import '@justeattakeaway/pie-link'; import '@justeattakeaway/pie-checkbox'; import '@justeattakeaway/pie-form-label'; +import { type StoryMeta } from '../types'; +import { createStory } from '../utilities'; + // Extending the props type definition to include storybook specific properties for controls type CheckboxGroupProps = CheckboxGroupPropsBase & { labelSlot: keyof typeof labelSlotOptions; diff --git a/apps/pie-storybook/stories/pie-checkbox.stories.ts b/apps/pie-storybook/stories/pie-checkbox.stories.ts index 5894d17736..b126564c49 100644 --- a/apps/pie-storybook/stories/pie-checkbox.stories.ts +++ b/apps/pie-storybook/stories/pie-checkbox.stories.ts @@ -1,9 +1,8 @@ import { html } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; -/* eslint-disable import/no-duplicates */ + import '@justeattakeaway/pie-checkbox'; import { type CheckboxProps as CheckboxBaseProps, defaultProps, statusTypes } from '@justeattakeaway/pie-checkbox'; -/* eslint-enable import/no-duplicates */ import { action } from '@storybook/addon-actions'; import { type StoryMeta, type SlottedComponentProps } from '../types'; diff --git a/apps/pie-storybook/stories/pie-chip.stories.ts b/apps/pie-storybook/stories/pie-chip.stories.ts index 064ff765c1..380e9f58f7 100644 --- a/apps/pie-storybook/stories/pie-chip.stories.ts +++ b/apps/pie-storybook/stories/pie-chip.stories.ts @@ -2,10 +2,8 @@ import { html, nothing } from 'lit'; import { action } from '@storybook/addon-actions'; import { ifDefined } from 'lit/directives/if-defined.js'; -/* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-chip'; import { type ChipProps as ChipPropsBase, variants, defaultProps } from '@justeattakeaway/pie-chip'; -/* eslint-enable import/no-duplicates */ import '@justeattakeaway/pie-icons-webc/dist/IconHeartFilled.js'; import type { StoryMeta, SlottedComponentProps } from '../types'; diff --git a/apps/pie-storybook/stories/pie-divider.stories.ts b/apps/pie-storybook/stories/pie-divider.stories.ts index 7614d81d9d..790cea5439 100644 --- a/apps/pie-storybook/stories/pie-divider.stories.ts +++ b/apps/pie-storybook/stories/pie-divider.stories.ts @@ -1,12 +1,10 @@ import { html } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; -/* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-divider'; import { type DividerProps, variants, orientations, defaultProps, } from '@justeattakeaway/pie-divider'; -/* eslint-enable import/no-duplicates */ import { type StoryMeta } from '../types'; import { createStory, type TemplateFunction } from '../utilities'; @@ -68,4 +66,3 @@ export const Default = createDividerStory(); export const Inverse = createDividerStory({ variant: 'inverse' }, { bgColor: 'dark (container-dark)' }); export const Labelled = createDividerStory({ label: 'Label' }); export const LargeTextContent = createDividerStory({ label: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit quas inventore quasi ullam, sed ab odio dicta, tempore' }); - diff --git a/apps/pie-storybook/stories/pie-form-label.stories.ts b/apps/pie-storybook/stories/pie-form-label.stories.ts index ec94852202..5284383d68 100644 --- a/apps/pie-storybook/stories/pie-form-label.stories.ts +++ b/apps/pie-storybook/stories/pie-form-label.stories.ts @@ -1,10 +1,8 @@ import { html } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; -/* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-form-label'; import { type FormLabelProps as FormLabelPropsBase } from '@justeattakeaway/pie-form-label'; -/* eslint-enable import/no-duplicates */ import { type SlottedComponentProps, type StoryMeta } from '../types'; import { createStory, type TemplateFunction, sanitizeAndRenderHTML } from '../utilities'; diff --git a/apps/pie-storybook/stories/pie-icon-button.stories.ts b/apps/pie-storybook/stories/pie-icon-button.stories.ts index acd1bb4e12..ee33f09f7a 100644 --- a/apps/pie-storybook/stories/pie-icon-button.stories.ts +++ b/apps/pie-storybook/stories/pie-icon-button.stories.ts @@ -1,12 +1,10 @@ import { html } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; -/* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-icon-button'; import { type IconButtonProps, sizes, variants, defaultProps, } from '@justeattakeaway/pie-icon-button'; -/* eslint-enable import/no-duplicates */ import '@justeattakeaway/pie-icons-webc/dist/IconClose.js'; import { type StoryMeta } from '../types'; diff --git a/apps/pie-storybook/stories/pie-link.stories.ts b/apps/pie-storybook/stories/pie-link.stories.ts index 7fe4fe8e7f..e18a481419 100644 --- a/apps/pie-storybook/stories/pie-link.stories.ts +++ b/apps/pie-storybook/stories/pie-link.stories.ts @@ -3,8 +3,7 @@ import { ifDefined } from 'lit/directives/if-defined.js'; import '@justeattakeaway/pie-link'; import { - type LinkProps as LinkBaseProps, sizes, variants, - iconPlacements, tags, buttonTypes, underlineTypes, defaultProps, + type LinkProps as LinkBaseProps, sizes, variants, iconPlacements, tags, buttonTypes, underlineTypes, defaultProps, } from '@justeattakeaway/pie-link'; import '@justeattakeaway/pie-icons-webc/dist/IconPlusCircle.js'; diff --git a/apps/pie-storybook/stories/pie-lottie-player.stories.ts b/apps/pie-storybook/stories/pie-lottie-player.stories.ts index 767aa61ee2..e571b9ac29 100644 --- a/apps/pie-storybook/stories/pie-lottie-player.stories.ts +++ b/apps/pie-storybook/stories/pie-lottie-player.stories.ts @@ -1,10 +1,9 @@ import { html } from 'lit'; -/* eslint-disable import/no-duplicates */ + import '@justeattakeaway/pie-lottie-player'; import { type LottiePlayerProps as LottiePlayerBaseProps, type PieLottiePlayer, defaultProps, directions, } from '@justeattakeaway/pie-lottie-player'; -/* eslint-enable import/no-duplicates */ import { type StoryMeta } from '../types'; import { createStory } from '../utilities'; diff --git a/apps/pie-storybook/stories/pie-modal.stories.ts b/apps/pie-storybook/stories/pie-modal.stories.ts index 3cf2488cc9..faa982e562 100644 --- a/apps/pie-storybook/stories/pie-modal.stories.ts +++ b/apps/pie-storybook/stories/pie-modal.stories.ts @@ -4,12 +4,7 @@ import { action } from '@storybook/addon-actions'; import '@justeattakeaway/pie-modal'; import { - type PieModal, - type ModalProps as ModalPropsBase, - headingLevels, - sizes, - positions, - defaultProps, + type PieModal, type ModalProps as ModalPropsBase, headingLevels, sizes, positions, defaultProps, } from '@justeattakeaway/pie-modal'; import { type StoryMeta, type SlottedComponentProps } from '../types'; diff --git a/apps/pie-storybook/stories/pie-notification.stories.ts b/apps/pie-storybook/stories/pie-notification.stories.ts index 53226ff110..fcf92d7bea 100644 --- a/apps/pie-storybook/stories/pie-notification.stories.ts +++ b/apps/pie-storybook/stories/pie-notification.stories.ts @@ -1,14 +1,11 @@ import { html, nothing } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; +import { action } from '@storybook/addon-actions'; -/* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-notification'; -import { action } from '@storybook/addon-actions'; import { type NotificationProps as NotificationBaseProps, variants, headingLevels, positions, defaultProps, } from '@justeattakeaway/pie-notification'; -/* eslint-enable import/no-duplicates */ - import '@justeattakeaway/pie-icons-webc/dist/IconPlaceholder.js'; import { type StoryMeta } from '../types'; diff --git a/apps/pie-storybook/stories/pie-spinner.stories.ts b/apps/pie-storybook/stories/pie-spinner.stories.ts index d66a54d99e..b45921396b 100644 --- a/apps/pie-storybook/stories/pie-spinner.stories.ts +++ b/apps/pie-storybook/stories/pie-spinner.stories.ts @@ -1,12 +1,10 @@ import { html } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; -/* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-spinner'; import { type SpinnerProps, sizes, variants, defaultProps, } from '@justeattakeaway/pie-spinner'; -/* eslint-enable import/no-duplicates */ import { type StoryMeta } from '../types'; import { type TemplateFunction, createStory } from '../utilities'; diff --git a/apps/pie-storybook/stories/pie-switch.stories.ts b/apps/pie-storybook/stories/pie-switch.stories.ts index d2f3ca2fac..ef8c099d05 100644 --- a/apps/pie-storybook/stories/pie-switch.stories.ts +++ b/apps/pie-storybook/stories/pie-switch.stories.ts @@ -1,10 +1,8 @@ import { html, nothing } from 'lit'; import { action } from '@storybook/addon-actions'; -/* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-switch'; import { type SwitchProps, labelPlacements, defaultProps } from '@justeattakeaway/pie-switch'; -/* eslint-enable import/no-duplicates */ import '@justeattakeaway/pie-icons-webc/dist/IconCheck.js'; import { type StoryMeta } from '../types'; diff --git a/apps/pie-storybook/stories/pie-textarea.stories.ts b/apps/pie-storybook/stories/pie-textarea.stories.ts index ede55f58cd..1bf73f423b 100644 --- a/apps/pie-storybook/stories/pie-textarea.stories.ts +++ b/apps/pie-storybook/stories/pie-textarea.stories.ts @@ -7,11 +7,11 @@ import '@justeattakeaway/pie-textarea'; import { type TextareaProps, defaultProps, resizeModes, sizes, statusTypes, } from '@justeattakeaway/pie-textarea'; +import '@justeattakeaway/pie-button'; +import '@justeattakeaway/pie-form-label'; import { type StoryMeta } from '../types'; import { createStory, type TemplateFunction } from '../utilities'; -import '@justeattakeaway/pie-button'; -import '@justeattakeaway/pie-form-label'; type TextareaStoryMeta = StoryMeta; diff --git a/apps/pie-storybook/stories/pie-toast.stories.ts b/apps/pie-storybook/stories/pie-toast.stories.ts index 86cb58a5bd..7c6304b8c5 100644 --- a/apps/pie-storybook/stories/pie-toast.stories.ts +++ b/apps/pie-storybook/stories/pie-toast.stories.ts @@ -3,6 +3,7 @@ import { ifDefined } from 'lit/directives/if-defined.js'; import { action } from '@storybook/addon-actions'; import { type ToastProps, defaultProps, variants } from '@justeattakeaway/pie-toast'; + import { type StoryMeta } from '../types'; import { createStory } from '../utilities'; From feeef27e9a8f5cad6d9074edfaf208b3f61e2bd4 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Mon, 16 Sep 2024 09:58:04 +0100 Subject: [PATCH 09/14] Undo unnecessary changes from self-review --- .../pie-checkbox-group/src/index.ts | 7 +++---- .../accessibility/pie-checkbox-group.spec.ts | 10 +++++++-- .../test/accessibility/pie-checkbox.spec.ts | 10 +++++++-- .../test/accessibility/pie-chip.spec.ts | 15 ++++++++----- .../components/pie-cookie-banner/src/index.ts | 2 -- .../components/pie-icon-button/src/index.ts | 4 +++- .../accessibility/pie-notification.spec.ts | 10 +++++++-- packages/components/pie-switch/src/index.ts | 7 +++---- .../components/pie-text-input/src/index.ts | 4 ++-- .../test/component/pie-textarea.spec.ts | 4 ++-- .../pie-toast/test/visual/pie-toast.spec.ts | 21 ++++++++++++------- 11 files changed, 61 insertions(+), 33 deletions(-) diff --git a/packages/components/pie-checkbox-group/src/index.ts b/packages/components/pie-checkbox-group/src/index.ts index a04bd9dbd1..f1e50e5703 100644 --- a/packages/components/pie-checkbox-group/src/index.ts +++ b/packages/components/pie-checkbox-group/src/index.ts @@ -1,6 +1,5 @@ import { - LitElement, html, unsafeCSS, - type PropertyValues, type nothing, type TemplateResult, + LitElement, html, unsafeCSS, type PropertyValues, type nothing, type TemplateResult, } from 'lit'; import { property, queryAssignedElements, state } from 'lit/decorators.js'; import { @@ -14,10 +13,10 @@ import { classMap } from 'lit/directives/class-map.js'; import styles from './checkbox-group.scss?inline'; import { type CheckboxGroupProps, - ON_CHECKBOX_GROUP_DISABLED, - ON_CHECKBOX_GROUP_ERROR, defaultProps, statusTypes, + ON_CHECKBOX_GROUP_DISABLED, + ON_CHECKBOX_GROUP_ERROR, } from './defs'; import '@justeattakeaway/pie-assistive-text'; diff --git a/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts b/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts index 6226274fbf..97d2b37218 100644 --- a/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts +++ b/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts @@ -1,9 +1,15 @@ + import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieCheckboxGroup } from '../../src/index.ts'; +import { PieCheckboxGroup, type CheckboxGroupProps } from '../../src/index.ts'; test.describe('PieCheckboxGroup - Accessibility tests', () => { test('a11y - should test the PieCheckboxGroup component WCAG compliance', async ({ makeAxeBuilder, mount }) => { - await mount(PieCheckboxGroup); + await mount( + PieCheckboxGroup, + { + props: {} as CheckboxGroupProps, + }, + ); const results = await makeAxeBuilder().analyze(); diff --git a/packages/components/pie-checkbox/test/accessibility/pie-checkbox.spec.ts b/packages/components/pie-checkbox/test/accessibility/pie-checkbox.spec.ts index 0f5d203714..3e245d24f5 100644 --- a/packages/components/pie-checkbox/test/accessibility/pie-checkbox.spec.ts +++ b/packages/components/pie-checkbox/test/accessibility/pie-checkbox.spec.ts @@ -1,9 +1,15 @@ + import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieCheckbox } from '../../src/index.ts'; +import { PieCheckbox, type CheckboxProps } from '../../src/index.ts'; test.describe('PieCheckbox - Accessibility tests', () => { test('a11y - should test the PieCheckbox component WCAG compliance', async ({ makeAxeBuilder, mount }) => { - await mount(PieCheckbox); + await mount( + PieCheckbox, + { + props: {} as CheckboxProps, + }, + ); const results = await makeAxeBuilder().analyze(); diff --git a/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts b/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts index bd69f00632..498146e74d 100644 --- a/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts +++ b/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts @@ -1,13 +1,18 @@ + import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieChip } from '../../src/index.ts'; +import { PieChip, type ChipProps } from '../../src/index.ts'; test.describe('PieChip - Accessibility tests', () => { test('a11y - should test the PieChip component WCAG compliance', async ({ makeAxeBuilder, mount }) => { - await mount(PieChip, { - slots: { - default: 'Label', + await mount( + PieChip, + { + props: {} as ChipProps, + slots: { + default: 'Label', + }, }, - }); + ); const results = await makeAxeBuilder().analyze(); diff --git a/packages/components/pie-cookie-banner/src/index.ts b/packages/components/pie-cookie-banner/src/index.ts index 5d6223dc24..91e71051bc 100644 --- a/packages/components/pie-cookie-banner/src/index.ts +++ b/packages/components/pie-cookie-banner/src/index.ts @@ -9,11 +9,9 @@ import '@justeattakeaway/pie-divider'; import '@justeattakeaway/pie-icon-button'; import '@justeattakeaway/pie-link'; import '@justeattakeaway/pie-modal'; -/* eslint-disable import/no-duplicates */ import '@justeattakeaway/pie-switch'; import { type PieSwitch } from '@justeattakeaway/pie-switch'; import { defineCustomElement, dispatchCustomEvent } from '@justeattakeaway/pie-webc-core'; -/* eslint-enable import/no-duplicates */ import styles from './cookie-banner.scss?inline'; import { diff --git a/packages/components/pie-icon-button/src/index.ts b/packages/components/pie-icon-button/src/index.ts index a3648e5447..80b644f4d7 100644 --- a/packages/components/pie-icon-button/src/index.ts +++ b/packages/components/pie-icon-button/src/index.ts @@ -2,12 +2,14 @@ import { LitElement, type TemplateResult, html, unsafeCSS, } from 'lit'; import { property } from 'lit/decorators.js'; + import { validPropertyValues, defineCustomElement } from '@justeattakeaway/pie-webc-core'; +import '@justeattakeaway/pie-spinner'; + import styles from './iconButton.scss?inline'; import { type IconButtonProps, sizes, variants, defaultProps, } from './defs'; -import '@justeattakeaway/pie-spinner'; // Valid values available to consumers export * from './defs'; diff --git a/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts b/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts index 54250b353b..c8b4fc205a 100644 --- a/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts +++ b/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts @@ -1,9 +1,15 @@ + import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieNotification } from '../../src/index.ts'; +import { PieNotification, type NotificationProps } from '../../src/index.ts'; test.describe('PieNotification - Accessibility tests', () => { test('a11y - should test the PieNotification component WCAG compliance', async ({ makeAxeBuilder, mount }) => { - await mount(PieNotification); + await mount( + PieNotification, + { + props: {} as NotificationProps, + }, + ); const results = await makeAxeBuilder().analyze(); diff --git a/packages/components/pie-switch/src/index.ts b/packages/components/pie-switch/src/index.ts index a18403152d..34fb887b40 100644 --- a/packages/components/pie-switch/src/index.ts +++ b/packages/components/pie-switch/src/index.ts @@ -1,19 +1,18 @@ -import 'element-internals-polyfill'; import { LitElement, html, unsafeCSS, nothing, } from 'lit'; - import { property, query } from 'lit/decorators.js'; import { classMap } from 'lit/directives/class-map.js'; import { ifDefined } from 'lit/directives/if-defined.js'; +import 'element-internals-polyfill'; -import '@justeattakeaway/pie-icons-webc/dist/IconCheck.js'; import { RtlMixin, validPropertyValues, defineCustomElement, FormControlMixin, wrapNativeEvent, type PIEInputElement, } from '@justeattakeaway/pie-webc-core'; +import '@justeattakeaway/pie-icons-webc/dist/IconCheck.js'; -import { type SwitchProps, labelPlacements, defaultProps } from './defs'; import styles from './switch.scss?inline'; +import { type SwitchProps, labelPlacements, defaultProps } from './defs'; // Valid values available to consumers export * from './defs'; diff --git a/packages/components/pie-text-input/src/index.ts b/packages/components/pie-text-input/src/index.ts index 2e2fc17c37..34de0cff8c 100644 --- a/packages/components/pie-text-input/src/index.ts +++ b/packages/components/pie-text-input/src/index.ts @@ -5,7 +5,6 @@ import { property, query } from 'lit/decorators.js'; import { ifDefined } from 'lit/directives/if-defined.js'; import { classMap, type ClassInfo } from 'lit/directives/class-map.js'; import { live } from 'lit/directives/live.js'; -import 'element-internals-polyfill'; import { validPropertyValues, RtlMixin, defineCustomElement, FormControlMixin, wrapNativeEvent, type PIEInputElement, @@ -14,8 +13,9 @@ import '@justeattakeaway/pie-assistive-text'; import styles from './text-input.scss?inline'; import { - type TextInputProps, defaultProps, statusTypes, types, + type TextInputProps, types, statusTypes, defaultProps, } from './defs'; +import 'element-internals-polyfill'; // Valid values available to consumers export * from './defs'; diff --git a/packages/components/pie-textarea/test/component/pie-textarea.spec.ts b/packages/components/pie-textarea/test/component/pie-textarea.spec.ts index 58349a8987..5757d782b4 100644 --- a/packages/components/pie-textarea/test/component/pie-textarea.spec.ts +++ b/packages/components/pie-textarea/test/component/pie-textarea.spec.ts @@ -1,9 +1,9 @@ import { expect, test } from '@sand4rt/experimental-ct-web'; import { getFormDataObject, setupFormDataExtraction } from '@justeattakeaway/pie-webc-testing/src/helpers/form-helpers.ts'; import { PieFormLabel } from '@justeattakeaway/pie-form-label'; +import { PieTextarea, type TextareaProps } from '../../src/index.ts'; -import { PieTextarea } from '../../src/index.ts'; -import { type TextareaProps, statusTypes } from '../../src/defs.ts'; +import { statusTypes } from '../../src/defs.ts'; const componentSelector = '[data-test-id="pie-textarea"]'; const assistiveTextSelector = '[data-test-id="pie-textarea-assistive-text"]'; diff --git a/packages/components/pie-toast/test/visual/pie-toast.spec.ts b/packages/components/pie-toast/test/visual/pie-toast.spec.ts index 84a15db249..4ea4cf07d3 100644 --- a/packages/components/pie-toast/test/visual/pie-toast.spec.ts +++ b/packages/components/pie-toast/test/visual/pie-toast.spec.ts @@ -1,14 +1,21 @@ + import { test } from '@sand4rt/experimental-ct-web'; import percySnapshot from '@percy/playwright'; - -import { - type PropObject, type WebComponentPropValues, type WebComponentTestInput, +import type { + PropObject, WebComponentPropValues, WebComponentTestInput, } from '@justeattakeaway/pie-webc-testing/src/helpers/defs.ts'; -import { getAllPropCombinations, splitCombinationsByPropertyValue } from '@justeattakeaway/pie-webc-testing/src/helpers/get-all-prop-combos.ts'; -import { createTestWebComponent } from '@justeattakeaway/pie-webc-testing/src/helpers/rendering.ts'; -import { WebComponentTestWrapper } from '@justeattakeaway/pie-webc-testing/src/helpers/components/web-component-test-wrapper/WebComponentTestWrapper.ts'; +import { + getAllPropCombinations, splitCombinationsByPropertyValue, +} from '@justeattakeaway/pie-webc-testing/src/helpers/get-all-prop-combos.ts'; +import { + createTestWebComponent, +} from '@justeattakeaway/pie-webc-testing/src/helpers/rendering.ts'; +import { + WebComponentTestWrapper, +} from '@justeattakeaway/pie-webc-testing/src/helpers/components/web-component-test-wrapper/WebComponentTestWrapper.ts'; -import { PieToast, type ToastProps, variants } from '../../src/index.ts'; +import { variants } from '../../src/defs.ts'; +import { PieToast, type ToastProps } from '../../src/index.ts'; test.describe('PieToast - Visual tests`', () => { test('should display the PieToast component successfully', async ({ page, mount }) => { From cc405ce9bf52152204b4da90a13d5bb2c4ec2947 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Wed, 18 Sep 2024 15:30:38 +0100 Subject: [PATCH 10/14] Change minimisation --- apps/pie-storybook/stories/pie-form-label.stories.ts | 8 ++++---- apps/pie-storybook/stories/pie-notification.stories.ts | 1 + apps/pie-storybook/stories/pie-text-input.stories.ts | 2 +- apps/pie-storybook/stories/pie-toast.stories.ts | 5 +++-- packages/components/pie-checkbox-group/src/index.ts | 4 ++-- .../test/accessibility/pie-checkbox-group.spec.ts | 1 - .../pie-checkbox/test/component/pie-checkbox.spec.ts | 4 +--- .../pie-checkbox/test/visual/pie-checkbox.spec.ts | 3 ++- .../pie-chip/test/accessibility/pie-chip.spec.ts | 1 - packages/components/pie-cookie-banner/src/index.ts | 6 +++--- .../test/accessibility/pie-form-label.spec.ts | 9 +++++++-- packages/components/pie-icon-button/src/index.ts | 8 +++----- packages/components/pie-link/src/index.ts | 9 ++++++++- .../test/accessibility/pie-notification.spec.ts | 1 - .../pie-radio/test/component/pie-radio.spec.ts | 1 - .../pie-switch/test/component/pie-switch.spec.ts | 6 +++++- packages/components/pie-toast/src/index.ts | 8 ++++---- .../components/pie-webc-core/src/mixins/rtl/rtlMixin.ts | 3 +-- 18 files changed, 45 insertions(+), 35 deletions(-) diff --git a/apps/pie-storybook/stories/pie-form-label.stories.ts b/apps/pie-storybook/stories/pie-form-label.stories.ts index 35d9eb9900..295e68b285 100644 --- a/apps/pie-storybook/stories/pie-form-label.stories.ts +++ b/apps/pie-storybook/stories/pie-form-label.stories.ts @@ -1,4 +1,4 @@ -import { html } from 'lit'; +import { html, nothing } from 'lit'; import { type Meta } from '@storybook/web-components'; import '@justeattakeaway/pie-form-label'; @@ -65,9 +65,9 @@ const Template: TemplateFunction = ({ ...props }) => html` + for="${props.for || nothing}" + optional="${optional || nothing}" + trailing="${trailing || nothing}"> ${sanitizeAndRenderHTML(slot)} `; diff --git a/apps/pie-storybook/stories/pie-notification.stories.ts b/apps/pie-storybook/stories/pie-notification.stories.ts index 080d786745..28c60e0366 100644 --- a/apps/pie-storybook/stories/pie-notification.stories.ts +++ b/apps/pie-storybook/stories/pie-notification.stories.ts @@ -7,6 +7,7 @@ import '@justeattakeaway/pie-notification'; import { type NotificationProps as NotificationBaseProps, variants, headingLevels, positions, defaultProps, } from '@justeattakeaway/pie-notification'; + import '@justeattakeaway/pie-icons-webc/dist/IconPlaceholder.js'; import { createStory, type TemplateFunction } from '../utilities'; diff --git a/apps/pie-storybook/stories/pie-text-input.stories.ts b/apps/pie-storybook/stories/pie-text-input.stories.ts index 2d3f0b8eb7..debdfda8bd 100644 --- a/apps/pie-storybook/stories/pie-text-input.stories.ts +++ b/apps/pie-storybook/stories/pie-text-input.stories.ts @@ -6,7 +6,7 @@ import { type Meta } from '@storybook/web-components'; import '@justeattakeaway/pie-text-input'; import { - type TextInputProps as TextInputPropsBase, defaultProps, inputModes, sizes, statusTypes, types, + type TextInputProps as TextInputPropsBase, types, inputModes, statusTypes, sizes, defaultProps, } from '@justeattakeaway/pie-text-input'; import '@justeattakeaway/pie-button'; import '@justeattakeaway/pie-form-label'; diff --git a/apps/pie-storybook/stories/pie-toast.stories.ts b/apps/pie-storybook/stories/pie-toast.stories.ts index 9f7fb8f974..8f3eb41fec 100644 --- a/apps/pie-storybook/stories/pie-toast.stories.ts +++ b/apps/pie-storybook/stories/pie-toast.stories.ts @@ -1,5 +1,4 @@ import { html } from 'lit'; -import { ifDefined } from 'lit/directives/if-defined.js'; import { action } from '@storybook/addon-actions'; import { type Meta } from '@storybook/web-components'; @@ -83,6 +82,8 @@ const pieToastSupportingActionClick = action('pie-toast-supporting-action-click' const pieToastClose = action('pie-toast-close'); const pieToastOpen = action('pie-toast-open'); +// TODO: remove the eslint-disable rule when props are added +// eslint-disable-next-line no-empty-pattern const Template = ({ isOpen, isDismissible, @@ -96,7 +97,7 @@ const Template = ({ ?isOpen="${isOpen}" ?isDismissible="${isDismissible}" ?isStrong="${isStrong}" - variant="${ifDefined(variant)}" + variant="${variant}" message="${message}" ?isMultiline="${isMultiline}" .leadingAction="${leadingAction}" diff --git a/packages/components/pie-checkbox-group/src/index.ts b/packages/components/pie-checkbox-group/src/index.ts index f1e50e5703..cb392fc8f4 100644 --- a/packages/components/pie-checkbox-group/src/index.ts +++ b/packages/components/pie-checkbox-group/src/index.ts @@ -12,11 +12,11 @@ import { ifDefined } from 'lit/directives/if-defined.js'; import { classMap } from 'lit/directives/class-map.js'; import styles from './checkbox-group.scss?inline'; import { + ON_CHECKBOX_GROUP_DISABLED, + ON_CHECKBOX_GROUP_ERROR, type CheckboxGroupProps, defaultProps, statusTypes, - ON_CHECKBOX_GROUP_DISABLED, - ON_CHECKBOX_GROUP_ERROR, } from './defs'; import '@justeattakeaway/pie-assistive-text'; diff --git a/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts b/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts index 97d2b37218..c49de2e67b 100644 --- a/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts +++ b/packages/components/pie-checkbox-group/test/accessibility/pie-checkbox-group.spec.ts @@ -1,4 +1,3 @@ - import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; import { PieCheckboxGroup, type CheckboxGroupProps } from '../../src/index.ts'; diff --git a/packages/components/pie-checkbox/test/component/pie-checkbox.spec.ts b/packages/components/pie-checkbox/test/component/pie-checkbox.spec.ts index 9bb4c93a8c..de28a810c8 100644 --- a/packages/components/pie-checkbox/test/component/pie-checkbox.spec.ts +++ b/packages/components/pie-checkbox/test/component/pie-checkbox.spec.ts @@ -1,8 +1,6 @@ -import { test, expect } from '@sand4rt/experimental-ct-web'; - import { setupFormDataExtraction, getFormDataObject } from '@justeattakeaway/pie-webc-testing/src/helpers/form-helpers.ts'; +import { test, expect } from '@sand4rt/experimental-ct-web'; import { PieAssistiveText } from '@justeattakeaway/pie-assistive-text'; - import { PieCheckbox, type CheckboxProps } from '../../src/index.ts'; const inputSelector = '[data-test-id="checkbox-input"]'; diff --git a/packages/components/pie-checkbox/test/visual/pie-checkbox.spec.ts b/packages/components/pie-checkbox/test/visual/pie-checkbox.spec.ts index bd628e0323..c871a26604 100644 --- a/packages/components/pie-checkbox/test/visual/pie-checkbox.spec.ts +++ b/packages/components/pie-checkbox/test/visual/pie-checkbox.spec.ts @@ -12,10 +12,11 @@ import { import { WebComponentTestWrapper, } from '@justeattakeaway/pie-webc-testing/src/helpers/components/web-component-test-wrapper/WebComponentTestWrapper.ts'; + import { percyWidths } from '@justeattakeaway/pie-webc-testing/src/percy/breakpoints.ts'; import { setRTL } from '@justeattakeaway/pie-webc-testing/src/helpers/set-rtl-direction.ts'; -import { PieAssistiveText } from '@justeattakeaway/pie-assistive-text'; +import { PieAssistiveText } from '@justeattakeaway/pie-assistive-text'; import { PieCheckbox } from '../../src/index.ts'; import { type CheckboxProps, statusTypes } from '../../src/defs.ts'; diff --git a/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts b/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts index 498146e74d..cfa86b036a 100644 --- a/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts +++ b/packages/components/pie-chip/test/accessibility/pie-chip.spec.ts @@ -1,4 +1,3 @@ - import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; import { PieChip, type ChipProps } from '../../src/index.ts'; diff --git a/packages/components/pie-cookie-banner/src/index.ts b/packages/components/pie-cookie-banner/src/index.ts index 91e71051bc..58bbd9a52c 100644 --- a/packages/components/pie-cookie-banner/src/index.ts +++ b/packages/components/pie-cookie-banner/src/index.ts @@ -15,17 +15,17 @@ import { defineCustomElement, dispatchCustomEvent } from '@justeattakeaway/pie-w import styles from './cookie-banner.scss?inline'; import { + type CookieBannerProps, ON_COOKIE_BANNER_ACCEPT_ALL, ON_COOKIE_BANNER_NECESSARY_ONLY, ON_COOKIE_BANNER_MANAGE_PREFS, ON_COOKIE_BANNER_PREFS_SAVED, defaultProps, preferences, - type CookieBannerLocale, - type CookieBannerProps, - type CustomTagEnhancers, type Preference, type PreferenceIds, + type CookieBannerLocale, + type CustomTagEnhancers, } from './defs'; import { localiseText, localiseRichText } from './localisation-utils'; diff --git a/packages/components/pie-form-label/test/accessibility/pie-form-label.spec.ts b/packages/components/pie-form-label/test/accessibility/pie-form-label.spec.ts index ba7c545474..039c7c10f1 100644 --- a/packages/components/pie-form-label/test/accessibility/pie-form-label.spec.ts +++ b/packages/components/pie-form-label/test/accessibility/pie-form-label.spec.ts @@ -1,9 +1,14 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; -import { PieFormLabel } from '../../src/index.ts'; +import { PieFormLabel, type FormLabelProps } from '../../src/index.ts'; test.describe('PieFormLabel - Accessibility tests', () => { test('a11y - should test the PieFormLabel component WCAG compliance', async ({ makeAxeBuilder, mount }) => { - await mount(PieFormLabel); + await mount( + PieFormLabel, + { + props: {} as FormLabelProps, + }, + ); const results = await makeAxeBuilder().analyze(); diff --git a/packages/components/pie-icon-button/src/index.ts b/packages/components/pie-icon-button/src/index.ts index 80b644f4d7..a71ea5c6b5 100644 --- a/packages/components/pie-icon-button/src/index.ts +++ b/packages/components/pie-icon-button/src/index.ts @@ -1,15 +1,13 @@ import { - LitElement, type TemplateResult, html, unsafeCSS, + LitElement, html, unsafeCSS, } from 'lit'; import { property } from 'lit/decorators.js'; - import { validPropertyValues, defineCustomElement } from '@justeattakeaway/pie-webc-core'; -import '@justeattakeaway/pie-spinner'; - import styles from './iconButton.scss?inline'; import { type IconButtonProps, sizes, variants, defaultProps, } from './defs'; +import '@justeattakeaway/pie-spinner'; // Valid values available to consumers export * from './defs'; @@ -39,7 +37,7 @@ export class PieIconButton extends LitElement implements IconButtonProps { * * @private */ - private renderSpinner (): TemplateResult { + private renderSpinner () { const { variant, size, disabled } = this; const spinnerSize = size === 'xsmall' ? 'small' : 'medium'; let spinnerVariant = 'brand'; diff --git a/packages/components/pie-link/src/index.ts b/packages/components/pie-link/src/index.ts index 49b306be02..199e723bf1 100644 --- a/packages/components/pie-link/src/index.ts +++ b/packages/components/pie-link/src/index.ts @@ -7,7 +7,14 @@ import { ifDefined } from 'lit/directives/if-defined.js'; import { validPropertyValues, defineCustomElement } from '@justeattakeaway/pie-webc-core'; import styles from './link.scss?inline'; import { - type LinkProps, buttonTypes, defaultProps, iconPlacements, sizes, tags, underlineTypes, variants, + type LinkProps, + variants, + sizes, + iconPlacements, + tags, + buttonTypes, + underlineTypes, + defaultProps, } from './defs'; // Valid values available to consumers diff --git a/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts b/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts index c8b4fc205a..0176036f2f 100644 --- a/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts +++ b/packages/components/pie-notification/test/accessibility/pie-notification.spec.ts @@ -1,4 +1,3 @@ - import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts'; import { PieNotification, type NotificationProps } from '../../src/index.ts'; diff --git a/packages/components/pie-radio/test/component/pie-radio.spec.ts b/packages/components/pie-radio/test/component/pie-radio.spec.ts index 934701c7ae..6710617890 100644 --- a/packages/components/pie-radio/test/component/pie-radio.spec.ts +++ b/packages/components/pie-radio/test/component/pie-radio.spec.ts @@ -1,4 +1,3 @@ - import { test, expect } from '@sand4rt/experimental-ct-web'; import { PieRadio, type RadioProps } from '../../src/index.ts'; diff --git a/packages/components/pie-switch/test/component/pie-switch.spec.ts b/packages/components/pie-switch/test/component/pie-switch.spec.ts index 9022944783..5e80fa1c5e 100644 --- a/packages/components/pie-switch/test/component/pie-switch.spec.ts +++ b/packages/components/pie-switch/test/component/pie-switch.spec.ts @@ -1,6 +1,10 @@ import { test, expect } from '@sand4rt/experimental-ct-web'; import { PieSwitch } from '../../src/index.ts'; -import { type SwitchProps, labelPlacements, ON_SWITCH_CHANGED_EVENT } from '../../src/defs.ts'; +import { + type SwitchProps, + labelPlacements, + ON_SWITCH_CHANGED_EVENT, +} from '../../src/defs.ts'; const componentSelector = '[data-test-id="switch-component"]'; const inputSelector = '[data-test-id="switch-input"]'; diff --git a/packages/components/pie-toast/src/index.ts b/packages/components/pie-toast/src/index.ts index 51a0fcaaa1..c73459ed56 100644 --- a/packages/components/pie-toast/src/index.ts +++ b/packages/components/pie-toast/src/index.ts @@ -24,14 +24,14 @@ import '@justeattakeaway/pie-button'; import styles from './toast.scss?inline'; import { - type ActionProps, type ToastProps, - componentClass, componentSelector, - defaultProps, + componentClass, + type ActionProps, ON_TOAST_CLOSE_EVENT, - ON_TOAST_LEADING_ACTION_CLICK_EVENT, ON_TOAST_OPEN_EVENT, + ON_TOAST_LEADING_ACTION_CLICK_EVENT, + defaultProps, variants, } from './defs'; diff --git a/packages/components/pie-webc-core/src/mixins/rtl/rtlMixin.ts b/packages/components/pie-webc-core/src/mixins/rtl/rtlMixin.ts index 1c3840bc87..0c6c5a4231 100644 --- a/packages/components/pie-webc-core/src/mixins/rtl/rtlMixin.ts +++ b/packages/components/pie-webc-core/src/mixins/rtl/rtlMixin.ts @@ -1,6 +1,5 @@ -/* eslint-disable max-classes-per-file */ import { type LitElement, isServer } from 'lit'; -import type { GenericConstructor } from '../types/GenericConstructor'; +import { type GenericConstructor } from '../types/GenericConstructor'; /** * An interface representing the structure of RTL related class. From 7cb400001a3f63c6d5459505d781f5f3945a8b67 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Wed, 18 Sep 2024 15:45:28 +0100 Subject: [PATCH 11/14] Update changelog --- .changeset/heavy-phones-talk.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.changeset/heavy-phones-talk.md b/.changeset/heavy-phones-talk.md index 619213e581..cb60235796 100644 --- a/.changeset/heavy-phones-talk.md +++ b/.changeset/heavy-phones-talk.md @@ -13,9 +13,10 @@ "@justeattakeaway/pie-icon-button": patch "@justeattakeaway/pie-icons-react": patch "@justeattakeaway/pie-icons-vue": patch -"@justeattakeaway/pie-link": patch +"@justeattakeaway/pie-lottie-player": patch "@justeattakeaway/pie-modal": patch "@justeattakeaway/pie-notification": patch +"@justeattakeaway/pie-radio": patch "@justeattakeaway/pie-spinner": patch "@justeattakeaway/pie-switch": patch "@justeattakeaway/pie-tag": patch @@ -25,7 +26,9 @@ "@justeattakeaway/pie-webc-core": patch "@justeattakeaway/pie-webc-testing": patch "@justeattakeaway/pie-wrapper-react": patch +"pie-docs": patch "pie-storybook": patch --- [Fixed] - Imports to align with new linting rule +[Removed] - Empty lines at the start of some files From f1c000390512da9bba04a5faad0ee557dcb9423d Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Tue, 1 Oct 2024 14:08:56 +0100 Subject: [PATCH 12/14] Update changeset --- .changeset/heavy-phones-talk.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.changeset/heavy-phones-talk.md b/.changeset/heavy-phones-talk.md index cb60235796..039ac1870e 100644 --- a/.changeset/heavy-phones-talk.md +++ b/.changeset/heavy-phones-talk.md @@ -6,21 +6,14 @@ "@justeattakeaway/pie-checkbox": patch "@justeattakeaway/pie-checkbox-group": patch "@justeattakeaway/pie-chip": patch -"@justeattakeaway/pie-cookie-banner": patch "@justeattakeaway/pie-css": patch -"@justeattakeaway/pie-divider": patch "@justeattakeaway/pie-form-label": patch "@justeattakeaway/pie-icon-button": patch "@justeattakeaway/pie-icons-react": patch -"@justeattakeaway/pie-icons-vue": patch "@justeattakeaway/pie-lottie-player": patch "@justeattakeaway/pie-modal": patch "@justeattakeaway/pie-notification": patch -"@justeattakeaway/pie-radio": patch -"@justeattakeaway/pie-spinner": patch "@justeattakeaway/pie-switch": patch -"@justeattakeaway/pie-tag": patch -"@justeattakeaway/pie-text-input": patch "@justeattakeaway/pie-textarea": patch "@justeattakeaway/pie-toast": patch "@justeattakeaway/pie-webc-core": patch From ca639df7df2ae308e64d6583468a789e368e46d2 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Tue, 1 Oct 2024 14:45:18 +0100 Subject: [PATCH 13/14] Fix ts error in vue example app --- apps/examples/wc-vue3/tsconfig.json | 6 +++- yarn.lock | 56 +++++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/apps/examples/wc-vue3/tsconfig.json b/apps/examples/wc-vue3/tsconfig.json index 67fd783b1e..ac92bf4b9a 100644 --- a/apps/examples/wc-vue3/tsconfig.json +++ b/apps/examples/wc-vue3/tsconfig.json @@ -4,7 +4,11 @@ "compilerOptions": { "allowJs": true, // allow JavaScript files to be imported "baseUrl": ".", - "ignoreDeprecations": "5.0", + // workaround for https://github.com/vuejs/tsconfig/issues/6 + "preserveValueImports": false, + "importsNotUsedAsValues": "remove", + "verbatimModuleSyntax": true, + // end workaround "paths": { "@/*": ["./src/*"] } diff --git a/yarn.lock b/yarn.lock index 68a9166f85..f7b126b721 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1179,6 +1179,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.3": + version: 7.25.6 + resolution: "@babel/parser@npm:7.25.6" + dependencies: + "@babel/types": ^7.25.6 + bin: + parser: ./bin/babel-parser.js + checksum: 85b237ded09ee43cc984493c35f3b1ff8a83e8dbbb8026b8132e692db6567acc5a1659ec928e4baa25499ddd840d7dae9dee3062be7108fe23ec5f94a8066b1e + languageName: node + linkType: hard + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.5, @babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.24.7" @@ -2931,6 +2942,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/types@npm:7.25.6" + dependencies: + "@babel/helper-string-parser": ^7.24.8 + "@babel/helper-validator-identifier": ^7.24.7 + to-fast-properties: ^2.0.0 + checksum: 9b2f84ff3f874ad05b0b9bf06862c56f478b65781801f82296b4cc01bee39e79c20a7c0a06959fed0ee582c8267e1cb21638318655c5e070b0287242a844d1c9 + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -10198,6 +10220,19 @@ __metadata: languageName: node linkType: hard +"@vue/compiler-core@npm:3.5.10": + version: 3.5.10 + resolution: "@vue/compiler-core@npm:3.5.10" + dependencies: + "@babel/parser": ^7.25.3 + "@vue/shared": 3.5.10 + entities: ^4.5.0 + estree-walker: ^2.0.2 + source-map-js: ^1.2.0 + checksum: 7c13ccff151818d757c5985e286f596ff2daf0a6b03ecc9f67035cdcd91b463563da8a4e6190db3367d73fcaa07804060beb4f51ed532ad5f1f602b47d29783f + languageName: node + linkType: hard + "@vue/compiler-dom@npm:3.2.47": version: 3.2.47 resolution: "@vue/compiler-dom@npm:3.2.47" @@ -10208,7 +10243,7 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-dom@npm:3.4.33, @vue/compiler-dom@npm:^3.4.0": +"@vue/compiler-dom@npm:3.4.33": version: 3.4.33 resolution: "@vue/compiler-dom@npm:3.4.33" dependencies: @@ -10218,6 +10253,16 @@ __metadata: languageName: node linkType: hard +"@vue/compiler-dom@npm:^3.4.0": + version: 3.5.10 + resolution: "@vue/compiler-dom@npm:3.5.10" + dependencies: + "@vue/compiler-core": 3.5.10 + "@vue/shared": 3.5.10 + checksum: 63354721022c948573303556c031365be6e2957bbc222d643be500129a1799e00a37ac3dc2b4b653c78e8c64a165367e13ca6e187f6cf7a69ce9c6fc73fd762d + languageName: node + linkType: hard + "@vue/compiler-sfc@npm:2.7.14": version: 2.7.14 resolution: "@vue/compiler-sfc@npm:2.7.14" @@ -10451,13 +10496,20 @@ __metadata: languageName: node linkType: hard -"@vue/shared@npm:3.4.33, @vue/shared@npm:^3.2.47, @vue/shared@npm:^3.4.0": +"@vue/shared@npm:3.4.33, @vue/shared@npm:^3.2.47": version: 3.4.33 resolution: "@vue/shared@npm:3.4.33" checksum: f2e99629b3f03165cf749e3beae1b4c73b5400f81500159af69977107e9454c15648c3b68ccd4542229c0c497c52d45925518cd1390fa1f8adcf861e7aca2061 languageName: node linkType: hard +"@vue/shared@npm:3.5.10, @vue/shared@npm:^3.4.0": + version: 3.5.10 + resolution: "@vue/shared@npm:3.5.10" + checksum: 87d2fa140f80c1a4fc657b9b37b1db41ef89e8037c76b04c8ad0115fecc56d10e9694247d07b6a2f669d6af92c2377f722ac0380c9c9675410091d7b7839e701 + languageName: node + linkType: hard + "@vue/test-utils@npm:1.1.3": version: 1.1.3 resolution: "@vue/test-utils@npm:1.1.3" From 01780e3f9dec9fcb2c2acd3512b8f3a1b9159202 Mon Sep 17 00:00:00 2001 From: Xander Marjoram Date: Tue, 1 Oct 2024 16:47:07 +0100 Subject: [PATCH 14/14] Undo typescript-eslint upgrade --- package.json | 4 +- yarn.lock | 209 ++++++++++++--------------------------------------- 2 files changed, 52 insertions(+), 161 deletions(-) diff --git a/package.json b/package.json index 03c6e0f5c2..18ca0dce66 100644 --- a/package.json +++ b/package.json @@ -88,8 +88,8 @@ "@sand4rt/experimental-ct-web": "1.41.0", "@types/node": "20.4.8", "@types/react": "18.3.3", - "@typescript-eslint/eslint-plugin": "7.3.1", - "@typescript-eslint/parser": "7.3.1", + "@typescript-eslint/eslint-plugin": "5.62.0", + "@typescript-eslint/parser": "5.62.0", "@vitest/coverage-c8": "0.29.8", "autoprefixer": "10.4.20", "babel-loader": "8.3.0", diff --git a/yarn.lock b/yarn.lock index f7b126b721..cd29a26fed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1179,17 +1179,6 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.25.3": - version: 7.25.6 - resolution: "@babel/parser@npm:7.25.6" - dependencies: - "@babel/types": ^7.25.6 - bin: - parser: ./bin/babel-parser.js - checksum: 85b237ded09ee43cc984493c35f3b1ff8a83e8dbbb8026b8132e692db6567acc5a1659ec928e4baa25499ddd840d7dae9dee3062be7108fe23ec5f94a8066b1e - languageName: node - linkType: hard - "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.5, @babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.24.7" @@ -2942,17 +2931,6 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.25.6": - version: 7.25.6 - resolution: "@babel/types@npm:7.25.6" - dependencies: - "@babel/helper-string-parser": ^7.24.8 - "@babel/helper-validator-identifier": ^7.24.7 - to-fast-properties: ^2.0.0 - checksum: 9b2f84ff3f874ad05b0b9bf06862c56f478b65781801f82296b4cc01bee39e79c20a7c0a06959fed0ee582c8267e1cb21638318655c5e070b0287242a844d1c9 - languageName: node - linkType: hard - "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -4913,7 +4891,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.6.1": version: 4.11.0 resolution: "@eslint-community/regexpp@npm:4.11.0" checksum: 97d2fe46690b69417a551bd19a3dc53b6d9590d2295c43cc4c4e44e64131af541e2f4a44d5c12e87de990403654d3dae9d33600081f3a2f0386b368abc9111ec @@ -9352,7 +9330,7 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:^7.5.0": +"@types/semver@npm:^7.3.12, @types/semver@npm:^7.5.0": version: 7.5.8 resolution: "@types/semver@npm:7.5.8" checksum: ea6f5276f5b84c55921785a3a27a3cd37afee0111dfe2bcb3e03c31819c197c782598f17f0b150a69d453c9584cd14c4c4d7b9a55d2c5e6cacd4d66fdb3b3663 @@ -9568,50 +9546,31 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:7.3.1": - version: 7.3.1 - resolution: "@typescript-eslint/eslint-plugin@npm:7.3.1" +"@typescript-eslint/eslint-plugin@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0" dependencies: - "@eslint-community/regexpp": ^4.5.1 - "@typescript-eslint/scope-manager": 7.3.1 - "@typescript-eslint/type-utils": 7.3.1 - "@typescript-eslint/utils": 7.3.1 - "@typescript-eslint/visitor-keys": 7.3.1 + "@eslint-community/regexpp": ^4.4.0 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/type-utils": 5.62.0 + "@typescript-eslint/utils": 5.62.0 debug: ^4.3.4 graphemer: ^1.4.0 - ignore: ^5.2.4 - natural-compare: ^1.4.0 - semver: ^7.5.4 - ts-api-utils: ^1.0.1 - peerDependencies: - "@typescript-eslint/parser": ^7.0.0 - eslint: ^8.56.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: fa4570552574e37ce70932a348105b98ceb623d38a962486d6b39bbec7d63c7c6dae30b7ee596acfb5a3146fdbe3e36cdb915aa10543d703d6e33f10f1005a7c - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:7.3.1": - version: 7.3.1 - resolution: "@typescript-eslint/parser@npm:7.3.1" - dependencies: - "@typescript-eslint/scope-manager": 7.3.1 - "@typescript-eslint/types": 7.3.1 - "@typescript-eslint/typescript-estree": 7.3.1 - "@typescript-eslint/visitor-keys": 7.3.1 - debug: ^4.3.4 + ignore: ^5.2.0 + natural-compare-lite: ^1.4.0 + semver: ^7.3.7 + tsutils: ^3.21.0 peerDependencies: - eslint: ^8.56.0 + "@typescript-eslint/parser": ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 8d3c90d2756de25bebf0b015f89149c1c0359aa328f7c04dc22381a807e01d54922df561bd6457377d96097d6c41fe9c2579ab0b86b8a44c0f328475e0b671d7 + checksum: fc104b389c768f9fa7d45a48c86d5c1ad522c1d0512943e782a56b1e3096b2cbcc1eea3fcc590647bf0658eef61aac35120a9c6daf979bf629ad2956deb516a1 languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.42.0": +"@typescript-eslint/parser@npm:5.62.0, @typescript-eslint/parser@npm:^5.42.0": version: 5.62.0 resolution: "@typescript-eslint/parser@npm:5.62.0" dependencies: @@ -9648,30 +9607,20 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.3.1": - version: 7.3.1 - resolution: "@typescript-eslint/scope-manager@npm:7.3.1" - dependencies: - "@typescript-eslint/types": 7.3.1 - "@typescript-eslint/visitor-keys": 7.3.1 - checksum: 94f290552d8341753a000787230118bca9b5195a0302560dca21628055c565bbc3cf9c4f28543ef5825d8ed0e05639f44c11ebc43060c9014a19b4865210ee2b - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:7.3.1": - version: 7.3.1 - resolution: "@typescript-eslint/type-utils@npm:7.3.1" +"@typescript-eslint/type-utils@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/type-utils@npm:5.62.0" dependencies: - "@typescript-eslint/typescript-estree": 7.3.1 - "@typescript-eslint/utils": 7.3.1 + "@typescript-eslint/typescript-estree": 5.62.0 + "@typescript-eslint/utils": 5.62.0 debug: ^4.3.4 - ts-api-utils: ^1.0.1 + tsutils: ^3.21.0 peerDependencies: - eslint: ^8.56.0 + eslint: "*" peerDependenciesMeta: typescript: optional: true - checksum: e8d65e636724a9c217a97c457445d981166e18a7192fe145e4f62b88788815a516522967d765eabb5126bfb0c4ff5ee17d83264dd1bf1d5390f6abceba058eb9 + checksum: fc41eece5f315dfda14320be0da78d3a971d650ea41300be7196934b9715f3fe1120a80207551eb71d39568275dbbcf359bde540d1ca1439d8be15e9885d2739 languageName: node linkType: hard @@ -9689,13 +9638,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:7.3.1": - version: 7.3.1 - resolution: "@typescript-eslint/types@npm:7.3.1" - checksum: b0d929da57aeaf5f7f9e4c28c7054f1510b029c821f8118d8ac225ce7e0ce77f8f422b6d8cd9c3a198cb79b97853b47f90a5b4702e7dc960e14c36881cac2adb - languageName: node - linkType: hard - "@typescript-eslint/typescript-estree@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" @@ -9733,39 +9675,21 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.3.1": - version: 7.3.1 - resolution: "@typescript-eslint/typescript-estree@npm:7.3.1" - dependencies: - "@typescript-eslint/types": 7.3.1 - "@typescript-eslint/visitor-keys": 7.3.1 - debug: ^4.3.4 - globby: ^11.1.0 - is-glob: ^4.0.3 - minimatch: 9.0.3 - semver: ^7.5.4 - ts-api-utils: ^1.0.1 - peerDependenciesMeta: - typescript: - optional: true - checksum: c2df1e09aad16deec30b8d376c93d4e4804fcd1445b7b822cba30d899165ffc681f0040e55528824fb0d36686514605a434b3c1b991860c55a12c9c8b866e27a - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:7.3.1": - version: 7.3.1 - resolution: "@typescript-eslint/utils@npm:7.3.1" +"@typescript-eslint/utils@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/utils@npm:5.62.0" dependencies: - "@eslint-community/eslint-utils": ^4.4.0 - "@types/json-schema": ^7.0.12 - "@types/semver": ^7.5.0 - "@typescript-eslint/scope-manager": 7.3.1 - "@typescript-eslint/types": 7.3.1 - "@typescript-eslint/typescript-estree": 7.3.1 - semver: ^7.5.4 + "@eslint-community/eslint-utils": ^4.2.0 + "@types/json-schema": ^7.0.9 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/typescript-estree": 5.62.0 + eslint-scope: ^5.1.1 + semver: ^7.3.7 peerDependencies: - eslint: ^8.56.0 - checksum: 1e568169fb54211f3962e1f7b945f1a65dfe0ab61839aeeee07fb091523757e54d60c95c47da1ba5cec2c2017982dd5eb1c5fd3d8743f3dd90faefbf04863ef3 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: ee9398c8c5db6d1da09463ca7bf36ed134361e20131ea354b2da16a5fdb6df9ba70c62a388d19f6eebb421af1786dbbd79ba95ddd6ab287324fc171c3e28d931 languageName: node linkType: hard @@ -9806,16 +9730,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.3.1": - version: 7.3.1 - resolution: "@typescript-eslint/visitor-keys@npm:7.3.1" - dependencies: - "@typescript-eslint/types": 7.3.1 - eslint-visitor-keys: ^3.4.1 - checksum: b2d20b33dea6cee2c078c23fb4075d68a1501f077df3aa36832cee3a97dcbb2906ad5e8b8f9da351ff3e65249074155446c7b91d7abdbb10be7082fb41e835d1 - languageName: node - linkType: hard - "@ungap/structured-clone@npm:^1.0.0, @ungap/structured-clone@npm:^1.2.0": version: 1.2.0 resolution: "@ungap/structured-clone@npm:1.2.0" @@ -10220,19 +10134,6 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-core@npm:3.5.10": - version: 3.5.10 - resolution: "@vue/compiler-core@npm:3.5.10" - dependencies: - "@babel/parser": ^7.25.3 - "@vue/shared": 3.5.10 - entities: ^4.5.0 - estree-walker: ^2.0.2 - source-map-js: ^1.2.0 - checksum: 7c13ccff151818d757c5985e286f596ff2daf0a6b03ecc9f67035cdcd91b463563da8a4e6190db3367d73fcaa07804060beb4f51ed532ad5f1f602b47d29783f - languageName: node - linkType: hard - "@vue/compiler-dom@npm:3.2.47": version: 3.2.47 resolution: "@vue/compiler-dom@npm:3.2.47" @@ -10243,7 +10144,7 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-dom@npm:3.4.33": +"@vue/compiler-dom@npm:3.4.33, @vue/compiler-dom@npm:^3.4.0": version: 3.4.33 resolution: "@vue/compiler-dom@npm:3.4.33" dependencies: @@ -10253,16 +10154,6 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-dom@npm:^3.4.0": - version: 3.5.10 - resolution: "@vue/compiler-dom@npm:3.5.10" - dependencies: - "@vue/compiler-core": 3.5.10 - "@vue/shared": 3.5.10 - checksum: 63354721022c948573303556c031365be6e2957bbc222d643be500129a1799e00a37ac3dc2b4b653c78e8c64a165367e13ca6e187f6cf7a69ce9c6fc73fd762d - languageName: node - linkType: hard - "@vue/compiler-sfc@npm:2.7.14": version: 2.7.14 resolution: "@vue/compiler-sfc@npm:2.7.14" @@ -10496,20 +10387,13 @@ __metadata: languageName: node linkType: hard -"@vue/shared@npm:3.4.33, @vue/shared@npm:^3.2.47": +"@vue/shared@npm:3.4.33, @vue/shared@npm:^3.2.47, @vue/shared@npm:^3.4.0": version: 3.4.33 resolution: "@vue/shared@npm:3.4.33" checksum: f2e99629b3f03165cf749e3beae1b4c73b5400f81500159af69977107e9454c15648c3b68ccd4542229c0c497c52d45925518cd1390fa1f8adcf861e7aca2061 languageName: node linkType: hard -"@vue/shared@npm:3.5.10, @vue/shared@npm:^3.4.0": - version: 3.5.10 - resolution: "@vue/shared@npm:3.5.10" - checksum: 87d2fa140f80c1a4fc657b9b37b1db41ef89e8037c76b04c8ad0115fecc56d10e9694247d07b6a2f669d6af92c2377f722ac0380c9c9675410091d7b7839e701 - languageName: node - linkType: hard - "@vue/test-utils@npm:1.1.3": version: 1.1.3 resolution: "@vue/test-utils@npm:1.1.3" @@ -17623,7 +17507,7 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:5.1.1": +"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" dependencies: @@ -24026,6 +23910,13 @@ __metadata: languageName: node linkType: hard +"natural-compare-lite@npm:^1.4.0": + version: 1.4.0 + resolution: "natural-compare-lite@npm:1.4.0" + checksum: 5222ac3986a2b78dd6069ac62cbb52a7bf8ffc90d972ab76dfe7b01892485d229530ed20d0c62e79a6b363a663b273db3bde195a1358ce9e5f779d4453887225 + languageName: node + linkType: hard + "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -26068,8 +25959,8 @@ __metadata: "@sand4rt/experimental-ct-web": 1.41.0 "@types/node": 20.4.8 "@types/react": 18.3.3 - "@typescript-eslint/eslint-plugin": 7.3.1 - "@typescript-eslint/parser": 7.3.1 + "@typescript-eslint/eslint-plugin": 5.62.0 + "@typescript-eslint/parser": 5.62.0 "@vitest/coverage-c8": 0.29.8 autoprefixer: 10.4.20 babel-loader: 8.3.0