Skip to content

Commit

Permalink
Updated according to PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdigdir committed Feb 2, 2024
1 parent 49bf5df commit 1a35352
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 334 deletions.
14 changes: 0 additions & 14 deletions storybook/.eslintrc.cjs

This file was deleted.

24 changes: 1 addition & 23 deletions storybook/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
This template provides a minimal setup to get React working in Vite.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
7 changes: 0 additions & 7 deletions storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
Expand All @@ -26,13 +25,7 @@
"@storybook/test": "^7.6.12",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"eslint-plugin-storybook": "^0.6.15",
"storybook": "^7.6.12",
"typescript": "^5.2.2",
"vite": "^5.0.8"
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/stories/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const Button = ({
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
return (
<button
type="button"
type='button'
className={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
style={{ backgroundColor }}
{...props}
Expand Down
27 changes: 0 additions & 27 deletions storybook/src/stories/Header.stories.ts

This file was deleted.

56 changes: 0 additions & 56 deletions storybook/src/stories/Header.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions storybook/src/stories/Page.stories.ts

This file was deleted.

73 changes: 0 additions & 73 deletions storybook/src/stories/Page.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions storybook/src/stories/header.css

This file was deleted.

69 changes: 0 additions & 69 deletions storybook/src/stories/page.css

This file was deleted.

0 comments on commit 1a35352

Please sign in to comment.