Skip to content

Commit f80416f

Browse files
committed
refactor: corrected Prettier usage
1 parent bee0db1 commit f80416f

File tree

160 files changed

+9186
-7521
lines changed

Some content is hidden

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

160 files changed

+9186
-7521
lines changed

.github/workflows/codeql.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL Advanced"
12+
name: 'CodeQL Advanced'
1313

1414
on:
1515
push:
16-
branches: [ "main" ]
16+
branches: ['main']
1717
pull_request:
18-
branches: [ "main" ]
18+
branches: ['main']
1919
schedule:
2020
- cron: '40 14 * * 3'
2121

@@ -43,10 +43,10 @@ jobs:
4343
fail-fast: false
4444
matrix:
4545
include:
46-
- language: actions
47-
build-mode: none
48-
- language: javascript-typescript
49-
build-mode: none
46+
- language: actions
47+
build-mode: none
48+
- language: javascript-typescript
49+
build-mode: none
5050
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
5151
# Use `c-cpp` to analyze code written in C, C++ or both
5252
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
@@ -56,45 +56,45 @@ jobs:
5656
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
5757
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
5858
steps:
59-
- name: Checkout repository
60-
uses: actions/checkout@v4
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
6161

62-
# Add any setup steps before running the `github/codeql-action/init` action.
63-
# This includes steps like installing compilers or runtimes (`actions/setup-node`
64-
# or others). This is typically only required for manual builds.
65-
# - name: Setup runtime (example)
66-
# uses: actions/setup-example@v1
62+
# Add any setup steps before running the `github/codeql-action/init` action.
63+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
64+
# or others). This is typically only required for manual builds.
65+
# - name: Setup runtime (example)
66+
# uses: actions/setup-example@v1
6767

68-
# Initializes the CodeQL tools for scanning.
69-
- name: Initialize CodeQL
70-
uses: github/codeql-action/init@v3
71-
with:
72-
languages: ${{ matrix.language }}
73-
build-mode: ${{ matrix.build-mode }}
74-
# If you wish to specify custom queries, you can do so here or in a config file.
75-
# By default, queries listed here will override any specified in a config file.
76-
# Prefix the list here with "+" to use these queries and those in the config file.
68+
# Initializes the CodeQL tools for scanning.
69+
- name: Initialize CodeQL
70+
uses: github/codeql-action/init@v3
71+
with:
72+
languages: ${{ matrix.language }}
73+
build-mode: ${{ matrix.build-mode }}
74+
# If you wish to specify custom queries, you can do so here or in a config file.
75+
# By default, queries listed here will override any specified in a config file.
76+
# Prefix the list here with "+" to use these queries and those in the config file.
7777

78-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
79-
# queries: security-extended,security-and-quality
78+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
79+
# queries: security-extended,security-and-quality
8080

81-
# If the analyze step fails for one of the languages you are analyzing with
82-
# "We were unable to automatically build your code", modify the matrix above
83-
# to set the build mode to "manual" for that language. Then modify this step
84-
# to build your code.
85-
# ℹ️ Command-line programs to run using the OS shell.
86-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
87-
- if: matrix.build-mode == 'manual'
88-
shell: bash
89-
run: |
90-
echo 'If you are using a "manual" build mode for one or more of the' \
91-
'languages you are analyzing, replace this with the commands to build' \
92-
'your code, for example:'
93-
echo ' make bootstrap'
94-
echo ' make release'
95-
exit 1
81+
# If the analyze step fails for one of the languages you are analyzing with
82+
# "We were unable to automatically build your code", modify the matrix above
83+
# to set the build mode to "manual" for that language. Then modify this step
84+
# to build your code.
85+
# ℹ️ Command-line programs to run using the OS shell.
86+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
87+
- if: matrix.build-mode == 'manual'
88+
shell: bash
89+
run: |
90+
echo 'If you are using a "manual" build mode for one or more of the' \
91+
'languages you are analyzing, replace this with the commands to build' \
92+
'your code, for example:'
93+
echo ' make bootstrap'
94+
echo ' make release'
95+
exit 1
9696
97-
- name: Perform CodeQL Analysis
98-
uses: github/codeql-action/analyze@v3
99-
with:
100-
category: "/language:${{matrix.language}}"
97+
- name: Perform CodeQL Analysis
98+
uses: github/codeql-action/analyze@v3
99+
with:
100+
category: '/language:${{matrix.language}}'

