Skip to content

Commit

Permalink
fix: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasti810 committed Jan 9, 2025
1 parent f3e6cf7 commit f7d440e
Show file tree
Hide file tree
Showing 18 changed files with 142 additions and 328 deletions.
6 changes: 3 additions & 3 deletions .vscode/css.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"body": [
"/* #region /**=========== ${1} =========== */",
"$0",
"/* #endregion /**======== ${1} =========== */"
]
}
"/* #endregion /**======== ${1} =========== */",
],
},
}
7 changes: 1 addition & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
},
"[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
// Tailwind CSS Autocomplete, add more if used in projects
"tailwindCSS.classAttributes": [
"class",
"className",
"classNames",
"containerClassName"
],
"tailwindCSS.classAttributes": ["class", "className", "classNames", "containerClassName"],
"typescript.preferences.importModuleSpecifier": "non-relative"
}
74 changes: 34 additions & 40 deletions .vscode/typescriptreact.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,25 @@
//#region //*=========== React ===========
"import React": {
"prefix": "ir",
"body": ["import * as React from 'react';"]
"body": ["import * as React from 'react';"],
},
"React.useState": {
"prefix": "us",
"body": [
"const [${1}, set${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}] = React.useState<$3>(${2:initial${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}})$0"
]
"const [${1}, set${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}] = React.useState<$3>(${2:initial${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}})$0",
],
},
"React.useEffect": {
"prefix": "uf",
"body": ["React.useEffect(() => {", " $0", "}, []);"]
"body": ["React.useEffect(() => {", " $0", "}, []);"],
},
"React.useReducer": {
"prefix": "ur",
"body": [
"const [state, dispatch] = React.useReducer(${0:someReducer}, {",
" ",
"})"
]
"body": ["const [state, dispatch] = React.useReducer(${0:someReducer}, {", " ", "})"],
},
"React.useRef": {
"prefix": "urf",
"body": ["const ${1:someRef} = React.useRef($0)"]
"body": ["const ${1:someRef} = React.useRef($0)"],
},
"React Functional Component": {
"prefix": "rc",
Expand All @@ -36,8 +32,8 @@
" $0",
" </div>",
" )",
"}"
]
"}",
],
},
"React Functional Component with Props": {
"prefix": "rcp",
Expand All @@ -52,8 +48,8 @@
" $0",
" </div>",
" )",
"}"
]
"}",
],
},
//#endregion //*======== React ===========

Expand All @@ -64,17 +60,17 @@
"body": [
"//#region //*=========== ${1} ===========",
"${TM_SELECTED_TEXT}$0",
"//#endregion //*======== ${1} ==========="
]
"//#endregion //*======== ${1} ===========",
],
},
"Region CSS": {
"prefix": "regc",
"scope": "css, scss",
"body": [
"/* #region /**=========== ${1} =========== */",
"${TM_SELECTED_TEXT}$0",
"/* #endregion /**======== ${1} =========== */"
]
"/* #endregion /**======== ${1} =========== */",
],
},
//#endregion //*======== Commons ===========

Expand All @@ -98,8 +94,8 @@
" </main>",
" </Layout>",
" )",
"}"
]
"}",
],
},
"Next API": {
"prefix": "napi",
Expand All @@ -111,8 +107,8 @@
" } else {",
" res.status(405).json({ message: 'Method Not Allowed' });",
" }",
"}"
]
"}",
],
},
"Get Static Props": {
"prefix": "gsp",
Expand All @@ -121,8 +117,8 @@
" return {",
" props: {}",
" };",
"}"
]
"}",
],
},
"Get Static Paths": {
"prefix": "gspa",
Expand All @@ -134,8 +130,8 @@
" ],",
" fallback: ",
" };",
"}"
]
"}",
],
},
"Get Server Side Props": {
"prefix": "gssp",
Expand All @@ -144,50 +140,48 @@
" return {",
" props: {}",
" };",
"}"
]
"}",
],
},
"Infer Get Static Props": {
"prefix": "igsp",
"body": "InferGetStaticPropsType<typeof getStaticProps>"
"body": "InferGetStaticPropsType<typeof getStaticProps>",
},
"Infer Get Server Side Props": {
"prefix": "igssp",
"body": "InferGetServerSidePropsType<typeof getServerSideProps>"
"body": "InferGetServerSidePropsType<typeof getServerSideProps>",
},
"Import useRouter": {
"prefix": "imust",
"body": ["import { useRouter } from 'next/router';"]
"body": ["import { useRouter } from 'next/router';"],
},
"Import Next Image": {
"prefix": "imimg",
"body": ["import Image from 'next/image';"]
"body": ["import Image from 'next/image';"],
},
"Import Next Link": {
"prefix": "iml",
"body": ["import Link from 'next/link';"]
"body": ["import Link from 'next/link';"],
},
//#endregion //*======== Next.js ===========

//#region //*=========== Snippet Wrap ===========
"Wrap with Fragment": {
"prefix": "ff",
"body": ["<>", "\t${TM_SELECTED_TEXT}", "</>"]
"body": ["<>", "\t${TM_SELECTED_TEXT}", "</>"],
},
"Wrap with clsx": {
"prefix": "cx",
"body": ["{clsx([${TM_SELECTED_TEXT}$0])}"]
"body": ["{clsx([${TM_SELECTED_TEXT}$0])}"],
},
"Wrap with clsxm": {
"prefix": "cxm",
"body": ["{clsxm([${TM_SELECTED_TEXT}$0, className])}"]
"body": ["{clsxm([${TM_SELECTED_TEXT}$0, className])}"],
},
//#endregion //*======== Snippet Wrap ===========

"Logger": {
"prefix": "lg",
"body": [
"logger({ ${1:${CLIPBOARD}} }, '${TM_FILENAME} line ${TM_LINE_NUMBER}')"
]
}
"body": ["logger({ ${1:${CLIPBOARD}} }, '${TM_FILENAME} line ${TM_LINE_NUMBER}')"],
},
}
6 changes: 3 additions & 3 deletions src/__mocks__/svg.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { SVGProps } from 'react';

const SvgrMock = React.forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>(
(props, ref) => <svg ref={ref} {...props} />
);
const SvgrMock = React.forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>((props, ref) => (
<svg ref={ref} {...props} />
));

export const ReactComponent = SvgrMock;
export default SvgrMock;
Loading

0 comments on commit f7d440e

Please sign in to comment.