Skip to content

Commit a8fe2b4

Browse files
authored
chore(storybook): update eslint-plugin-storybook dep & use recommended name config (#5353)
The changes were created by running the storybook script `npx storybook@latest upgrade`
1 parent 9f6840c commit a8fe2b4

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.storybook/main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { dirname, join } from 'path';
12
import type { StorybookConfig } from '@storybook/react-vite';
23
import remarkGfm from 'remark-gfm';
34
import { isChromatic } from './utils';
@@ -28,7 +29,7 @@ if (isDevMode) {
2829

2930
const config: StorybookConfig = {
3031
framework: {
31-
name: '@storybook/react-vite',
32+
name: getAbsolutePath('@storybook/react-vite'),
3233
options: {}
3334
},
3435
stories: isChromatic
@@ -78,3 +79,7 @@ const config: StorybookConfig = {
7879
};
7980

8081
export default config;
82+
83+
function getAbsolutePath(value: string): any {
84+
return dirname(require.resolve(join(value, 'package.json')));
85+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"eslint-plugin-prettier": "^5.0.0",
7676
"eslint-plugin-react": "^7.32.2",
7777
"eslint-plugin-react-hooks": "^4.6.0",
78-
"eslint-plugin-storybook": "^0.6.14",
78+
"eslint-plugin-storybook": "^0.6.15",
7979
"handlebars": "^4.7.7",
8080
"husky": "^8.0.0",
8181
"identity-obj-proxy": "^3.0.0",

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11048,7 +11048,7 @@ __metadata:
1104811048
languageName: node
1104911049
linkType: hard
1105011050

11051-
"eslint-plugin-storybook@npm:^0.6.14":
11051+
"eslint-plugin-storybook@npm:^0.6.15":
1105211052
version: 0.6.15
1105311053
resolution: "eslint-plugin-storybook@npm:0.6.15"
1105411054
dependencies:
@@ -21918,7 +21918,7 @@ __metadata:
2191821918
eslint-plugin-prettier: "npm:^5.0.0"
2191921919
eslint-plugin-react: "npm:^7.32.2"
2192021920
eslint-plugin-react-hooks: "npm:^4.6.0"
21921-
eslint-plugin-storybook: "npm:^0.6.14"
21921+
eslint-plugin-storybook: "npm:^0.6.15"
2192221922
handlebars: "npm:^4.7.7"
2192321923
husky: "npm:^8.0.0"
2192421924
identity-obj-proxy: "npm:^3.0.0"

0 commit comments

Comments
 (0)