@faststore/core 0.3.13 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/.eslintrc.json +3 -0
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +1 -1
  4. package/cypress/integration/analytics.test.js +24 -5
  5. package/cypress/integration/cart.test.js +4 -2
  6. package/cypress/integration/plp.test.js +1 -1
  7. package/cypress/integration/search.test.js +6 -1
  8. package/package.json +7 -7
  9. package/src/components/cms/RenderPageSections.tsx +6 -3
  10. package/src/components/common/Footer/Footer.tsx +9 -9
  11. package/src/components/sections/Hero/Hero.tsx +28 -77
  12. package/src/components/ui/Price/Price.tsx +2 -3
  13. package/src/components/ui/ShippingSimulation/useShippingSimulation.ts +1 -1
  14. package/src/customizations/components/index.ts +1 -0
  15. package/src/pages/[...slug].tsx +8 -8
  16. package/src/pages/s.tsx +2 -2
  17. package/src/sdk/error/ErrorBoundary/ErrorBoundary.tsx +0 -1
  18. package/src/sdk/ui/useOnClickOutside.ts +0 -1
  19. package/src/server/cms.ts +0 -1
  20. package/vtex.env +2 -2
  21. package/.eslintignore +0 -8
  22. package/.eslintrc +0 -21
  23. package/bun.lockb +0 -0
  24. package/renovate.json +0 -5
  25. package/src/components/sections/Hero/Hero.stories.mdx +0 -277
  26. package/src/components/sections/Hero/hero.module.scss +0 -180
  27. package/src/components/ui/SROnly/SROnly.tsx +0 -20
  28. package/src/components/ui/SROnly/index.ts +0 -1
  29. package/src/components/ui/SROnly/sr-only.module.scss +0 -15
  30. package/src/components/ui/Toggle/Toggle.stories.mdx +0 -604
  31. package/src/components/ui/Toggle/Toggle.tsx +0 -75
  32. package/src/components/ui/Toggle/index.ts +0 -2
  33. package/src/components/ui/Toggle/toggle.module.scss +0 -200
