Skip to content

Commit a1a1f00

Browse files
committed
fix: resolve ESLint errors and apply Prettier formatting
1 parent f457fc8 commit a1a1f00

36 files changed

+1472
-1397
lines changed

.eslintignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Build output
2+
build/
3+
dist/
4+
.svelte-kit/
5+
node_modules/
6+
7+
# Test reports
8+
playwright-report/
9+
test-results/
10+
coverage/
11+
12+
# Config and generated files
13+
*.config.js
14+
*.config.ts
15+
.DS_Store
16+
*.min.js
17+
18+
# Temporary files
19+
*.tmp
20+
*.log
21+
.env
22+
.env.*
23+
!.env.example
24+
25+
# IDE
26+
.vscode/
27+
.idea/
28+
29+
# Documentation
30+
CLAUDE.md
31+
*.md

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
tags: ${{ steps.meta.outputs.tags }}
5555
labels: ${{ steps.meta.outputs.labels }}
5656
cache-from: type=gha
57-
cache-to: type=gha,mode=max
57+
cache-to: type=gha,mode=max

.github/workflows/pr-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
lint-and-format:
1111
runs-on: ubuntu-latest
12-
12+
1313
steps:
1414
- name: Checkout repository
1515
uses: actions/checkout@v4
@@ -30,4 +30,4 @@ jobs:
3030
run: npm run format:check
3131

3232
- name: Type check
33-
run: npm run check
33+
run: npm run check

README-ko.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PDJsonEditor
22

3-
*[English](README.md)*
3+
_[English](README.md)_
44

55
SvelteKit과 Svelte 5로 구축된 강력한 JSON 시각화 및 편집 도구입니다. JSON 데이터를 코드 에디터와 인터랙티브 그래프 뷰에서 동시에 보고 편집할 수 있습니다.
66

@@ -11,60 +11,70 @@ SvelteKit과 Svelte 5로 구축된 강력한 JSON 시각화 및 편집 도구입
1111
## ✨ 주요 기능
1212

1313
### 📝 고급 JSON 에디터
14+
1415
- **문법 강조**: CodeMirror 기반 JSON 문법 강조 기능
1516
- **실시간 검증**: 즉시 JSON 문법 검증 및 오류 리포팅
1617
- **포맷 & 압축**: 원클릭 JSON 포맷팅 및 압축 기능
1718
- **네비게이션**: 그래프 노드 클릭으로 해당 JSON 위치로 이동
1819

1920
### 🔗 HTTP 요청 통합
21+
2022
- **다중 메소드 지원**: GET, POST, PUT, DELETE, PATCH 요청
2123
- **커스텀 헤더**: HTTP 헤더 추가 및 관리
2224
- **요청 본문**: POST/PUT/PATCH용 커스텀 요청 본문 설정
2325
- **URL 가져오기**: URL에서 직접 JSON 데이터 가져오기
2426

2527
### 📊 인터랙티브 그래프 시각화
28+
2629
- **트리 구조**: JSON을 인터랙티브 트리 그래프로 시각화
2730
- **컴팩트 노드**: 원시 값 그룹화 디스플레이
2831
- **확장/축소**: 시각적 표시와 함께 노드 확장 토글
2932
- **참조 네비게이션**: 관련 객체와 배열 간 네비게이션
3033
- **자동 레이아웃**: Dagre 기반 자동 그래프 레이아웃
3134

3235
### 🎯 스마트 노드 디스플레이
36+
3337
- **그룹화된 원시 값**: 명확성을 위해 부모 노드에서 원시 값 그룹화
3438
- **참조 타입**: 객체와 배열을 참조로 표시 (예: `address {3}`, `hobbies [3]`)
3539
- **더 보기**: 20개 이상의 항목을 가진 노드를 "더 보기" 기능과 함께 자동 축소
3640
- **개별 토글**: 개별 참조 항목 확장/축소
3741

3842
### 🌐 다국어 지원
43+
3944
- **다중 언어**: 영어 및 한국어 지원
4045
- **언어 전환기**: 헤더에서 쉬운 언어 전환
4146
- **지속적 설정**: localStorage에 언어 설정 저장
4247

4348
## 🚀 시작하기
4449

4550
### 필수 조건
51+
4652
- Node.js v20.19 이상
4753
- npm 또는 yarn 패키지 매니저
4854

4955
### 설치
5056

5157
1. **저장소 클론**
58+
5259
```bash
5360
git clone https://github.com/podosoft-dev/pdjsoneditor.git
5461
cd pdjsoneditor
5562
```
5663

5764
2. **의존성 설치**
65+
5866
```bash
5967
npm install
6068
```
6169

6270
3. **개발 서버 시작**
71+
6372
```bash
6473
npm run dev
6574
```
6675

