Skip to content

Commit 27f005c

Browse files
committed
visual-js: fix visual-storybook lint errors
1 parent 3225345 commit 27f005c

File tree

5 files changed

+39
-18
lines changed

5 files changed

+39
-18
lines changed

Diff for: visual-js/visual-storybook/.eslintrc.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
33
parser: '@typescript-eslint/parser',
44
parserOptions: {
5-
project: './tsconfig.json',
5+
project: './tsconfig.lint.json',
66
tsconfigRootDir: __dirname,
77
sourceType: 'module',
88
},

Diff for: visual-js/visual-storybook/integration-tests/src/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import App from './App';
55
import reportWebVitals from './reportWebVitals';
66

77
const root = ReactDOM.createRoot(
8-
document.getElementById('root') as HTMLElement
8+
document.getElementById('root') as HTMLElement,
99
);
1010
root.render(
1111
<React.StrictMode>
1212
<App />
13-
</React.StrictMode>
13+
</React.StrictMode>,
1414
);
1515

1616
// If you want to start measuring performance in your app, pass a function

Diff for: visual-js/visual-storybook/integration-tests/src/stories/Page.tsx

+30-14
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,64 @@ import React from 'react';
33
import './page.css';
44

55
export const Page: React.FC = () => {
6-
76
return (
87
<article>
9-
108
<section className="storybook-page">
119
<h2>Pages in Storybook</h2>
1210
<p>
1311
We recommend building UIs with a{' '}
14-
<a href="https://componentdriven.org" target="_blank" rel="noopener noreferrer">
12+
<a
13+
href="https://componentdriven.org"
14+
target="_blank"
15+
rel="noopener noreferrer"
16+
>
1517
<strong>component-driven</strong>
1618
</a>{' '}
1719
process starting with atomic components and ending with pages.
1820
</p>
1921
<p>
20-
Render pages with mock data. This makes it easy to build and review page states without
21-
needing to navigate to them in your app. Here are some handy patterns for managing page
22-
data in Storybook:
22+
Render pages with mock data. This makes it easy to build and review
23+
page states without needing to navigate to them in your app. Here are
24+
some handy patterns for managing page data in Storybook:
2325
</p>
2426
<ul>
2527
<li>
26-
Use a higher-level connected component. Storybook helps you compose such data from the
27-
"args" of child component stories
28+
Use a higher-level connected component. Storybook helps you compose
29+
such data from the "args" of child component stories
2830
</li>
2931
<li>
30-
Assemble data in the page component from your services. You can mock these services out
31-
using Storybook.
32+
Assemble data in the page component from your services. You can mock
33+
these services out using Storybook.
3234
</li>
3335
</ul>
3436
<p>
3537
Get a guided tutorial on component-driven development at{' '}
36-
<a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer">
38+
<a
39+
href="https://storybook.js.org/tutorials/"
40+
target="_blank"
41+
rel="noopener noreferrer"
42+
>
3743
Storybook tutorials
3844
</a>
3945
. Read more in the{' '}
40-
<a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">
46+
<a
47+
href="https://storybook.js.org/docs"
48+
target="_blank"
49+
rel="noopener noreferrer"
50+
>
4151
docs
4252
</a>
4353
.
4454
</p>
4555
<div className="tip-wrapper">
46-
<span className="tip">Tip</span> Adjust the width of the canvas with the{' '}
47-
<svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
56+
<span className="tip">Tip</span> Adjust the width of the canvas with
57+
the{' '}
58+
<svg
59+
width="10"
60+
height="10"
61+
viewBox="0 0 12 12"
62+
xmlns="http://www.w3.org/2000/svg"
63+
>
4864
<g fill="none" fillRule="evenodd">
4965
<path
5066
d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"

Diff for: visual-js/visual-storybook/integration-tests/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"jsx": "react-jsx"
2222
},
2323
"include": [
24-
"src"
24+
"src/**/*.ts",
25+
"src/**/*.tsx"
2526
]
2627
}

Diff for: visual-js/visual-storybook/tsconfig.lint.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["src/**/*", "integration-tests/src/**/*", "../../@types"]
4+
}

0 commit comments

Comments
 (0)