mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-04-18 18:31:21 +00:00
fix lint workflow, add setup script for lint, update readme with lint instructions
This commit is contained in:
parent
a090898fad
commit
2eed15e714
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@ -17,6 +17,6 @@ jobs:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: npm install
|
||||
- name: Run lint
|
||||
run: npm run lint
|
@ -129,10 +129,11 @@ You can now run locally.
|
||||
|
||||
### Linting and Code Formatting
|
||||
|
||||
We use ESLint with Next.js configuration and Prettier for code formatting. We've kept the linting process simple with just two commands:
|
||||
We use ESLint with Next.js configuration and Prettier for code formatting:
|
||||
|
||||
- `npm run lint` - Run ESLint to check for issues
|
||||
- `npm run lint:fix` - Fix both ESLint and Prettier formatting issues in one command
|
||||
1. First-time setup: `npm run setup-lint`
|
||||
2. Check code: `npm run lint`
|
||||
3. Fix issues: `npm run lint:fix`
|
||||
|
||||
Before submitting a PR, please run `npm run lint:fix` to ensure your code follows our standards.
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
"build": "npx prisma generate && next build && npx prisma migrate deploy",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"lint:fix": "next lint --fix && prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
|
||||
"lint:fix": "next lint --fix && npx prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
|
||||
"setup-lint": "npm install --save-dev prettier@3.5.3",
|
||||
"postinstall": "npx prisma generate"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -81,12 +81,10 @@ export default async function handler(req, res) {
|
||||
},
|
||||
}
|
||||
);
|
||||
res
|
||||
.status(200)
|
||||
.json({
|
||||
pr: response.data.invoice,
|
||||
verify: `${BACKEND_URL}/api/lightning-address/verify/${slug}/${response.data.payment_hash}`,
|
||||
});
|
||||
res.status(200).json({
|
||||
pr: response.data.invoice,
|
||||
verify: `${BACKEND_URL}/api/lightning-address/verify/${slug}/${response.data.payment_hash}`,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
res.status(500).json({ error: 'Failed to generate invoice' });
|
||||
|
Loading…
x
Reference in New Issue
Block a user