6776
4. **브라우저에서 열기**
77+
6878
```
6979
http://localhost:5173
7080
```
@@ -141,11 +151,12 @@ services:
141151
image: ghcr.io/podosoft-dev/pdjsoneditor:latest
142152
container_name: pdjsoneditor
143153
ports:
144-
- "3000:3000"
154+
- '3000:3000'
145155
restart: unless-stopped
146156
```
147157
148158
그 다음 실행:
159+
149160
```bash
150161
docker-compose up -d
151162
```
@@ -155,17 +166,20 @@ docker-compose up -d
155166
## 📖 사용 방법
156167

157168
### 기본 JSON 편집
169+
158170
1. **JSON 붙여넣기 또는 입력**: 왼쪽 에디터 패널에서
159171
2. **구조 보기**: 오른쪽 그래프 패널에서
160172
3. **뷰 간 네비게이션**: 노드 클릭 또는 에디터 사용
161173

162174
### URL에서 데이터 가져오기
175+
163176
1. **HTTP 메소드 선택**: 드롭다운에서 (GET, POST, PUT, DELETE, PATCH)
164177
2. **URL 입력**: 입력 필드에
165178
3. **헤더와 본문 설정**: Settings 버튼 사용 (선택사항)
166179
4. **"Go" 클릭**: JSON 데이터를 가져와서 로드
167180

168181
### 그래프 상호작용
182+
169183
- **확장/축소**: 노드의 색깔있는 핸들 클릭
170184
- **더 보기**: 많은 항목이 있는 노드에서 "더 보기" 클릭
171185
- **네비게이션**: 노드 클릭으로 해당 JSON 위치로 이동
@@ -193,4 +207,4 @@ docker-compose up -d
193207

194208
<div align="center">
195209
<strong><a href="https://podosoft.io">PODOSOFT</a>에서 ❤️로 만들었습니다</strong>
196-
</div>
210+
</div>

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PDJsonEditor
22

3-
*[한국어](README-ko.md)*
3+
_[한국어](README-ko.md)_
44

55
A powerful JSON visualization and editing tool built with SvelteKit and Svelte 5. View and edit JSON data simultaneously in both code editor and interactive graph views.
66

@@ -11,60 +11,70 @@ A powerful JSON visualization and editing tool built with SvelteKit and Svelte 5
1111
## ✨ Features
1212

1313
### 📝 Advanced JSON Editor
14+
1415
- **Syntax Highlighting**: CodeMirror-powered editor with JSON syntax highlighting
1516
- **Real-time Validation**: Instant JSON syntax validation and error reporting
1617
- **Format & Minify**: One-click JSON formatting and minification
1718
- **Navigation**: Click on graph nodes to jump to corresponding JSON location
1819

1920
### 🔗 HTTP Request Integration
21+
2022
- **Multi-Method Support**: GET, POST, PUT, DELETE, PATCH requests
2123
- **Custom Headers**: Add and manage HTTP headers
2224
- **Request Body**: Configure custom request bodies for POST/PUT/PATCH
2325
- **URL Import**: Fetch JSON data directly from URLs
2426

2527
### 📊 Interactive Graph Visualization
28+
2629
- **Tree Structure**: Visualize JSON as an interactive tree graph
2730
- **Compact Nodes**: Compact display grouping primitive values
2831
- **Expand/Collapse**: Toggle node expansion with visual indicators
2932
- **Reference Navigation**: Navigate between related objects and arrays
3033
- **Auto Layout**: Dagre-powered automatic graph layout
3134

3235
### 🎯 Smart Node Display
36+
3337
- **Grouped Primitives**: Primitive values grouped in parent nodes for clarity
3438
- **Reference Types**: Objects and arrays shown as references (e.g., `address {3}`, `hobbies [3]`)
3539
- **Show More**: Automatically collapse nodes with 20+ items with "show more" functionality
3640
- **Individual Toggles**: Expand/collapse individual reference items
3741

3842
### 🌐 Internationalization
43+
3944
- **Multi-language**: English and Korean support
4045
- **Language Switcher**: Easy language switching in header
4146
- **Persistent Settings**: Language preference saved in localStorage
4247

4348
## 🚀 Getting Started
4449

4550
### Prerequisites
51+
4652
- Node.js v20.19 or higher
4753
- npm or yarn package manager
4854

4955
### Installation
5056

5157
1. **Clone the repository**
58+
5259
```bash
5360
git clone https://github.com/podosoft-dev/pdjsoneditor.git
5461
cd pdjsoneditor
5562
```
5663

5764
2. **Install dependencies**
65+
5866
```bash
5967
npm install
6068
```
6169

6270
3. **Start development server**
71+
6372
```bash
6473
npm run dev
6574
```
6675

6776
4. **Open in browser**
77+
6878
```
6979
http://localhost:5173
7080
```
@@ -141,11 +151,12 @@ services:
141151
image: ghcr.io/podosoft-dev/pdjsoneditor:latest
142152
container_name: pdjsoneditor
143153
ports:
144-
- "3000:3000"
154+
- '3000:3000'
145155
restart: unless-stopped
146156
```
147157
148158
Then run:
159+
149160
```bash
150161
docker-compose up -d
151162
```
@@ -155,17 +166,20 @@ Access the application at `http://localhost:3000`
155166
## 📖 Usage
156167

