Skip to content

Commit 61ab1a1

Browse files
author
Antoine Le Louet
committed
eslint and fix
1 parent 5ebdef2 commit 61ab1a1

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

templates/front/.storybook/main.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1-
import type { StorybookConfig } from "@storybook/react-vite";
1+
import type { StorybookConfig } from '@storybook/react-vite';
22

3-
import { join, dirname } from "path";
3+
import { join, dirname } from 'path';
44

55
/**
66
* This function is used to resolve the absolute path of a package.
77
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
88
*/
9+
// getAbsolutePath use internal types of storybook : "FrameworkName"
10+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
911
function getAbsolutePath(value: string): any {
10-
return dirname(require.resolve(join(value, "package.json")));
12+
return dirname(require.resolve(join(value, 'package.json')));
1113
}
1214

1315
const config: StorybookConfig = {
14-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
16+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
1517
addons: [
16-
getAbsolutePath("@storybook/addon-interactions"),
17-
getAbsolutePath("@storybook/addon-links"),
18-
getAbsolutePath("@storybook/addon-essentials"),
19-
getAbsolutePath("@storybook/addon-onboarding"),
18+
getAbsolutePath('@storybook/addon-interactions'),
19+
getAbsolutePath('@storybook/addon-links'),
20+
getAbsolutePath('@storybook/addon-essentials'),
21+
getAbsolutePath('@storybook/addon-onboarding'),
2022
],
2123
framework: {
22-
name: getAbsolutePath("@storybook/react-vite"),
24+
name: getAbsolutePath('@storybook/react-vite'),
2325
options: {},
2426
},
2527
docs: {
26-
autodocs: "tag",
28+
autodocs: 'tag',
2729
},
2830
};
2931
export default config;

templates/front/.storybook/preview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import type { Preview } from "@storybook/react";
1+
import type { Preview } from '@storybook/react';
22

33
// Import du CSS de l'application
44
import '../assets/scss/app.scss';
55

66
const preview: Preview = {
77
parameters: {
8-
actions: { argTypesRegex: "^on[A-Z].*" },
8+
actions: { argTypesRegex: '^on[A-Z].*' },
99
controls: {
1010
matchers: {
1111
color: /(background|color)$/i,

0 commit comments

Comments
 (0)