From 2f15fe8361e362f6762201a9a4fa7ed70c445e96 Mon Sep 17 00:00:00 2001 From: Miroslav Petrik Date: Fri, 22 Mar 2024 10:14:44 +0100 Subject: [PATCH] chore: prettier --- .eslintrc.cjs | 3 +- .github/ISSUE_TEMPLATE/bug_report.md | 24 +- .github/ISSUE_TEMPLATE/feature_request.md | 7 +- .prettierignore | 2 + .storybook/main.ts | 4 +- package.json | 14 +- .../address-list-field/AddressListField.tsx | 9 +- src/stories/advanced-search/Docs.mdx | 4 +- tailwind.config.cjs | 2 +- yarn.lock | 252 +++--------------- 10 files changed, 68 insertions(+), 253 deletions(-) create mode 100644 .prettierignore diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3a2379a..40ad27e 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -7,11 +7,10 @@ module.exports = { env: { node: true, }, - plugins: ["@typescript-eslint", "prettier", "import"], + plugins: ["@typescript-eslint", "import"], extends: [ "eslint:recommended", "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended", "plugin:import/recommended", "plugin:import/typescript", ], diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea7..9b77ea7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..2bc5d5f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- **Is your feature request related to a problem? Please describe.** diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..db98c22 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +.yarn +CHANGELOG.md diff --git a/.storybook/main.ts b/.storybook/main.ts index 86db4dc..6f08461 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -8,9 +8,9 @@ export default { ], framework: { name: "@storybook/react-vite", - options: {} + options: {}, }, core: { - disableTelemetry: true + disableTelemetry: true, }, }; diff --git a/package.json b/package.json index 027509d..e396bb8 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,8 @@ "sb:up": "yarn dlx storybook@latest upgrade", "storybook": "storybook dev", "semantic-release": "semantic-release", + "format": "prettier . --write", + "format:check": "prettier . --check", "lint": "eslint --ext .tsx,.ts ./src", "lint:fix": "yarn run lint --fix", "ui": "yarn upgrade-interactive" @@ -74,25 +76,23 @@ "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "10.4.16", "eslint": "8.55.0", - "eslint-config-prettier": "9.1.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.0", - "eslint-plugin-prettier": "5.0.1", - "flowbite-react": "^0.7.3", + "flowbite-react": "^0.7.5", "form-atoms": "3.2.4", "happy-dom": "12.10.3", "jotai": "^2.7.0", "jotai-devtools": "0.8.0", "jotai-effect": "^0.6.0", - "postcss": "8.4.32", - "prettier": "^3.1.0", - "prettier-plugin-tailwindcss": "0.5.7", + "postcss": "8.4.38", + "prettier": "^3.2.5", + "prettier-plugin-tailwindcss": "0.5.12", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "^4.12.0", "semantic-release": "^23.0.5", "storybook": "^8.0.0", - "tailwindcss": "^3.3.5", + "tailwindcss": "^3.4.1", "typescript": "5.3.3", "vite": "^5.0.11", "vitest": "1.1.3", diff --git a/src/stories/address-list-field/AddressListField.tsx b/src/stories/address-list-field/AddressListField.tsx index dc1dd49..fe6958b 100644 --- a/src/stories/address-list-field/AddressListField.tsx +++ b/src/stories/address-list-field/AddressListField.tsx @@ -1,7 +1,6 @@ import { listField, textField } from "@form-atoms/field"; import { List } from "@form-atoms/list-atom"; import { Button, Card, Label } from "flowbite-react"; -import { formAtom } from "form-atoms"; import { HiOutlineChevronDown, HiOutlineChevronUp, @@ -32,17 +31,11 @@ const addresses = listField({ }), }); -const fields = { - addresses, -}; - -const form = formAtom(fields); - export const AddressesListField = () => (
(