Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nine-queens-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Updated to storybook v10
36 changes: 10 additions & 26 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check

import storybook from "eslint-plugin-storybook";
import eslint from "@eslint/js";
import prettierConfig from "eslint-config-prettier";
import formatjs from "eslint-plugin-formatjs";
Expand Down Expand Up @@ -31,24 +31,20 @@ export default tseslint.config(
".github/**/*.js",
".featureFlags/",
]),

eslint.configs.recommended,
tseslint.configs.recommended, // Note: we can migrate to rules using TypeScript types
eslint.configs.recommended, // Note: we can migrate to rules using TypeScript types
tseslint.configs.recommended,
react.configs.flat.recommended,
react.configs.flat["jsx-runtime"],
reactHooks.configs.flat["recommended-latest"],
reactRefresh.configs.vite,
reactYouMightNotNeedAnEffect.configs.recommended,

{
settings: {
react: {
version: "detect",
},
},
},

// Disable global rules:
}, // Disable global rules:
{
rules: {
"sort-imports": "off", // imports are handled by simple-import-sort/sort
Expand Down Expand Up @@ -104,19 +100,15 @@ export default tseslint.config(
"no-case-declarations": "off",
"prefer-const": "off",
},
},

// Properly resolve Node.js globals in .cjs files
}, // Properly resolve Node.js globals in .cjs files
{
files: ["**/*.cjs"],
languageOptions: {
globals: {
...globals.node, // Use all Node.js globals
},
},
},

// Configure custom plugins and rules for React files
}, // Configure custom plugins and rules for React files
{
files: ["src/**/*.{js,jsx,ts,tsx}"],
languageOptions: {
Expand Down Expand Up @@ -206,9 +198,7 @@ export default tseslint.config(
"local-rules/no-deprecated-icons": "warn",
"no-console": ["error", { allow: ["warn", "error"] }],
},
},

// Disable rules for specific files
}, // Disable rules for specific files
{
files: ["vite.config.js"],
languageOptions: {
Expand All @@ -220,14 +210,12 @@ export default tseslint.config(
"no-console": "off",
},
},

{
files: ["playwright/**/*.ts"],
rules: {
"no-console": "off",
},
},

{
files: ["src/**/*.stories.@(ts|tsx)"],
rules: {
Expand All @@ -247,7 +235,6 @@ export default tseslint.config(
"@typescript-eslint/no-require-imports": "off",
},
},

{
rules: {
/**
Expand Down Expand Up @@ -302,9 +289,7 @@ export default tseslint.config(
},
],
},
},

// Graphql plugin
}, // Graphql plugin
{
/**
* Plugin first converts all ts(x) files to
Expand All @@ -328,8 +313,7 @@ export default tseslint.config(
"@graphql-eslint/no-duplicate-fields": "error",
"@graphql-eslint/no-deprecated": "warn",
},
},

// Disable any rules that conflict with Prettier
}, // Disable any rules that conflict with Prettier
prettierConfig,
storybook.configs["flat/recommended"],
);
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"@playwright/test": "1.56.1",
"@saleor/app-sdk": "1.7.0",
"@sentry/cli": "^2.58.2",
"@storybook/react-vite": "9.0.18",
"@storybook/react-vite": "10.2.4",
"@swc/jest": "^0.2.39",
"@types/apollo-upload-client": "^17.0.5",
"@types/chroma-js": "^2.4.5",
Expand Down Expand Up @@ -194,6 +194,7 @@
"eslint-plugin-react-refresh": "^0.4.24",
"eslint-plugin-react-you-might-not-need-an-effect": "^0.5.6",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-storybook": "10.2.4",
"eslint-plugin-unicorn": "^61.0.2",
"eslint-plugin-unused-imports": "^4.3.0",
"front-matter": "^4.0.2",
Expand All @@ -206,7 +207,7 @@
"playwright-ctrf-json-reporter": "0.0.26",
"rollup-plugin-polyfill-node": "^0.11.0",
"sort-package-json": "3.4.0",
"storybook": "9.1.17",
"storybook": "10.2.4",
"typescript": "5.8.3",
"typescript-eslint": "^8.46.4",
"typescript-strict-plugin": "^2.4.4",
Expand Down
Loading
Loading