Merged in fix/3697-prettier-configs (pull request #3396)
fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import type { StorybookConfig } from '@storybook/nextjs-vite'
|
||||
import { mergeConfig } from 'vite'
|
||||
import type { StorybookConfig } from "@storybook/nextjs-vite"
|
||||
import { mergeConfig } from "vite"
|
||||
|
||||
const config: StorybookConfig = {
|
||||
framework: '@storybook/nextjs-vite',
|
||||
framework: "@storybook/nextjs-vite",
|
||||
stories: [
|
||||
'../lib/**/*.mdx',
|
||||
'../lib/**/*.stories.@(js|jsx|mjs|ts|tsx)',
|
||||
'./content/**/*.mdx',
|
||||
"../lib/**/*.mdx",
|
||||
"../lib/**/*.stories.@(js|jsx|mjs|ts|tsx)",
|
||||
"./content/**/*.mdx",
|
||||
],
|
||||
addons: [
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-themes',
|
||||
'@storybook/addon-vitest',
|
||||
'@storybook/addon-docs',
|
||||
'@storybook/addon-a11y',
|
||||
'storybook-react-intl',
|
||||
"@storybook/addon-links",
|
||||
"@storybook/addon-themes",
|
||||
"@storybook/addon-vitest",
|
||||
"@storybook/addon-docs",
|
||||
"@storybook/addon-a11y",
|
||||
"storybook-react-intl",
|
||||
],
|
||||
core: {
|
||||
disableTelemetry: true,
|
||||
@@ -24,18 +24,18 @@ const config: StorybookConfig = {
|
||||
plugins: [
|
||||
// Add babel plugin for react-intl transformation
|
||||
{
|
||||
name: 'formatjs-transform',
|
||||
name: "formatjs-transform",
|
||||
async transform(code, id) {
|
||||
if (id.includes('node_modules')) return
|
||||
if (id.includes("node_modules")) return
|
||||
if (!/\.(jsx?|tsx?)$/.test(id)) return
|
||||
|
||||
const babel = await import('@babel/core')
|
||||
const babel = await import("@babel/core")
|
||||
const result = babel.transformSync(code, {
|
||||
plugins: [
|
||||
[
|
||||
'formatjs',
|
||||
"formatjs",
|
||||
{
|
||||
idInterpolationPattern: '[sha512:contenthash:base64:6]',
|
||||
idInterpolationPattern: "[sha512:contenthash:base64:6]",
|
||||
ast: true,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user