Skip to content

Commit 8f0475a

Browse files
committed
Update eslint configs
Add husky setup
1 parent f450517 commit 8f0475a

File tree

11 files changed

+371
-80
lines changed

11 files changed

+371
-80
lines changed

.babelrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"presets": [
3-
"next/babel"
4-
],
2+
"presets": ["next/babel"],
53
"plugins": [
64
[
75
"babel-plugin-styled-components",

.eslintrc

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
{
2-
"extends": [
3-
"plugin:@typescript-eslint/recommended",
4-
"plugin:prettier/recommended"
5-
],
6-
"plugins": ["prettier", "import"],
2+
"extends": ["next", "next/core-web-vitals", "prettier"],
73
"rules": {
8-
"prettier/prettier": "error"
9-
},
10-
"settings": {
11-
"import/parsers": {
12-
"@typescript-eslint/parser": [".ts", ".tsx"]
13-
},
14-
"import/resolver": {
15-
"typescript": {}
16-
}
4+
"@next/next/no-html-link-for-pages": 0
175
}
186
}

.prettierignore

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

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,3 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
4949
## 🗝 License
5050

5151
This project is licensed under the GPLv3 License - see the [LICENSE](LICENSE) file for details.
52-
53-

package.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,23 @@
77
"build": "next build",
88
"postbuild": "next-sitemap",
99
"lint": "next lint",
10-
"start": "next start"
10+
"start": "next start",
11+
"format": "prettier --write ."
12+
},
13+
"husky": {
14+
"hooks": {
15+
"pre-commit": "lint-staged"
16+
}
17+
},
18+
"lint-staged": {
19+
"*.+(ts|tsx)": [
20+
"prettier --write"
21+
]
1122
},
1223
"dependencies": {
1324
"@types/styled-components": "^5.1.9",
1425
"@types/styled-system": "^5.1.11",
15-
"@typescript-eslint/eslint-plugin": "^4.21.0",
1626
"babel-plugin-styled-components": "^1.12.0",
17-
"eslint": "^7.23.0",
1827
"fast-glob": "^3.2.5",
1928
"framer-motion": "^4.1.17",
2029
"gray-matter": "^4.0.2",
@@ -35,10 +44,13 @@
3544
"devDependencies": {
3645
"@types/react": "^17.0.3",
3746
"@typescript-eslint/parser": "^4.21.0",
47+
"eslint": "^7.31.0",
3848
"eslint-config-next": "^11.0.1",
3949
"eslint-config-prettier": "^8.1.0",
4050
"eslint-plugin-import": "^2.22.1",
4151
"eslint-plugin-prettier": "^3.3.1",
52+
"husky": "4",
53+
"lint-staged": "^11.0.1",
4254
"next-sitemap": "^1.6.105",
4355
"typescript": "^4.2.4"
4456
}

pages/about.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ const About: React.FC<AboutProps> = ({ experiences }) => {
9090
</Title>
9191
<Container maxWidth={['100%', '700px']} marginY="2rem">
9292
<Text>
93-
I'm a 21-year-old student at{' '}
93+
I&apos;m a 21-year-old student at{' '}
9494
<a href="https://www.epitech.eu/en/">Epitech</a> in Paris currently
9595
studying computer-science. I started working as a freelance
9696
developer when I was 18.
9797
</Text>
9898
<Text>
99-
Since 2020, I'm living in Seoul and I'm studying computer-science at{' '}
100-
<a href="https://www.cau.ac.kr/">Chung-Ang</a> University.
99+
Since 2020, I&apos;m living in Seoul and studying computer-science
100+
at <a href="https://www.cau.ac.kr/">Chung-Ang</a> University.
101101
</Text>
102102
<Text>
103103
During my free time I like going gym, doing some Bench Press, make

pages/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ const Home: React.FC = () => (
3737
<Container maxWidth="700px" gridGap="3rem">
3838
<Container>
3939
<Text textAlign="center">
40-
I'm a Full Stack developer with experience in DevOps, Backend,
41-
Frontend and mobile development. I'm currently CTO of&nbsp;
40+
I&apos;m a Full Stack developer with experience in DevOps, Backend,
41+
Frontend and mobile development. Currently CTO of&nbsp;
4242
<a href="https://shareview.fr">Shareview</a> and living in Seoul.
4343
</Text>
4444
</Container>
@@ -54,8 +54,8 @@ const Home: React.FC = () => (
5454
Get in touch
5555
</Title>
5656
<Text textAlign="center">
57-
Although I'm not actively looking for job opportunities, my inbox is
58-
still open for you. Feel free to ask me anything!
57+
Although I&apos;m not actively looking for job opportunities, my inbox
58+
is still open for you. Feel free to ask me anything!
5959
</Text>
6060
<Grid
6161
gridGap="2rem"

pages/projects.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const Projects: React.FC<ProjectProps> = ({ projects }) => (
5050
<Container alignItems="center">
5151
<Title>Projects</Title>
5252
<Text textAlign="center">
53-
I'm always working on new projects. <br />
53+
I&apos;m always working on new projects. <br />
5454
You can find them on my&nbsp;
5555
<a href="https://github.com/shellbear">Github</a>.
5656
</Text>

styles/globals.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ a {
1515
border-bottom: 2px solid black;
1616
}
1717

18-
1918
a:hover {
2019
border-bottom-color: transparent;
2120
}
@@ -25,16 +24,16 @@ a:hover {
2524
}
2625

2726
.mobile {
28-
display: none
27+
display: none;
2928
}
3029

3130
@media (max-width: 640px) {
3231
.mobile {
33-
display: block
32+
display: block;
3433
}
3534

3635
.desktop {
37-
display: none
36+
display: none;
3837
}
3938
}
4039

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"resolveJsonModule": true,
1717
"skipLibCheck": true,
1818
"strict": true,
19-
"target": "esnext",
19+
"target": "esnext"
2020
},
2121
"exclude": ["node_modules"],
2222
"include": ["**/*.ts", "**/*.tsx"]

0 commit comments

Comments
 (0)