diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index dd84ea7824..b5c68e55be 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
-
---
**Describe the bug**
@@ -12,6 +11,7 @@ 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 '....'
@@ -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.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index bbcbbe7d61..2f28cead03 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
-
---
**Is your feature request related to a problem? Please describe.**
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index b86d0c015b..2448331264 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -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 |
diff --git a/.github/renovate.json b/.github/renovate.json
index ca2207f2b3..857984f787 100644
--- a/.github/renovate.json
+++ b/.github/renovate.json
@@ -1,9 +1,6 @@
{
"enabledManagers": ["dockerfile", "npm"],
- "extends": [
- "config:base",
- ":combinePatchMinorReleases"
- ],
+ "extends": ["config:base", ":combinePatchMinorReleases"],
"reviewers": ["team:scaleway/console"],
"prHourlyLimit": 5,
"prConcurrentLimit": 10,
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 15b34b79a7..daa97f4e4d 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -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
@@ -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
\ No newline at end of file
+https://www.contributor-covenant.org/faq
diff --git a/README.md b/README.md
index 8898dade67..047f1a8ff8 100644
--- a/README.md
+++ b/README.md
@@ -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 = () => (
-
-);
+)
```
N.B. To allow typescript theme typings with `@emotion/styled` components,
@@ -40,6 +40,7 @@ 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'
@@ -47,9 +48,10 @@ declare module '@emotion/react' {
// 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'
@@ -58,7 +60,6 @@ declare module '@emotion/react' {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Theme extends MyTheme {}
}
-
```
## Development
@@ -73,7 +74,7 @@ $ yarn run start
### Test
-#### Unit
+#### Unit
```sh
$ yarn run test # Will run all tests
@@ -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
diff --git a/babel.config.json b/babel.config.json
index 2a1a7be1ea..b87dcfbc44 100644
--- a/babel.config.json
+++ b/babel.config.json
@@ -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",
diff --git a/package.json b/package.json
index a3e56a7983..c8fe4d7a20 100644
--- a/package.json
+++ b/package.json
@@ -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",
diff --git a/src/__stories__/components/ErrorTransition.tsx b/src/__stories__/components/ErrorTransition.tsx
index 0125719e04..c81d5fb368 100644
--- a/src/__stories__/components/ErrorTransition.tsx
+++ b/src/__stories__/components/ErrorTransition.tsx
@@ -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()
useLayoutEffect(() => {
const timer = setTimeout(() => setErr(error), 2000)
diff --git a/src/components/Box/__stories__/index.stories.tsx b/src/components/Box/__stories__/index.stories.tsx
index 9eaab58d18..2ffee8fa2d 100644
--- a/src/components/Box/__stories__/index.stories.tsx
+++ b/src/components/Box/__stories__/index.stories.tsx
@@ -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 = [
- () => (
- This is a bordered box
- ),
-]
+Bordered.decorators = [() => This is a bordered 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 = [
- () => (
- This is a Box as a span tag
- ),
+ () => This is a Box as a span tag,
]
diff --git a/src/components/Boxer/__stories__/index.stories.tsx b/src/components/Boxer/__stories__/index.stories.tsx
index e545018840..bcafb7650e 100644
--- a/src/components/Boxer/__stories__/index.stories.tsx
+++ b/src/components/Boxer/__stories__/index.stories.tsx
@@ -7,10 +7,12 @@ export default {
title: 'Components/Container/Boxer',
} as Meta
-const Template: Story> = args =>
-
Children 1 - I'm in a box component
- Children 2 - I'm in a box component too
-
+const Template: Story> = args => (
+
+