Skip to content

Commit b161f1f

Browse files
authored
Merge pull request #12 from YAPP-Github/feat/#10
2 parents 37e3f2f + 621101e commit b161f1f

File tree

5 files changed

+517
-16
lines changed

5 files changed

+517
-16
lines changed

eslint.config.mjs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { FlatCompat } from "@eslint/eslintrc";
22
import vitest from "@vitest/eslint-plugin";
33
import eslintConfigPrettier from "eslint-config-prettier/flat";
4+
import jestDom from "eslint-plugin-jest-dom";
45
import simpleImportSort from "eslint-plugin-simple-import-sort";
6+
import testingLibrary from "eslint-plugin-testing-library";
57
import { dirname } from "path";
68
import { fileURLToPath } from "url";
79

@@ -30,6 +32,7 @@ const eslintConfig = [
3032
"no-empty": "error",
3133
"simple-import-sort/imports": "error",
3234
"simple-import-sort/exports": "error",
35+
"@typescript-eslint/no-empty-object-type": "off",
3336
"spaced-comment": [
3437
"error",
3538
"always",
@@ -58,12 +61,21 @@ const eslintConfig = [
5861
"./src/**/*.test.{js,ts,jsx,tsx}",
5962
"./src/**/*.spec.{js,ts,jsx,tsx}",
6063
],
61-
plugins: {
62-
vitest,
63-
},
64-
rules: {
65-
...vitest.configs.recommended.rules,
66-
},
64+
...vitest.configs.recommended,
65+
},
66+
{
67+
files: [
68+
"./src/**/*.test.{js,ts,jsx,tsx}",
69+
"./src/**/*.spec.{js,ts,jsx,tsx}",
70+
],
71+
...jestDom.configs["flat/recommended"],
72+
},
73+
{
74+
files: [
75+
"./src/**/*.test.{js,ts,jsx,tsx}",
76+
"./src/**/*.spec.{js,ts,jsx,tsx}",
77+
],
78+
...testingLibrary.configs["flat/react"],
6779
},
6880
{
6981
plugins: {

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"start": "next start",
99
"lint": "next lint",
1010
"lint:staged": "lint-staged",
11+
"test": "vitest",
1112
"format": "prettier --write .",
1213
"format:check": "prettier --check .",
1314
"commit": "git-cz",
@@ -32,26 +33,35 @@
3233
"@storybook/blocks": "^8.6.14",
3334
"@storybook/experimental-nextjs-vite": "8.6.14",
3435
"@storybook/react": "^8.6.14",
36+
"@testing-library/dom": "^10.4.0",
37+
"@testing-library/jest-dom": "^6.6.3",
38+
"@testing-library/react": "^16.3.0",
39+
"@testing-library/user-event": "^14.6.1",
3540
"@types/node": "^20",
3641
"@types/react": "^19",
3742
"@types/react-dom": "^19",
3843
"@vanilla-extract/next-plugin": "^2.4.11",
44+
"@vitejs/plugin-react": "^4.5.0",
3945
"@vitest/browser": "^3.1.4",
4046
"@vitest/coverage-v8": "^3.1.4",
4147
"@vitest/eslint-plugin": "^1.2.1",
4248
"commitizen": "^4.3.1",
4349
"eslint": "^9",
4450
"eslint-config-next": "15.3.2",
4551
"eslint-config-prettier": "^10.1.5",
52+
"eslint-plugin-jest-dom": "^5.5.0",
4653
"eslint-plugin-simple-import-sort": "^12.1.1",
54+
"eslint-plugin-testing-library": "^7.3.0",
4755
"inquirer": "^12.6.3",
56+
"jsdom": "^26.1.0",
4857
"lefthook": "^1.11.13",
4958
"lint-staged": "^16.0.0",
5059
"msw": "^2.8.4",
5160
"playwright": "^1.52.0",
5261
"prettier": "^3.5.3",
5362
"storybook": "^8.6.14",
5463
"typescript": "^5",
64+
"vite-tsconfig-paths": "^5.1.4",
5565
"vitest": "^3.1.4"
5666
},
5767
"msw": {

0 commit comments

Comments
 (0)