Skip to content

Commit ad191ec

Browse files
authored
refactor!: Refactor the code to use the syntax highlighter of Storybook (#137)
* Update the locked dev dependency of storybook to 8.2.0 * Refactor the code to use the syntax highlighter of Storybook Storybook is vendoring the syntax highlighter in their components. It can be reused without bringing a separate copy of react-syntax-highlighter. The storybook syntax highlighter also has builtin support for formatting with prettier. It is now used instead of bringing a separate copy of prettier.
1 parent 2b7b1ea commit ad191ec

File tree

7 files changed

+2155
-4849
lines changed

7 files changed

+2155
-4849
lines changed

README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,7 @@ module.exports = {
4242

4343
## Usage
4444

45-
The HTML is formatted with Prettier. You can override the Prettier config
46-
(except `parser` and `plugins`) by providing an object following the
47-
[Prettier API override format](https://prettier.io/docs/en/options.html) in the
48-
`html` parameter:
49-
50-
```js
51-
// .storybook/preview.js
52-
53-
export const parameters = {
54-
// ...
55-
html: {
56-
prettier: {
57-
tabWidth: 4,
58-
useTabs: false,
59-
htmlWhitespaceSensitivity: "strict",
60-
},
61-
},
62-
};
63-
```
45+
The HTML is formatted with Prettier.
6446

6547
You can override the wrapper element selector used to grab the component HTML.
6648

0 commit comments

Comments
 (0)