Skip to content

Commit ac23bbc

Browse files
committed
feat: add prettier
1 parent af4c87b commit ac23bbc

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.next
3+
.vercel

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"arrowParens": "always",
3+
"jsxBracketSameLine": true,
4+
"jsxSingleQuote": true,
5+
"singleQuote": true,
6+
"bracketSpacing": true,
7+
"semi": true,
8+
"useTabs": false,
9+
"tabWidth": 2
10+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"prepublish": "yarn build",
2525
"build": "rimraf dist && microbundle --jsx React.createElement --compress --no-sourcemap",
2626
"test": "jest",
27-
"dev": "yarn build && microbundle watch -o dist/ --no-sourcemap --no-compress --jsx React.createElement"
27+
"dev": "yarn build && microbundle watch -o dist/ --no-sourcemap --no-compress --jsx React.createElement",
28+
"format": "prettier --write 'src/**/*.{js,ts,tsx,jsx,json,md}'"
2829
},
2930
"dependencies": {},
3031
"peerDependencies": {

src/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ const useWeb3forms = <T extends {}>({
88
onError: (errorMessage: string, data: Response<T>) => void;
99
}) => {
1010
const submit = async (formData: T) => {
11-
const response = await fetch("https://api.web3forms.com/submit", {
12-
method: "POST",
11+
const response = await fetch('https://api.web3forms.com/submit', {
12+
method: 'POST',
1313
headers: {
14-
"Content-Type": "application/json",
14+
'Content-Type': 'application/json',
1515
},
1616
body: JSON.stringify({
1717
apikey,

0 commit comments

Comments
 (0)