.github/workflows/playwright.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Playwright E2E Tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
permissions:
1010
contents: read

.github/workflows/vitest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Vitest Unit Tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
permissions:
1010
contents: read

.lintstagedrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix", "eslint"],
3+
"*.{json,md,yml}": ["prettier --write"]
4+
}

.prettierignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Build outputs
2+
.next/
3+
out/
4+
dist/
5+
coverage/
6+
playwright-report/
7+
8+
# Node modules
9+
node_modules/
10+
11+
# Lock files (formatting not needed)
12+
*.lock
13+
pnpm-lock.yaml
14+
15+
# Generated files
16+
*.min.js
17+
*.min.css
18+

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"semi": true,
4+
"singleQuote": true,
5+
"trailingComma": "all",
6+
"printWidth": 120,
7+
"tabWidth": 2,
8+
"arrowParens": "always"
9+
}

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ Modern Next.js website for [phpMyFAQ](https://www.phpmyfaq.de), a popular open-s
1515
## Getting Started
1616

1717
1. Install dependencies:
18+
1819
```bash
1920
pnpm install
2021
```
2122

2223
2. Start the development server:
24+
2325
```bash
2426
pnpm dev
2527
```
@@ -29,12 +31,14 @@ pnpm dev
2931
## Available Scripts
3032

3133
### Development
34+
3235
- `pnpm dev` - Start development server
3336
- `pnpm build` - Build for production
3437
- `pnpm start` - Start production server
3538
- `pnpm lint` - Run ESLint
3639

3740
### Testing
41+
3842
- `pnpm test` - Run unit tests with Vitest
3943
- `pnpm test:ui` - Run unit tests with UI
4044
- `pnpm test:coverage` - Run unit tests with a coverage report
@@ -43,6 +47,7 @@ pnpm dev
4347
- `pnpm test:e2e:headed` - Run E2E tests in headed mode
4448

4549
### Data Fetching
50+
4651
- `pnpm fetch:versions` - Fetch latest version information
4752
- `pnpm fetch:downloads` - Fetch download metadata
4853
- `pnpm update:data` - Update all external data
@@ -82,26 +87,32 @@ scripts/ # Data fetching scripts
8287
## Testing
8388

8489
### Unit Tests
90+
8591
This project includes comprehensive unit tests using Vitest and React Testing Library:
92+
8693
- Component rendering and behavior
8794
- Utility functions and data helpers
8895
- News parsing and markdown processing
8996

9097
Run unit tests:
98+
9199
```bash
92100
pnpm test # Run all tests
93101
pnpm test:ui # Interactive UI
94102
pnpm test:coverage # Coverage report
95103
```
96104

97105
### E2E Tests
106+
98107
Playwright E2E tests ensure:
108+
99109
- All pages load correctly (no 404 errors)
100110
- Navigation works properly
101111
- Favicon loads without errors
102112
- Page content displays correctly
103113

104114
Run E2E tests:
115+
105116
```bash
106117
pnpm test:e2e # Headless mode
107118
pnpm test:e2e:ui # Interactive UI
@@ -111,6 +122,7 @@ pnpm test:e2e:headed # Headed browser mode
111122
## Development
112123

113124
The site uses:
125+
114126
- **Bootstrap classes** for responsive layout
115127
- **Custom fonts** (Lato, Cabin) loaded from `/public/fonts/`
116128
- **Component-based architecture** for maintainability
@@ -119,6 +131,7 @@ The site uses:
119131
## Deployment
120132

121133
Build the static site:
134+
122135
```bash
123136
pnpm build
124137
```

commitlint.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ const Configuration: UserConfig = {
4444
},
4545
};
4646

47-
export default Configuration;
47+
export default Configuration;

0 commit comments

Comments
 (0)