package/.eslintrc.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "next/core-web-vitals"
3
+ }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog),
6
6
  and this project adheres to [Calendar Versioning](https://calver.org/).
7
7
 
8
+ ### 0.3.15 (2023-01-03)
9
+
10
+
11
+ ### Features
12
+
13
+ * Replaces SROnly & Toggle & ToggleField FSUI ([#335](https://github.com/vtex-sites/nextjs.store/issues/335)) ([b096874](https://github.com/vtex-sites/nextjs.store/commit/b096874cae5e24fb4bfbdfd612f6bcc1f2f6bb25))
14
+
15
+
16
+ ### Chores
17
+
18
+ * Replaces `Hero` FSUI ([#324](https://github.com/vtex-sites/nextjs.store/issues/324)) ([ff40590](https://github.com/vtex-sites/nextjs.store/commit/ff40590e07716ab5d1a2b2020d9b668f73b24c90))
19
+
20
+ ### [0.3.14](https://github.com/vtex-sites/nextjs.store/compare/0.3.13...0.3.14) (2022-12-19)
21
+
22
+
23
+ ### Chores
24
+
25
+ * improve log message when component not found in cms ([#331](https://github.com/vtex-sites/nextjs.store/issues/331)) ([cee1226](https://github.com/vtex-sites/nextjs.store/commit/cee122668a3225c15731100af1e8c740efa8a5a9))
26
+
8
27
  ### [0.3.13](https://github.com/vtex-sites/nextjs.store/compare/0.3.12...0.3.13) (2022-12-19)
9
28
 
10
29
 
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <p align="center">
1
+ <p align="center">
2
2
  <a href="https://github.com/vtex/faststore">
3
3
  <img alt="Store Framework" src="https://emoji.slack-edge.com/T02BCPD0X/store-framework/7547b127e929c376.png" width="75" />
4
4
  </a>
@@ -73,6 +73,8 @@ describe('add_to_cart event', () => {
73
73
 
74
74
  // Add to cart
75
75
  cy.getById('buy-button')
76
+ .should('be.visible')
77
+ .scrollIntoView({ duration: 500 })
76
78
  .click()
77
79
  .then(($btn) => {
78
80
  cy.itemsInCart(1)
@@ -92,6 +94,8 @@ describe('add_to_cart event', () => {
92
94
 
93
95
  // Add to cart
94
96
  cy.getById('buy-button')
97
+ .should('be.visible')
98
+ .scrollIntoView({ duration: 500 })
95
99
  .click()
96
100
  .then(($btn) => {
97
101
  cy.itemsInCart(1)
@@ -143,7 +147,7 @@ describe('remove_from_cart event', () => {
143
147
 
144
148
  context('when removing a product from cart', () => {
145
149
  beforeEach(() => {
146
- cy.getById('remove-from-cart-button').click()
150
+ cy.getById('remove-from-cart-button').should('be.visible').click()
147
151
  })
148
152
 
149
153
  it('adds remove_from_cart event in the data layer', () => {
@@ -154,10 +158,14 @@ describe('remove_from_cart event', () => {
154
158
 
155
159
  // Add item to cart
156
160
  cy.getById('buy-button')
161
+ .should('be.visible')
162
+ .scrollIntoView({ duration: 500 })
157
163
  .click()
158
164
  .then(() => {
159
165
  cy.itemsInCart(1)
160
- cy.getById('checkout-button').should('be.enabled')
166
+ cy.getById('checkout-button')
167
+ .should('be.visible')
168
+ .should('be.enabled')
161
169
  cy.itemsInCart(1)
162
170
 
163
171
  // Remove the added item
@@ -189,10 +197,14 @@ describe('remove_from_cart event', () => {
189
197
  .click()
190
198
  .then(() => {
191
199
  cy.getById('buy-button')
200
+ .should('be.visible')
201
+ .scrollIntoView({ duration: 500 })
192
202
  .click()
193
203
  .then(($btn) => {
194
204
  cy.itemsInCart(2)
195
- cy.getById('checkout-button').should('be.enabled')
205
+ cy.getById('checkout-button')
206
+ .should('be.visible')
207
+ .should('be.enabled')
196
208
  cy.itemsInCart(2)
197
209
 
198
210
  // Remove the added item
@@ -202,7 +214,9 @@ describe('remove_from_cart event', () => {
202
214
  .click()
203
215
  .then(() => {
204
216
  cy.itemsInCart(1)
205
- cy.getById('checkout-button').should('be.enabled')
217
+ cy.getById('checkout-button')
218
+ .should('be.visible')
219
+ .should('be.enabled')
206
220
  cy.itemsInCart(1)
207
221
  const skuId = $btn.attr('data-sku')
208
222
 
@@ -242,6 +256,8 @@ describe('select_item event', () => {
242
256
 
243
257
  cy.getById('store-product-card').first().click()
244
258
  cy.getById('buy-button')
259
+ .should('be.visible')
260
+ .scrollIntoView({ duration: 500 })
245
261
  .then(($btn) => {
246
262
  skuId = $btn.attr('data-sku')
247
263
  })
@@ -364,7 +380,10 @@ describe('view_cart event', () => {
364
380
  cy.visit(pages.pdp, options)
365
381
  cy.waitForHydration()
366
382
 
367
- cy.getById('buy-button').click()
383
+ cy.getById('buy-button')
384
+ .should('be.visible')
385
+ .scrollIntoView({ duration: 500 })
386
+ .click()
368
387
  cy.getById('cart-sidebar').should('be.visible')
369
388
 
370
389
  dataLayerHasEvent('view_cart')
@@ -63,7 +63,9 @@ describe('On product description pages', () => {
63
63
  const sellerId = $btn.attr('data-seller')
64
64
 
65
65
  // Wait for optimistic cart to kick in
66
- cy.getById('checkout-button').should('be.enabled')
66
+ cy.getById('checkout-button')
67
+ .should('be.visible')
68
+ .should('be.enabled')
67
69
 
68
70
  cy.getById('cart-item').should(($item) => {
69
71
  expect($item.attr('data-sku')).to.eq(skuId)
@@ -86,7 +88,7 @@ describe('On product description pages', () => {
86
88
 
87
89
  cy.itemsInCart(1)
88
90
 
89
- cy.getById('checkout-button').should('be.enabled')
91
+ cy.getById('checkout-button').should('be.visible').should('be.enabled')
90
92
 
91
93
  cy.itemsInCart(1)
92
94
 
@@ -211,7 +211,7 @@ describe('Infinite Scroll pagination', () => {
211
211
 
212
212
  cy.getById('show-more').should('exist').click()
213
213
 
214
- cy.scrollTo('top')
214
+ cy.scrollTo('top', { duration: 500 })
215
215
  .location('search')
216
216
  .should('match', /page=0$/)
217
217
 
@@ -21,9 +21,14 @@ describe('Search input', () => {
21
21
  cy.visit(pages.home, options)
22
22
  cy.waitForHydration()
23
23
 
24
- cy.getById('store-input-mobile-button').click({ force: true })
24
+ cy.getById('store-input-mobile-button')
25
+ .should('exist')
26
+ .scrollIntoView({ duration: 500 })
27
+ .click({ force: true })
25
28
 
26
29
  cy.getById('store-input-mobile')
30
+ .should('exist')
31
+ .scrollIntoView({ duration: 500 })
27
32
  .click()
28
33
  .type(term)
29
34
  .within(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "license": "MIT",
5
5
  "browserslist": "supports es6-module and not dead",
6
6
  "scripts": {
@@ -12,7 +12,7 @@
12
12
  "test": "cypress open",
13
13
  "lhci": "lhci autorun",
14
14
  "format": "prettier --write \"**/*.{ts,js,tsx,jsx,json}\"",
15
- "lint": "eslint --ext js,ts,jsx,tsx .",
15
+ "lint": "next lint",
16
16
  "stylelint": "stylelint \"**/*.scss\"",
17
17
  "stylelint:fix": "stylelint \"**/*.scss\" --fix",
18
18
  "postinstall": "node postinstall.js && (is-ci || husky install) || echo Skipped postinstall step for @faststore/core",
@@ -31,17 +31,15 @@
31
31
  "@envelop/parser-cache": "^2.2.0",
32
32
  "@envelop/validation-cache": "^2.2.0",
33
33
  "@faststore/api": "^2.0.3-alpha.0",
34
- "@faststore/components": "^2.0.18-alpha.0",
34
+ "@faststore/components": "2.0.30-alpha.0",
35
35
  "@faststore/graphql-utils": "^2.0.3-alpha.0",
36
36
  "@faststore/sdk": "^2.0.3-alpha.0",
37
- "@faststore/ui": "^2.0.17-alpha.0",
37
+ "@faststore/ui": "2.0.30-alpha.0",
38
38
  "@types/react": "^18.0.14",
39
39
  "@vtex/client-cms": "^0.2.12",
40
40
  "autoprefixer": "^10.4.0",
41
+ "chalk": "^5.2.0",
41
42
  "css-loader": "^6.7.1",
42
- "eslint": "^7.22.0",
43
- "eslint-config-next": "12.1.5",
44
- "eslint-config-vtex-react": "^9.0.0",
45
43
  "graphql": "^15.0.0",
46
44
  "include-media": "^1.4.10",
47
45
  "msw": "^0.43.1",
@@ -82,6 +80,8 @@
82
80
  "cypress-axe": "^0.13.0",
83
81
  "cypress-wait-until": "^1.7.2",
84
82
  "dotenv": "^8.2.0",
83
+ "eslint": "^8.30.0",
84
+ "eslint-config-next": "^13.0.7",
85
85
  "husky": "^5.2.0",
86
86
  "is-ci": "^3.0.0",
87
87
  "lint-staged": "^10.5.4",
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
1
+ import chalk from 'chalk'
2
2
  import type { ComponentType } from 'react'
3
3
 
4
4
  import SectionBoundary from './SectionBoundary'
@@ -15,11 +15,14 @@ const RenderPageSections = ({ sections = [], context, components }: Props) => (
15
15
  const Component = components[name]
16
16
 
17
17
  if (!Component) {
18
+ // TODO: add a documentation link to help to do this
18
19
  console.info(
19
- `Could not find component for block ${name}. Add a new component for this block or remove it from the CMS`
20
+ `${chalk.yellow(
21
+ 'warn'
22
+ )} - ${name} not found. Add a new component for this section or remove it from the CMS`
20
23
  )
21
24
 
22
- return <></>
25
+ return null
23
26
  }
24
27
 
25
28
  return (
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  List as UIList,
3
3
  PaymentMethods as UIPaymentMethods,
4
+ SROnly as UISROnly,
4
5
  } from '@faststore/ui'
5
6
 
6
7
  import Logo from 'src/components/ui/Logo'
7
8
  import IncentivesFooter from 'src/components/sections/Incentives/IncentivesFooter'
8
9
  import Icon from 'src/components/ui/Icon'
9
10
  import Link from 'src/components/ui/Link'
10
- import SROnly from 'src/components/ui/SROnly'
11
11
  import { mark } from 'src/sdk/tests/mark'
12
12
 
13
13
  import styles from './footer.module.scss'
@@ -112,35 +112,35 @@ export function Footer({
112
112
  <UIList>
113
113
  <li>
114
114
  <Icon width="34px" height="24px" name="Visa" />
115
- <SROnly text="Visa" />
115
+ <UISROnly text="Visa" />
116
116
  </li>
117
117
  <li>
118
118
  <Icon width="34px" height="24px" name="Diners" />
119
- <SROnly text="Diners Club" />
119
+ <UISROnly text="Diners Club" />
120
120
  </li>
121
121
  <li>
122
122
  <Icon width="34px" height="24px" name="Mastercard" />
123
- <SROnly text="Mastercard" />
123
+ <UISROnly text="Mastercard" />
124
124
  </li>
125
125
  <li>
126
126
  <Icon width="34px" height="24px" name="EloCard" />
127
- <SROnly text="Elo Card" />
127
+ <UISROnly text="Elo Card" />
128
128
  </li>
129
129
  <li>
130
130
  <Icon width="34px" height="24px" name="PayPal" />
131
- <SROnly text="PayPal" />
131
+ <UISROnly text="PayPal" />
132
132
  </li>
133
133
  <li>
134
134
  <Icon width="34px" height="24px" name="Stripe" />
135
- <SROnly text="Stripe" />
135
+ <UISROnly text="Stripe" />
136
136
  </li>
137
137
  <li>
138
138
  <Icon width="34px" height="24px" name="GooglePay" />
139
- <SROnly text="Google Pay" />
139
+ <UISROnly text="Google Pay" />
140
140
  </li>
141
141
  <li>
142
142
  <Icon width="34px" height="24px" name="ApplePay" />
143
- <SROnly text="Apple Pay" />
143
+ <UISROnly text="Apple Pay" />
144
144
  </li>
145
145
  </UIList>
146
146
  </UIPaymentMethods>
@@ -1,78 +1,43 @@
1
- import type { ReactNode } from 'react'
1
+ import type {
2
+ HeroHeadingProps as UIHeroHeadingProps,
3
+ HeroImageProps as UIHeroImageProps,
4
+ HeroProps as UIHeroProps,
5
+ } from '@faststore/ui'
2
6
  import {
3
7
  Hero as UIHero,
4
8
  HeroHeading as UIHeroHeading,
5
9
  HeroImage as UIHeroImage,
6
- LinkButton as UILinkButton,
7
10
  } from '@faststore/ui'
8
11
 
9
- import Icon from 'src/components/ui/Icon'
10
- import Image from 'src/components/ui/Image/Image'
12
+ import { Image } from 'src/components/ui/Image'
11
13
 
12
14
  import Section from '../Section'
13
- import styles from './hero.module.scss'
14
-
15
- type Variant = 'primary' | 'secondary'
16
- type ColorVariant = 'main' | 'light' | 'accent'
17
15
 
18
- export interface HeroProps {
19
- /**
20
- * Content for the h1 tag.
21
- */
22
- title: string
23
- /**
24
- * Content for the p tag.
25
- */
26
- subtitle: string
27
- /**
28
- * Specifies the component variant.
29
- */
30
- variant?: Variant
31
- /**
32
- * Specifies the component's color variant combination.
33
- */
34
- colorVariant?: ColorVariant
35
- /**
36
- * Specifies the URL the action button goes to.
37
- */
38
- link?: string
39
- /**
40
- * Specifies the action button's content.
41
- */
42
- linkText?: string
43
- /**
44
- * Icon component for additional customization.
45
- */
46
- icon?: ReactNode
47
- /**
48
- * Specifies the image URL.
49
- */
50
- imageSrc: string
51
- /**
52
- * Alternative description of the image.
53
- */
54
- imageAlt: string
55
- }
16
+ export type HeroProps = UIHeroProps &
17
+ UIHeroHeadingProps &
18
+ UIHeroImageProps & {
19
+ /**
20
+ * Specifies the image URL.
21
+ */
22
+ imageSrc: string
23
+ /**
24
+ * Alternative description of the image.
25
+ */
26
+ imageAlt: string
27
+ }
56
28
 
57
29
  const Hero = ({
30
+ icon,
31
+ link,
58
32
  title,
59
33
  subtitle,
60
- variant = 'primary',
61
- colorVariant = 'main',
62
34
  linkText,
63
- link,
64
- icon,
65
35
  imageAlt,
66
36
  imageSrc,
67
37
  }: HeroProps) => {
68
38
  return (
69
39
  <Section>
70
- <UIHero
71
- className={styles.fsHero}
72
- data-fs-hero
73
- data-fs-hero-variant={variant}
74
- data-fs-hero-color-variant={colorVariant}
75
- >
40
+ <UIHero>
76
41
  <UIHeroImage data-fs-hero-image>
77
42
  <Image
78
43
  preload
@@ -85,27 +50,13 @@ const Hero = ({
85
50
  sizes="(max-width: 768px) 70vw, 50vw"
86
51
  />
87
52
  </UIHeroImage>
88
- <UIHeroHeading data-fs-hero-heading aria-labelledby="hero-heading">
89
- <div data-fs-hero-wrapper className="layout__content">
90
- <div data-fs-hero-info>
91
- <h1 data-fs-hero-title>{title}</h1>
92
- <p data-fs-hero-subtitle>{subtitle}</p>
93
- {!!link && (
94
- <UILinkButton
95
- href={link}
96
- inverse={colorVariant === 'main'}
97
- icon={<Icon name="ArrowRight" width={24} height={24} />}
98
- iconPosition="right"
99
- >
100
- {linkText}
101
- </UILinkButton>
102
- )}
103
- </div>
104
- {icon && variant === 'secondary' && (
105
- <div data-fs-hero-icon>{icon}</div>
106
- )}
107
- </div>
108
- </UIHeroHeading>
53
+ <UIHeroHeading
54
+ title={title}
55
+ subtitle={subtitle}
56
+ link={link}
57
+ linkText={linkText}
58
+ icon={icon}
59
+ />
109
60
  </UIHero>
110
61
  </Section>
111
62
  )
@@ -1,8 +1,7 @@
1
- import { Price as UIPrice } from '@faststore/ui'
1
+ import { Price as UIPrice, SROnly as UISROnly } from '@faststore/ui'
2
2
  import { memo } from 'react'
3
3
  import type { PriceProps } from '@faststore/ui'
4
4
 
5
- import SROnly from '../SROnly'
6
5
  import styles from './price.module.scss'
7
6
 
8
7
  type Props = PriceProps & {
@@ -19,7 +18,7 @@ type Props = PriceProps & {
19
18
  function Price({ classes = '', SRText, ...props }: Props) {
20
19
  return (
21
20
  <>
22
- <SROnly text={SRText} />
21
+ <UISROnly text={SRText} />
23
22
  <UIPrice
24
23
  data-fs-price
25
24
  className={`${styles.fsPrice} ${classes}`}
@@ -196,7 +196,7 @@ export const useShippingSimulation = (shippingItem: IShippingItem) => {
196
196
  },
197
197
  })
198
198
  }
199
- }, [shippingPostalCode])
199
+ }, [country, shippingItem, shippingPostalCode])
200
200
 
201
201
  const handleOnInput = useCallback((e: ChangeEvent<HTMLInputElement>) => {
202
202
  const currentValue = e.currentTarget.value
@@ -1 +1,2 @@
1
+ // eslint-disable-next-line import/no-anonymous-default-export
1
2
  export default {}
@@ -1,16 +1,20 @@
1
1
  import { isNotFoundError } from '@faststore/api'
2
+ import { gql } from '@faststore/graphql-utils'
3
+ import type { SearchState } from '@faststore/sdk'
2
4
  import {
3
5
  formatSearchState,
4
6
  parseSearchState,
5
7
  SearchProvider,
6
8
  } from '@faststore/sdk'
7
- import { gql } from '@faststore/graphql-utils'
9
+ import type { GetStaticPaths, GetStaticProps } from 'next'
8
10
  import { BreadcrumbJsonLd, NextSeo } from 'next-seo'
9
11
  import { useRouter } from 'next/router'
10
12
  import { useMemo } from 'react'
11
- import type { SearchState } from '@faststore/sdk'
12
- import type { GetStaticPaths, GetStaticProps } from 'next'
13
13
 
14
+ import type {
15
+ ServerCollectionPageQueryQuery,
16
+ ServerCollectionPageQueryQueryVariables,
17
+ } from '@generated/graphql'
14
18
  import Breadcrumb from 'src/components/sections/Breadcrumb'
15
19
  import Hero from 'src/components/sections/Hero'
16
20
  import ProductGallery from 'src/components/sections/ProductGallery'
@@ -21,10 +25,6 @@ import { ITEMS_PER_PAGE, ITEMS_PER_SECTION } from 'src/constants'
21
25
  import { useApplySearchState } from 'src/sdk/search/state'
22
26
  import { mark } from 'src/sdk/tests/mark'
23
27
  import { execute } from 'src/server'
24
- import type {
25
- ServerCollectionPageQueryQuery,
26
- ServerCollectionPageQueryQueryVariables,
27
- } from '@generated/graphql'
28
28
 
29
29
  import storeConfig from '../../faststore.config'
30
30
 
@@ -105,7 +105,7 @@ function Page(props: Props) {
105
105
  subtitle={`All the amazing ${title} from the brands we partner with.`}
106
106
  imageSrc="https://storeframework.vtexassets.com/arquivos/ids/190897/Photo.jpg"
107
107
  imageAlt="Quest 2 Controller on a table"
108
- icon={<Icon name="Headphones" width={48} height={48} weight="thin" />}
108
+ icon={<Icon name="Headphones" width={48} height={48} />}
109
109
  />
110
110
 
111
111
  <ProductGallery title={title} />
package/src/pages/s.tsx CHANGED
@@ -3,10 +3,10 @@ import { NextSeo } from 'next-seo'
3
3
  import { useRouter } from 'next/router'
4
4
  import { useEffect, useState } from 'react'
5
5
  import type { SearchState } from '@faststore/sdk'
6
+ import { SROnly as UISROnly } from '@faststore/ui'
6
7
 
7
8
  import Breadcrumb from 'src/components/sections/Breadcrumb'
8
9
  import ProductGallery from 'src/components/sections/ProductGallery'
9
- import SROnly from 'src/components/ui/SROnly'
10
10
  import { ITEMS_PER_PAGE } from 'src/constants'
11
11
  import { useApplySearchState } from 'src/sdk/search/state'
12
12
  import { mark } from 'src/sdk/tests/mark'
@@ -55,7 +55,7 @@ function Page() {
55
55
  }}
56
56
  />
57
57
 
58
- <SROnly as="h1" text={title} />
58
+ <UISROnly as="h1" text={title} />
59
59
 
60
60
  {/*
61
61
  WARNING: Do not import or render components from any
@@ -27,7 +27,6 @@ class ErrorBoundary extends Component<{ children: ReactNode }> {
27
27
 
28
28
  // We can't accurately type the error here, since it could vary depending on
29
29
  // what caused it. This is not standardized.
30
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
30
  public componentDidCatch(error: any, errorInfo: ErrorInfo) {
32
31
  console.error(`React Error: ${error.message} ${errorInfo.componentStack}`)
33
32
 
@@ -1,7 +1,6 @@
1
1
  import type { RefObject } from 'react'
2
2
  import { useEffect } from 'react'
3
3
 
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
4
  type Handler = (event: any) => void
6
5
 
7
6
  export default function useOnClickOutside<T extends HTMLElement = HTMLElement>(
package/src/server/cms.ts CHANGED
@@ -15,7 +15,6 @@ type Options =
15
15
  filters?: Record<string, string>
16
16
  }
17
17
 
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
18
  const isLocator = (x: any): x is Locator =>
20
19
  typeof x.contentType === 'string' &&
21
20
  (typeof x.releaseId === 'string' || typeof x.documentId === 'string')
package/vtex.env CHANGED
@@ -5,10 +5,10 @@ NEXT_TELEMETRY_DISABLED=true
5
5
  ## Enable re-using node_modules from previous runs for faster builds
6
6
  USE_BUILD_CACHE=true
7
7
 
8
- ## Enable Incremental Static Builds (ISB):
8
+ ## Enable Incremental Static Builds (ISB):
9
9
  ## https://www.faststore.dev/releases/2022/05/19/webops
10
10
  USE_STALE_CACHE=true
11
11
 
12
- ## Production site host your users will
12
+ ## Production site host your users will
13
13
  ## access your website
14
14
  SITE_HOST=demo.faststore.dev
package/.eslintignore DELETED
@@ -1,8 +0,0 @@
1
- package.json
2
- node_modules/
3
- public/
4
- coverage/
5
- .vscode/
6
- .cache/
7
- @generated
8
- src/typings/
package/.eslintrc DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "extends": [
3
- "vtex-react/gatsby",
4
- "next/core-web-vitals"
5
- ],
6
- "root": true,
7
- "rules": {
8
- "react/prop-types": "off",
9
- "react/react-in-jsx-scope": "off",
10
- "jsx-a11y/anchor-is-valid": "off"
11
- },
12
- "settings": {
13
- "react": {
14
- "version": "detect"
15
- }
16
- },
17
- "ignorePatterns": [
18
- "public/~partytown/*",
19
- "next-env.d.ts"
20
- ]
21
- }
package/bun.lockb DELETED
Binary file
package/renovate.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "extends": [
3
- "@vtex"
4
- ]
5
- }