Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve lint command error #26

Merged
merged 1 commit into from
Oct 20, 2024
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
Binary file modified bun.lockb
Binary file not shown.
27 changes: 16 additions & 11 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
Comment on lines +28 to +32
Copy link
Member Author

@sounmind sounmind Oct 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좀 더 보충 설명하자면, 해당 storybookPlugin의 특정 룰이 작동하는지 확인하려고 했더니, 이 에러가 발생했는데요. 이 문서에 따르면 이 에러는 해당 플러그인이 최신 Eslint의 명세 변경사항을 반영하지 않았기 때문이라고 합니다...

},
rules: {
...reactHooks.configs.recommended.rules,
Expand All @@ -36,4 +39,6 @@ export default tseslint.config(
],
},
},
eslintConfigPrettier,
eslintPluginPrettierRecommended,
);
32 changes: 17 additions & 15 deletions package.json
Copy link
Member Author

@sounmind sounmind Oct 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -23,39 +23,41 @@
"react-router-dom": "^6.27.0"
},
"devDependencies": {
"@types/eslint__js": "^8.42.3",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint가 버전업 되면서 이것저것 쫌 많이 바뀌어서 저도 공부 좀 해야겠습니다 🥲

"@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"
},
Expand Down