Skip to content

Commit 0176fb0

Browse files
authored
Merge pull request #59 from Curio-org/prettier
#56 Setup prettier for Curio
2 parents 3bd74fd + b30e3bb commit 0176fb0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1483
-1260
lines changed

.github/workflows/netlify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- name: Check out code
1313
uses: actions/checkout@v2
14-
14+
1515
- name: Build and Test
1616
run: |
1717
npm install --legacy-peer-deps

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
# Ignore artifacts:
3+
build
4+
coverage

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true
4+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Curio, a web application which is serving as an open platform where anyone can c
99
## Tech stack Curio is using
1010

1111
- Frontend
12-
For the Frontend we are using ReactJs & NodeJs in order to bring functionality to it and for styling purposes we have used CSS3 along with some SASS. We are also making use of a number of react compatible modules to optimise things i.e. React Router DOM, RSuite, Semantic UI React etc.
12+
For the Frontend we are using ReactJs & NodeJs in order to bring functionality to it and for styling purposes we have used CSS3 along with some SASS. We are also making use of a number of react compatible modules to optimise things i.e. React Router DOM, RSuite, Semantic UI React etc.
1313
- API
1414
We are taking use of Youtube V3 api to get the video data & search results based on the query & along with that we have also made a couple of APIs in order to connect the frontend to the backend usin AXIOS.
1515
- Backend

api/helloWorld.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export default (req, res) => {
2-
res.statusCode = 200;
3-
res.send({ message: "helloWorld" });
4-
};
2+
res.statusCode = 200;
3+
res.send({ message: "helloWorld" });
4+
};

api/sendMessage.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
require('dotenv');
1+
require("dotenv");
22
const client = require("twilio")(
3-
process.env.REACT_APP_TWILIO_ACCOUNT_SID,
4-
process.env.REACT_APP_TWILIO_AUTH_TOKEN
5-
);
6-
7-
export default async (req, res) => {
8-
res.statusCode = 200;
9-
res.setHeader("Content-Type", "application/json");
3+
process.env.REACT_APP_TWILIO_ACCOUNT_SID,
4+
process.env.REACT_APP_TWILIO_AUTH_TOKEN,
5+
);
106

11-
client.messages.create({
12-
from: process.env.REACT_APP_TWILIO_PHONE_NUMBER,
13-
to: req.body.to,
14-
body: req.body.body,
15-
})
16-
.then(() => {
17-
res.send(JSON.stringify({ success: true }));
18-
})
19-
.catch((err) => {
20-
console.log(err);
21-
res.send(JSON.stringify({ success: false }));
22-
});
23-
24-
}
7+
export default async (req, res) => {
8+
res.statusCode = 200;
9+
res.setHeader("Content-Type", "application/json");
10+
11+
client.messages
12+
.create({
13+
from: process.env.REACT_APP_TWILIO_PHONE_NUMBER,
14+
to: req.body.to,
15+
body: req.body.body,
16+
})
17+
.then(() => {
18+
res.send(JSON.stringify({ success: true }));
19+
})
20+
.catch((err) => {
21+
console.log(err);
22+
res.send(JSON.stringify({ success: false }));
23+
});
24+
};

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"devDependencies": {
7171
"autoprefixer": "^10.4.12",
7272
"postcss": "^8.4.31",
73+
"prettier": "3.0.3",
7374
"tailwindcss": "^3.1.8"
7475
}
7576
}

postcss.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
22
plugins: [
3-
require('postcss-import'),
4-
require('tailwindcss/nesting')(require('postcss-nesting')),
5-
require('autoprefixer'),
6-
require('tailwindcss'),
7-
]
8-
}
3+
require("postcss-import"),
4+
require("tailwindcss/nesting")(require("postcss-nesting")),
5+
require("autoprefixer"),
6+
require("tailwindcss"),
7+
],
8+
};

prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 4,
4+
"semi": false,
5+
"singleQuote": true
6+
}

public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
@@ -10,7 +10,7 @@
1010
/>
1111
<title>Curio</title>
1212
</head>
13-
<body style="overflow-x: hidden;">
13+
<body style="overflow-x: hidden">
1414
<noscript>You need to enable JavaScript to run this app.</noscript>
1515
<div id="root"></div>
1616
</body>

src/App.css

Lines changed: 80 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,107 @@
11
* {
2-
box-sizing: border-box;
3-
padding: 0%;
4-
margin: 0%;
5-
scroll-behavior: smooth;
2+
box-sizing: border-box;
3+
padding: 0%;
4+
margin: 0%;
5+
scroll-behavior: smooth;
66
}
77

