diff --git a/bun.lockb b/bun.lockb index a007e7af..9e91d766 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/eslint.config.js b/eslint.config.js index 5c9c2ec9..27851059 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,24 +1,20 @@ import js from "@eslint/js"; -import tanstackPluginQuery from "@tanstack/eslint-plugin-query"; +import tanstackQueryPlugin from "@tanstack/eslint-plugin-query"; import eslintConfigPrettier from "eslint-config-prettier"; import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; import reactHooks from "eslint-plugin-react-hooks"; import reactRefresh from "eslint-plugin-react-refresh"; -import eslintPluginStorybook from "eslint-plugin-storybook"; +import storybookPlugin from "eslint-plugin-storybook"; import globals from "globals"; import tseslint from "typescript-eslint"; export default tseslint.config( - { ignores: ["dist"] }, + js.configs.recommended, + ...tseslint.configs.recommended, + { + ignores: ["dist", "!.storybook", "styled-system", "postcss.config.cjs"], + }, { - extends: [ - js.configs.recommended, - ...tseslint.configs.recommended, - eslintPluginStorybook, - tanstackPluginQuery, - eslintPluginPrettierRecommended, - eslintConfigPrettier, - ], files: ["**/*.{ts,tsx}"], languageOptions: { ecmaVersion: 2020, @@ -27,6 +23,13 @@ export default tseslint.config( plugins: { "react-hooks": reactHooks, "react-refresh": reactRefresh, + "@tanstack/query": tanstackQueryPlugin, + + /** + * NOTE: Might not work properly with ESLINT version 9 + * @see https://github.com/storybookjs/eslint-plugin-storybook/issues/157 + */ + storybook: storybookPlugin, }, rules: { ...reactHooks.configs.recommended.rules, @@ -36,4 +39,6 @@ export default tseslint.config( ], }, }, + eslintConfigPrettier, + eslintPluginPrettierRecommended, ); diff --git a/package.json b/package.json index 296456dd..cc1f2109 100644 --- a/package.json +++ b/package.json @@ -23,39 +23,41 @@ "react-router-dom": "^6.27.0" }, "devDependencies": { + "@types/eslint__js": "^8.42.3", "@chromatic-com/storybook": "^1.9.0", - "@eslint/js": "^9.12.0", "@faker-js/faker": "^9.0.3", + "@eslint/js": "^9.13.0", "@pandacss/dev": "^0.46.1", - "@storybook/addon-essentials": "^8.3.5", - "@storybook/addon-interactions": "^8.3.5", - "@storybook/addon-links": "^8.3.5", - "@storybook/addon-onboarding": "^8.3.5", - "@storybook/blocks": "^8.3.5", - "@storybook/react": "^8.3.5", - "@storybook/react-vite": "^8.3.5", - "@storybook/test": "^8.3.5", + "@storybook/addon-essentials": "^8.3.6", + "@storybook/addon-interactions": "^8.3.6", + "@storybook/addon-links": "^8.3.6", + "@storybook/addon-onboarding": "^8.3.6", + "@storybook/blocks": "^8.3.6", + "@storybook/eslint-config-storybook": "^4.0.0", + "@storybook/react": "^8.3.6", + "@storybook/react-vite": "^8.3.6", + "@storybook/test": "^8.3.6", "@tanstack/eslint-plugin-query": "^5.59.7", - "@testing-library/jest-dom": "^6.6.1", + "@testing-library/jest-dom": "^6.6.2", "@testing-library/react": "^16.0.1", "@testing-library/user-event": "^14.5.2", "@types/react": "^18.3.11", "@types/react-dom": "^18.3.1", "@vitejs/plugin-react-swc": "^3.7.1", "@vitest/coverage-v8": "2.1.3", - "eslint": "^9.12.0", + "eslint": "^9.13.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", + "happy-dom": "^15.7.4", "eslint-plugin-react-hooks": "^5.1.0-rc-fb9a90fa48-20240614", - "eslint-plugin-react-refresh": "^0.4.12", + "eslint-plugin-react-refresh": "^0.4.13", "eslint-plugin-storybook": "^0.9.0", - "happy-dom": "^15.7.4", "husky": "^9.1.6", "lint-staged": "^15.2.10", "prettier": "^3.3.3", - "storybook": "^8.3.5", + "storybook": "^8.3.6", "typescript": "^5.6.3", - "typescript-eslint": "^8.9.0", + "typescript-eslint": "^8.10.0", "vite": "^5.4.9", "vitest": "^2.1.3" },