157168
### Basic JSON Editing
169+
158170
1. **Paste or type JSON** in the left editor panel
159171
2. **View the structure** in the right graph panel
160172
3. **Navigate between views** by clicking nodes or using the editor
161173

162174
### Fetching Data from URLs
175+
163176
1. **Select HTTP method** from the dropdown (GET, POST, PUT, DELETE, PATCH)
164177
2. **Enter the URL** in the input field
165178
3. **Configure headers and body** using the Settings button (optional)
166179
4. **Click "Go"** to fetch and load the JSON data
167180

168181
### Graph Interaction
182+
169183
- **Expand/Collapse**: Click the colored handles on nodes
170184
- **Show More**: Click "Show more" on nodes with many items
171185
- **Navigate**: Click nodes to jump to corresponding JSON location
@@ -193,4 +207,4 @@ If you encounter any issues or have questions, please [open an issue](https://gi
193207

194208
<div align="center">
195209
<strong>Made with ❤️ by <a href="https://podosoft.io">PODOSOFT</a></strong>
196-
</div>
210+
</div>

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ services:
88
image: pdjsoneditor:latest
99
container_name: pdjsoneditor
1010
ports:
11-
- "3000:3000"
11+
- '3000:3000'
1212
environment:
1313
- NODE_ENV=production
1414
- HOST=0.0.0.0
1515
- PORT=3000
1616
restart: unless-stopped
1717
healthcheck:
18-
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000"]
18+
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:3000']
1919
interval: 30s
2020
timeout: 10s
2121
retries: 3
22-
start_period: 40s
22+
start_period: 40s

playwright.config.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,33 @@ export default defineConfig({
2222
/* Opt out of parallel tests on CI. */
2323
workers: process.env.CI ? 1 : undefined,
2424
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
25-
reporter: [
26-
['html', { outputFolder: 'playwright-report' }],
27-
['list']
28-
],
25+
reporter: [['html', { outputFolder: 'playwright-report' }], ['list']],
2926
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
3027
use: {
3128
/* Base URL to use in actions like `await page.goto('/')`. */
3229
baseURL: 'http://localhost:5173',
3330
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
3431
trace: 'on-first-retry',
3532
/* Take screenshot on failure */
36-
screenshot: 'only-on-failure',
33+
screenshot: 'only-on-failure'
3734
},
3835

3936
/* Configure projects for major browsers */
4037
projects: [
4138
{
4239
name: 'chromium',
43-
use: { ...devices['Desktop Chrome'] },
40+
use: { ...devices['Desktop Chrome'] }
4441
},
4542

4643
{
4744
name: 'firefox',
48-
use: { ...devices['Desktop Firefox'] },
45+
use: { ...devices['Desktop Firefox'] }
4946
},
5047

5148
{
5249
name: 'webkit',
53-
use: { ...devices['Desktop Safari'] },
54-
},
50+
use: { ...devices['Desktop Safari'] }
51+
}
5552

5653
/* Test against mobile viewports. */
5754
// {
@@ -80,13 +77,13 @@ export default defineConfig({
8077
command: 'npm run dev',
8178
url: 'http://localhost:5173',
8279
reuseExistingServer: !process.env.CI,
83-
timeout: 120 * 1000,
80+
timeout: 120 * 1000
8481
},
8582
{
8683
command: 'npm run test:server',
8784
url: 'http://localhost:3001',
8885
reuseExistingServer: !process.env.CI,
89-
timeout: 120 * 1000,
86+
timeout: 120 * 1000
9087
}
91-
],
92-
});
88+
]
89+
});

src/i18n/en/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ const en: BaseTranslation = {
3030
bodyDescription: 'Configure the request body for POST/PUT/PATCH requests.',
3131
bodyPlaceholder: 'Enter request body (JSON, XML, etc.)',
3232
useEditorContent: 'Use editor content as request body',
33-
sendAsRawText: 'Send as raw text (don\'t parse as JSON)',
33+
sendAsRawText: "Send as raw text (don't parse as JSON)",
3434
clearAll: 'Clear All',
35-
clearAllConfirm: 'Are you sure you want to clear all settings? This will remove all saved headers, body, and URL from storage.',
35+
clearAllConfirm:
36+
'Are you sure you want to clear all settings? This will remove all saved headers, body, and URL from storage.',
3637
cancel: 'Cancel',
3738
save: 'Save'
3839
},

0 commit comments

Comments
 (0)