Skip to content

Commit a440c8e

Browse files
committed
Allow component composition and some cleanup
1 parent d98a4ca commit a440c8e

14 files changed

+1195
-915
lines changed

.storybook/main.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@ import type { StorybookConfig } from "@storybook/react-vite"
22

33
const config: StorybookConfig = {
44
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5-
addons: [
6-
"@storybook/addon-essentials",
7-
"@chromatic-com/storybook",
8-
"@storybook/addon-interactions",
9-
"@storybook/addon-themes",
10-
],
5+
addons: ["@storybook/addon-essentials", "@chromatic-com/storybook", "@storybook/addon-interactions", "@storybook/addon-themes"],
116
framework: {
127
name: "@storybook/react-vite",
13-
options: {},
8+
options: {}
149
},
15-
staticDirs: [{ from: "../public", to: "/" }],
10+
staticDirs: [{ from: "../public", to: "/" }]
1611
}
1712
export default config

.storybook/preview.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ const preview: Preview = {
88
controls: {
99
matchers: {
1010
color: /(background|color)$/i,
11-
date: /Date$/i,
12-
},
13-
},
11+
date: /Date$/i
12+
}
13+
}
1414
},
1515

1616
decorators: [
1717
withThemeByClassName({
1818
themes: {
1919
// nameOfTheme: 'classNameForTheme',
2020
light: "",
21-
dark: "dark",
21+
dark: "dark"
2222
},
23-
defaultTheme: "light",
24-
}),
25-
],
23+
defaultTheme: "light"
24+
})
25+
]
2626
}
2727

2828
export default preview

eslint.config.js

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
1+
import js from "@eslint/js"
2+
import globals from "globals"
3+
import reactHooks from "eslint-plugin-react-hooks"
4+
import reactRefresh from "eslint-plugin-react-refresh"
5+
import tseslint from "typescript-eslint"
66

77
export default tseslint.config(
8-
{ ignores: ['dist'] },
9-
{
10-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11-
files: ['**/*.{ts,tsx}'],
12-
languageOptions: {
13-
ecmaVersion: 2020,
14-
globals: globals.browser,
15-
},
16-
plugins: {
17-
'react-hooks': reactHooks,
18-
'react-refresh': reactRefresh,
19-
},
20-
rules: {
21-
...reactHooks.configs.recommended.rules,
22-
'react-refresh/only-export-components': [
23-
'warn',
24-
{ allowConstantExport: true },
25-
],
26-
},
27-
},
8+
{ ignores: ["dist"] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ["**/*.{ts,tsx}"],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser
15+
},
16+
plugins: {
17+
"react-hooks": reactHooks,
18+
"react-refresh": reactRefresh
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
23+
"no-unused-vars": ["off"],
24+
"@typescript-eslint/no-unused-vars": ["warn"]
25+
}
26+
}
2827
)

0 commit comments

Comments
 (0)