chore: add global prettier/lint config

This commit is contained in:
sirin 2024-10-27 23:07:53 +07:00
parent a260cdd313
commit 6c63a30430
5 changed files with 81 additions and 40 deletions

View File

@ -1,3 +1,12 @@
{ {
"extends": "next/core-web-vitals" "extends": ["eslint:recommended", "next", "next/core-web-vitals", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
}
} }

6
.prettierrc Normal file
View File

@ -0,0 +1,6 @@
{
"semi": true,
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5"
}

39
package-lock.json generated
View File

@ -11,6 +11,7 @@
"@hookform/resolvers": "^3.9.0", "@hookform/resolvers": "^3.9.0",
"@radix-ui/react-alert-dialog": "^1.1.2", "@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-avatar": "^1.1.0", "@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.2", "@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.1", "@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-hover-card": "^1.1.1", "@radix-ui/react-hover-card": "^1.1.1",
@ -51,7 +52,7 @@
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"recharts": "^2.12.7", "recharts": "^2.12.7",
"stripe": "^17.1.0", "stripe": "^17.1.0",
"sweetalert2": "^11.14.3", "sweetalert2": "^11.6.13",
"tailwind-merge": "^2.5.2", "tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7", "tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8" "zod": "^3.23.8"
@ -1015,6 +1016,35 @@
} }
} }
}, },
"node_modules/@radix-ui/react-checkbox": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.1.2.tgz",
"integrity": "sha512-/i0fl686zaJbDQLNKrkCbMyDm6FQMt4jg323k7HuqitoANm9sE23Ql8yOK3Wusk34HSLKDChhMux05FnP6KUkw==",
"dependencies": {
"@radix-ui/primitive": "1.1.0",
"@radix-ui/react-compose-refs": "1.1.0",
"@radix-ui/react-context": "1.1.1",
"@radix-ui/react-presence": "1.1.1",
"@radix-ui/react-primitive": "2.0.0",
"@radix-ui/react-use-controllable-state": "1.1.0",
"@radix-ui/react-use-previous": "1.1.0",
"@radix-ui/react-use-size": "1.1.0"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-collection": { "node_modules/@radix-ui/react-collection": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.0.tgz", "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.0.tgz",
@ -8586,10 +8616,9 @@
} }
}, },
"node_modules/sweetalert2": { "node_modules/sweetalert2": {
"version": "11.14.3", "version": "11.14.4",
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.14.3.tgz", "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.14.4.tgz",
"integrity": "sha512-6NuBHWJCv2gtw4y8PUXLB41hty+V6U2mKZMAvydL1IRPcORR0yuyq3cjFD/+ByrCk3muEFggbZX/x6HwmbVfbA==", "integrity": "sha512-8QMzjxCuinwm18EK5AtYvuhP+lRMRxTWVXy8om9wGlULsXSI4TD29kyih3VYrSXMMBlD4EShFvNC7slhTC7j0w==",
"license": "MIT",
"funding": { "funding": {
"type": "individual", "type": "individual",
"url": "https://github.com/sponsors/limonte" "url": "https://github.com/sponsors/limonte"

View File

@ -6,7 +6,8 @@
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint" "lint": "next lint",
"pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json}\""
}, },
"dependencies": { "dependencies": {
"@hookform/resolvers": "^3.9.0", "@hookform/resolvers": "^3.9.0",
@ -53,7 +54,7 @@
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"recharts": "^2.12.7", "recharts": "^2.12.7",
"stripe": "^17.1.0", "stripe": "^17.1.0",
"sweetalert2": "^11.14.3", "sweetalert2": "^11.6.13",
"tailwind-merge": "^2.5.2", "tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7", "tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8" "zod": "^3.23.8"

View File

@ -10,9 +10,6 @@ dependencies:
"@radix-ui/react-avatar": "@radix-ui/react-avatar":
specifier: ^1.1.0 specifier: ^1.1.0
version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1) version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1)
"@radix-ui/react-checkbox":
specifier: ^1.1.2
version: 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1)
"@radix-ui/react-dialog": "@radix-ui/react-dialog":
specifier: ^1.1.2 specifier: ^1.1.2
version: 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1) version: 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1)
@ -132,7 +129,7 @@ dependencies:
version: 17.2.0 version: 17.2.0
sweetalert2: sweetalert2:
specifier: ^11.14.3 specifier: ^11.14.3
version: 11.14.4 version: 11.14.3
tailwind-merge: tailwind-merge:
specifier: ^2.5.2 specifier: ^2.5.2
version: 2.5.2 version: 2.5.2
@ -784,34 +781,6 @@ packages:
react-dom: 18.3.1(react@18.3.1) react-dom: 18.3.1(react@18.3.1)
dev: false dev: false
/@radix-ui/react-checkbox@1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1):
resolution:
{ integrity: sha512-/i0fl686zaJbDQLNKrkCbMyDm6FQMt4jg323k7HuqitoANm9sE23Ql8yOK3Wusk34HSLKDChhMux05FnP6KUkw== }
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
"@types/react":
optional: true
"@types/react-dom":
optional: true
dependencies:
"@radix-ui/primitive": 1.1.0
"@radix-ui/react-compose-refs": 1.1.0(@types/react@18.3.4)(react@18.3.1)
"@radix-ui/react-context": 1.1.1(@types/react@18.3.4)(react@18.3.1)
"@radix-ui/react-presence": 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1)
"@radix-ui/react-primitive": 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1)
"@radix-ui/react-use-controllable-state": 1.1.0(@types/react@18.3.4)(react@18.3.1)
"@radix-ui/react-use-previous": 1.1.0(@types/react@18.3.4)(react@18.3.1)
"@radix-ui/react-use-size": 1.1.0(@types/react@18.3.4)(react@18.3.1)
"@types/react": 18.3.4
"@types/react-dom": 18.3.0
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
dev: false
/@radix-ui/react-collection@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1): /@radix-ui/react-collection@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1)(react@18.3.1):
resolution: resolution:
{ integrity: sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw== } { integrity: sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw== }
@ -2403,6 +2372,28 @@ packages:
dependencies: dependencies:
"@types/react": 18.3.4 "@types/react": 18.3.4
/@types/react-fade-in@2.0.2(react@18.3.1):
resolution:
{ integrity: sha512-JdyLYFtyvqDP7mqnKaAyuYD+VMtzAHbUf3kumNQV5QALxjBGmb95HXD0uug1bGol053dtV5yO3NNpGHOMj413g== }
deprecated: This is a stub types definition. react-fade-in provides its own type definitions, so you do not need this installed.
dependencies:
react-fade-in: 2.0.1(react@18.3.1)
transitivePeerDependencies:
- react
dev: true
/@types/react-lottie@1.2.10:
resolution:
{ integrity: sha512-rCd1p3US4ELKJlqwVnP0h5b24zt5p9OCvKUoNpYExLqwbFZMWEiJ6EGLMmH7nmq5V7KomBIbWO2X/XRFsL0vCA== }
dependencies:
"@types/react": 18.3.4
dev: true
/@types/react-select-country-list@2.2.3:
resolution:
{ integrity: sha512-nffcYOwuun+5B0EWqubK+amHpPdK9Xj20xkLYNqYrzmESd8FnpLwHsS79ClLAWA9y+icVA8gWPkbwBp1gpjSwA== }
dev: true
/@types/react@18.3.4: /@types/react@18.3.4:
resolution: resolution:
{ integrity: sha512-J7W30FTdfCxDDjmfRM+/JqLHBIyl7xUIp9kwK637FGmY7+mkSFSe6L4jpZzhj5QMfLssSDP4/i75AKkrdC7/Jw== } { integrity: sha512-J7W30FTdfCxDDjmfRM+/JqLHBIyl7xUIp9kwK637FGmY7+mkSFSe6L4jpZzhj5QMfLssSDP4/i75AKkrdC7/Jw== }
@ -6822,6 +6813,11 @@ packages:
{ integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== } { integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== }
engines: { node: ">= 0.4" } engines: { node: ">= 0.4" }
/sweetalert2@11.14.3:
resolution:
{ integrity: sha512-6NuBHWJCv2gtw4y8PUXLB41hty+V6U2mKZMAvydL1IRPcORR0yuyq3cjFD/+ByrCk3muEFggbZX/x6HwmbVfbA== }
dev: false
/tailwind-merge@2.5.2: /tailwind-merge@2.5.2:
resolution: resolution:
{ integrity: sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg== } { integrity: sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg== }