8-
body{
9-
background-color: var(--color-bg);
8+
body {
9+
background-color: var(--color-bg);
1010
}
1111

12-
.gradient__bg
13-
{
14-
background:-moz-radial-gradient(circle at 3% 25%, rgba(0, 40, 83, 1) 0%, rgba(4, 12, 24, 1) 25%);
12+
.gradient__bg {
13+
background: -moz-radial-gradient(
14+
circle at 3% 25%,
15+
rgba(0, 40, 83, 1) 0%,
16+
rgba(4, 12, 24, 1) 25%
17+
);
1518

1619
/* safari 5.1+,chrome 10+ */
17-
background:-webkit-radial-gradient(circle at 3% 25%, rgba(0, 40, 83, 1) 0%, rgba(4, 12, 24, 1) 25%);
20+
background: -webkit-radial-gradient(
21+
circle at 3% 25%,
22+
rgba(0, 40, 83, 1) 0%,
23+
rgba(4, 12, 24, 1) 25%
24+
);
1825

1926
/* opera 11.10+ */
20-
background:-o-radial-gradient(circle at 3% 25%, rgba(0, 40, 83, 1) 0%, rgba(4, 12, 24, 1) 25%);
27+
background: -o-radial-gradient(
28+
circle at 3% 25%,
29+
rgba(0, 40, 83, 1) 0%,
30+
rgba(4, 12, 24, 1) 25%
31+
);
2132

2233
/* ie 10+ */
23-
background:-ms-radial-gradient(circle at 3% 25%, rgba(0, 40, 83, 1) 0%, rgba(4, 12, 24, 1) 25%);
34+
background: -ms-radial-gradient(
35+
circle at 3% 25%,
36+
rgba(0, 40, 83, 1) 0%,
37+
rgba(4, 12, 24, 1) 25%
38+
);
2439

2540
/* global 92%+ browsers support */
26-
background:radial-gradient(circle at 3% 25%, rgba(0, 40, 83, 1) 0%, rgba(4, 12, 24, 1) 25%);
41+
background: radial-gradient(
42+
circle at 3% 25%,
43+
rgba(0, 40, 83, 1) 0%,
44+
rgba(4, 12, 24, 1) 25%
45+
);
2746
}
28-
.gradient__text{
29-
background: var(--gradient-text);
30-
background-clip: text;
31-
-webkit-background-clip: text;
32-
-webkit-text-fill-color: transparent;
47+
.gradient__text {
48+
background: var(--gradient-text);
49+
background-clip: text;
50+
-webkit-background-clip: text;
51+
-webkit-text-fill-color: transparent;
3352
}
3453

35-
.section__padding{
36-
padding: 4rem 6rem;
54+
.section__padding {
55+
padding: 4rem 6rem;
3756
}
3857

39-
.section__margin{
40-
margin: 4rem 6rem;
58+
.section__margin {
59+
margin: 4rem 6rem;
4160
}
4261

4362
.scale-up-center {
44-
-webkit-animation: scale-up-center 0.4s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
45-
animation: scale-up-center 0.4s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
63+
-webkit-animation: scale-up-center 0.4s cubic-bezier(0.39, 0.575, 0.565, 1)
64+
both;
65+
animation: scale-up-center 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;
4666
}
4767

48-
@-webkit-keyframes scale-up-center {
49-
0% {
50-
-webkit-transform: scale(0.5);
51-
transform: scale(0.5);
52-
}
53-
100% {
54-
-webkit-transform: scale(1);
55-
transform: scale(1);
56-
}
68+
@-webkit-keyframes scale-up-center {
69+
0% {
70+
-webkit-transform: scale(0.5);
71+
transform: scale(0.5);
5772
}
58-
@keyframes scale-up-center {
59-
0% {
60-
-webkit-transform: scale(0.5);
61-
transform: scale(0.5);
62-
}
63-
100% {
64-
-webkit-transform: scale(1);
65-
transform: scale(1);
66-
}
73+
100% {
74+
-webkit-transform: scale(1);
75+
transform: scale(1);
76+
}
77+
}
78+
@keyframes scale-up-center {
79+
0% {
80+
-webkit-transform: scale(0.5);
81+
transform: scale(0.5);
82+
}
83+
100% {
84+
-webkit-transform: scale(1);
85+
transform: scale(1);
86+
}
87+
}
88+
89+
@media screen and (max-width: 700px) {
90+
.section__padding {
91+
padding: 4rem;
6792
}
68-
6993

70-
@media screen and (max-width: 700px) {
71-
.section__padding {
72-
padding: 4rem;
73-
}
74-
75-
.section__margin {
76-
margin: 4rem;
77-
}
94+
.section__margin {
95+
margin: 4rem;
7896
}
79-
80-
@media screen and (max-width: 550px) {
81-
.section__padding {
82-
padding: 4rem 2rem;
83-
}
84-
85-
.section__margin {
86-
margin: 4rem 2rem;
87-
}
88-
}
97+
}
98+
99+
@media screen and (max-width: 550px) {
100+
.section__padding {
101+
padding: 4rem 2rem;
102+
}
103+
104+
.section__margin {
105+
margin: 4rem 2rem;
106+
}
107+
}

0 commit comments

Comments
 (0)