Skip to content

Commit 9fa2ab6

Browse files
feat: add linting + custom hook to upload memes (#6)
* refactor eslint and add prettier * format * refactor: predefined tags data * refactor: hook to upload memes
1 parent ac7e4d1 commit 9fa2ab6

File tree

117 files changed

+1984
-2265
lines changed

Some content is hidden

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

117 files changed

+1984
-2265
lines changed

.eslintrc.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": ["next/core-web-vitals", "plugin:prettier/recommended"],
3+
"plugins": ["import", "prettier"],
4+
"rules": {
5+
"quotes": ["warn", "single"],
6+
"import/newline-after-import": ["warn", { "count": 1 }],
7+
"no-console": ["warn", { "allow": ["warn", "error"] }],
8+
"indent": ["warn", 2],
9+
"semi": ["warn", "always"],
10+
"prettier/prettier": [
11+
"warn",
12+
{
13+
"singleQuote": true,
14+
"semi": true,
15+
"tabWidth": 2
16+
}
17+
]
18+
}
319
}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Node
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: "20"
19+
node-version: '20'
2020

2121
- name: Install dependencies
2222
run: npm install

.prettierignore

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

.prettierrc

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

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![Test status](https://github.com/halfloafhq/memer/actions/workflows/ci.yml/badge.svg)
22

33
# Memer
4+
45
### One stop meme workshop
56

67
## Overview
@@ -50,13 +51,13 @@ This project is a comprehensive meme management platform that allows users to se
5051
You can develop with Docker as well with the following commands:
5152

5253
1. Build image
53-
```
54-
docker build -t memer .
55-
```
54+
```
55+
docker build -t memer .
56+
```
5657
2. Run the image
57-
```
58-
docker run -p 3000:3000 memer
59-
```
58+
```
59+
docker run -p 3000:3000 memer
60+
```
6061
3. Open [http://localhost:3000](http://localhost:3000) in your browser
6162

6263
## Contributing

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
"components": "@/components",
1515
"utils": "@/lib/utils"
1616
}
17-
}
17+
}

next-sitemap.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ module.exports = {
33
siteUrl: process.env.SITE_URL || 'https://memer.shobhitnagpal.com',
44
generateRobotsTxt: true, // (optional)
55
// ...other options
6-
}
6+
};

next.config.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ const nextConfig = {
33
images: {
44
remotePatterns: [
55
{
6-
protocol: "https",
7-
hostname: "img.clerk.com",
8-
port: "",
6+
protocol: 'https',
7+
hostname: 'img.clerk.com',
8+
port: '',
99
},
1010
{
11-
protocol: "https",
12-
hostname: "utfs.io",
13-
port: "",
11+
protocol: 'https',
12+
hostname: 'utfs.io',
13+
port: '',
1414
},
1515
],
1616
},

package-lock.json

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

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"postbuild": "next-sitemap",
1010
"start": "next start",
1111
"lint": "next lint",
12+
"format": "prettier --write .",
1213
"db:generate": "npx prisma generate",
1314
"db:studio": "npx prisma studio"
1415
},
@@ -52,9 +53,12 @@
5253
"@types/react": "^18",
5354
"@types/react-dom": "^18",
5455
"autoprefixer": "^10.4.19",
55-
"eslint": "^8",
56-
"eslint-config-next": "14.2.3",
56+
"eslint": "^8.57.1",
57+
"eslint-config-next": "^14.2.3",
58+
"eslint-config-prettier": "^10.0.1",
59+
"eslint-plugin-prettier": "^5.2.3",
5760
"postcss": "^8",
61+
"prettier": "^3.5.1",
5862
"prisma": "^5.14.0",
5963
"tailwindcss": "^3.4.1",
6064
"ts-node": "^10.9.2",

0 commit comments

Comments
 (0)