Skip to content

Commit

Permalink
chore(devdeps): update dependency prettier to v2.5.0 (#950)
Browse files Browse the repository at this point in the history
* chore(devdeps): update dependency prettier to v2.5.0

* style: format

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Emmanuel Chambon <[email protected]>
  • Loading branch information
3 people authored Nov 30, 2021
1 parent 2e020dc commit 020b776
Show file tree
Hide file tree
Showing 31 changed files with 316 additions and 299 deletions.
18 changes: 10 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
11 changes: 4 additions & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@

## Relevant logs and/or screenshots

Page | Before | After
:- | :-: | -:
url | screenshot | screenshot
url | screenshot | screenshot



| Page | Before | After |
| :--- | :--------: | ---------: |
| url | screenshot | screenshot |
| url | screenshot | screenshot |
5 changes: 1 addition & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"enabledManagers": ["dockerfile", "npm"],
"extends": [
"config:base",
":combinePatchMinorReleases"
],
"extends": ["config:base", ":combinePatchMinorReleases"],
"reviewers": ["team:scaleway/console"],
"prHourlyLimit": 5,
"prConcurrentLimit": 10,
Expand Down
28 changes: 14 additions & 14 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down Expand Up @@ -73,4 +73,4 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
https://www.contributor-covenant.org/faq
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ $ yarn add @scaleway/ui @emotion/react @emotion/styled
```

```js
import { theme, Button } from "@scaleway/ui";
import { ThemeProvider } from "@emotion/react";
import { theme, Button } from '@scaleway/ui'
import { ThemeProvider } from '@emotion/react'

const App = () => (
<ThemeProvider theme={theme}>
<Button variant="primary" onClick={() => console.log("clicked")}>
<Button variant="primary" onClick={() => console.log('clicked')}>
Click Me
</Button>
</ThemeProvider>
);
)
```

N.B. To allow typescript theme typings with `@emotion/styled` components,
Expand All @@ -40,16 +40,18 @@ you'll have to define the `@emotion/react` module `Theme` interface in your proj
Example, in a `global.d.ts` file:

- Declaration to use the default Scaleway theme

```ts
declare module '@emotion/react' {
import type { SCWUITheme } from '@scaleway/ui'
// https://emotion.sh/docs/typescript#define-a-theme
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Theme extends SCWUITheme {}
}

```
- Declaration to use your custom theme

- Declaration to use your custom theme

```ts
import type { MyTheme } from './src/theme'

Expand All @@ -58,7 +60,6 @@ declare module '@emotion/react' {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Theme extends MyTheme {}
}

```

## Development
Expand All @@ -73,7 +74,7 @@ $ yarn run start

### Test

#### Unit
#### Unit

```sh
$ yarn run test # Will run all tests
Expand All @@ -84,6 +85,7 @@ $ yarn run test:coverage --coverageReporters lcov && open coverage/lcov-report/i
```

#### Accessibility

```sh
$ yarn run test:a11y # Will run all accessibility tests
$ yarn run test:a11y src/components/Alert # Will run accessibility test of Alert component only
Expand Down
5 changes: 4 additions & 1 deletion babel.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"presets": [
"@babel/preset-typescript",
["@babel/preset-env", { "shippedProposals": true, "targets": { "node": "current" } }],
[
"@babel/preset-env",
{ "shippedProposals": true, "targets": { "node": "current" } }
],
"@babel/preset-react",
[
"@emotion/babel-preset-css-prop",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"jest-junit": "13.0.0",
"lint-staged": "12.1.2",
"postcss": "8.3.11",
"prettier": "2.4.1",
"prettier": "2.5.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-router-dom": "6.0.2",
Expand Down
5 changes: 4 additions & 1 deletion src/__stories__/components/ErrorTransition.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import PropTypes from 'prop-types'
import React, { VoidFunctionComponent, useLayoutEffect, useState } from 'react'

const ErrorTransition: VoidFunctionComponent<{ error: unknown, Component: React.ElementType }> = ({ error, Component, ...props }) => {
const ErrorTransition: VoidFunctionComponent<{
error: unknown
Component: React.ElementType
}> = ({ error, Component, ...props }) => {
const [err, setErr] = useState<unknown>()
useLayoutEffect(() => {
const timer = setTimeout(() => setErr(error), 2000)
Expand Down
16 changes: 6 additions & 10 deletions src/components/Box/__stories__/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,19 @@ Default.parameters = {
export const Bordered = Template.bind({})
Bordered.parameters = {
docs: {
storyDescription: 'Using prop `bordered` you can add a border and some padding on a Box.',
storyDescription:
'Using prop `bordered` you can add a border and some padding on a Box.',
},
}
Bordered.decorators = [
() => (
<Box bordered>This is a bordered box</Box>
),
]
Bordered.decorators = [() => <Box bordered>This is a bordered box</Box>]

export const OtherElement = Template.bind({})
OtherElement.parameters = {
docs: {
storyDescription: 'Using prop `as` you can specify another html or React element instead of the default div.',
storyDescription:
'Using prop `as` you can specify another html or React element instead of the default div.',
},
}
OtherElement.decorators = [
() => (
<Box as="span">This is a Box as a span tag</Box>
),
() => <Box as="span">This is a Box as a span tag</Box>,
]
10 changes: 6 additions & 4 deletions src/components/Boxer/__stories__/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ export default {
title: 'Components/Container/Boxer',
} as Meta

const Template: Story<Record<string, never>> = args => <Boxer {...args}>
<div>Children 1 - I&apos;m in a box component</div>
<span>Children 2 - I&apos;m in a box component too</span>
</Boxer>
const Template: Story<Record<string, never>> = args => (
<Boxer {...args}>
<div>Children 1 - I&apos;m in a box component</div>
<span>Children 2 - I&apos;m in a box component too</span>
</Boxer>
)

export const Default = Template.bind({})

Expand Down
7 changes: 4 additions & 3 deletions src/components/Breadcrumbs/__stories__/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Default.parameters = {
Creates a Breadcrumbs of hierarchical pages.
Link are automatically supported with \`to\` prop using the \`linkComponent\` from
your theme configuration.
`
}
`,
},
}

export const Variants = Template.bind({})
Expand Down Expand Up @@ -55,7 +55,8 @@ Variants.decorators = [
export const Selected = Template.bind({})
Selected.parameters = {
docs: {
storyDescription: 'Selected is automatically determined as the last element. One can be specified using `selected` prop.',
storyDescription:
'Selected is automatically determined as the last element. One can be specified using `selected` prop.',
},
}

Expand Down
5 changes: 4 additions & 1 deletion src/components/BulletList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export interface BulletListProps {
children: ReactNode
}

const BulletList: FunctionComponent<BulletListProps> = ({ children, keyPrefix }) => (
const BulletList: FunctionComponent<BulletListProps> = ({
children,
keyPrefix,
}) => (
<Steps>
{Children.toArray(children).map((child, index) => (
<Step key={`${keyPrefix ? `${keyPrefix}-` : ''}bullet-${index + 1}`}>
Expand Down
5 changes: 1 addition & 4 deletions src/components/Modal/__stories__/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,7 @@ PreventBodyScroll.parameters = {
}
PreventBodyScroll.decorators = [
() => (
<Modal
disclosure={<Button>preventBodyScroll</Button>}
preventBodyScroll
>
<Modal disclosure={<Button>preventBodyScroll</Button>} preventBodyScroll>
<Box p={4}>
Try to scroll on body ( outside of the Modal ) preventBodyScroll is
available only when modal props is enabled
Expand Down
Loading

0 comments on commit 020b776

Please sign in to comment.