Skip to content

Commit f4f39a5

Browse files
SeungJin051hg-pyun
andauthored
docs: translate blog - React 19.2 (#1341)
issue: #1340 # React 19.2 블로그 문서 번역 React 19.2 블로그 게시글(`src/content/blog/2025/10/01/react-19-2.md`) 및 관련 인덱스 파일(`src/content/blog/index.md`)의 한국어 번역을 진행했습니다. 또한 본문에서 참조되는 다이어그램 이미지를 추가했습니다. 리액트 영문 공식문서(https://github.com/reactjs/react.dev/blob/main/src/content/blog/2025/10/01/react-19-2.md) 리액트 19.2 다이어그램 이미지(https://github.com/reactjs/react.dev/tree/main/public/images/docs/diagrams) <img width="953" height="789" alt="result" src="https://github.com/user-attachments/assets/e8fdfdef-9186-4086-975f-538cde8faf20" /> ## 필수 확인 사항 - [x] [기여자 행동 강령 규약<sup>Code of Conduct</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인<sup>Contributing</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드<sup>Universal Style Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례<sup>Best Practices for Translation</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리<sup>Translate Glossary</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드<sup>Textlint Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사<sup>Spelling Check</sup>](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성<sup>Draft Translation</sup> - [ ] 리뷰 반영<sup>Resolve Reviews</sup> --------- Co-authored-by: Haegul Pyun <phg2491@gmail.com>
1 parent 65a31bf commit f4f39a5

File tree

6 files changed

+147
-131
lines changed

6 files changed

+147
-131
lines changed

eslint-local-rules/__tests__/lint-markdown-code-blocks.test.js

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ const path = require('path');
1111
const {ESLint} = require('eslint');
1212
const plugin = require('..');
1313

14-
const FIXTURES_DIR = path.join(
15-
__dirname,
16-
'fixtures',
17-
'src',
18-
'content'
19-
);
14+
const FIXTURES_DIR = path.join(__dirname, 'fixtures', 'src', 'content');
2015
const PARSER_PATH = path.join(__dirname, '..', 'parser.js');
2116

2217
function createESLint({fix = false} = {}) {
@@ -53,11 +48,7 @@ async function lintFixture(name, {fix = false} = {}) {
5348

5449
async function run() {
5550
const basicResult = await lintFixture('basic-error.md');
56-
assert.strictEqual(
57-
basicResult.messages.length,
58-
1,
59-
'expected one diagnostic'
60-
);
51+
assert.strictEqual(basicResult.messages.length, 1, 'expected one diagnostic');
6152
assert(
6253
basicResult.messages[0].message.includes('Calling setState during render'),
6354
'expected message to mention setState during render'
@@ -91,9 +82,7 @@ async function run() {
9182
fix: true,
9283
});
9384
assert(
94-
duplicateFixed.output.includes(
95-
"{expectedErrors: {'react-compiler': [4]}}"
96-
),
85+
duplicateFixed.output.includes("{expectedErrors: {'react-compiler': [4]}}"),
9786
'expected duplicates to be rewritten to a single canonical block'
9887
);
9988
assert(
@@ -118,14 +107,12 @@ async function run() {
118107
fix: true,
119108
});
120109
assert(
121-
malformedFixed.output.includes(
122-
"{expectedErrors: {'react-compiler': [4]}}"
123-
),
110+
malformedFixed.output.includes("{expectedErrors: {'react-compiler': [4]}}"),
124111
'expected malformed metadata to be replaced with canonical form'
125112
);
126113
}
127114

128-
run().catch(error => {
115+
run().catch((error) => {
129116
console.error(error);
130117
process.exitCode = 1;
131118
});

eslint-local-rules/rules/metadata.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,19 @@ function parseExpectedErrorsEntries(rawEntries) {
8484

8585
if (parsed && typeof parsed === 'object') {
8686
for (const [key, value] of Object.entries(parsed)) {
87-
entries[key] = normalizeEntryValues(Array.isArray(value) ? value.flat() : value);
87+
entries[key] = normalizeEntryValues(
88+
Array.isArray(value) ? value.flat() : value
89+
);
8890
}
8991
}
9092

9193
return entries;
9294
}
9395

9496
function parseExpectedErrorsToken(tokenText) {
95-
const match = tokenText.match(/^\{\s*expectedErrors\s*:\s*(\{[\s\S]*\})\s*\}$/);
97+
const match = tokenText.match(
98+
/^\{\s*expectedErrors\s*:\s*(\{[\s\S]*\})\s*\}$/
99+
);
96100
if (!match) {
97101
return null;
98102
}
@@ -203,7 +207,9 @@ function cloneMetadata(metadata) {
203207
}
204208

205209
function findExpectedErrorsToken(metadata) {
206-
return metadata.tokens.find((token) => token.type === 'expectedErrors') || null;
210+
return (
211+
metadata.tokens.find((token) => token.type === 'expectedErrors') || null
212+
);
207213
}
208214

209215
function getCompilerExpectedLines(metadata) {

eslint-local-rules/rules/react-compiler.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,19 @@ function runReactCompiler(code, filename) {
9898
continue;
9999
}
100100

101-
const loc = typeof detail.primaryLocation === 'function'
102-
? detail.primaryLocation()
103-
: null;
101+
const loc =
102+
typeof detail.primaryLocation === 'function'
103+
? detail.primaryLocation()
104+
: null;
104105

105106
if (loc == null || typeof loc === 'symbol') {
106107
continue;
107108
}
108109

109-
const message = typeof detail.printErrorMessage === 'function'
110-
? detail.printErrorMessage(result.sourceCode, {eslint: true})
111-
: detail.description || 'Unknown React Compiler error';
110+
const message =
111+
typeof detail.printErrorMessage === 'function'
112+
? detail.printErrorMessage(result.sourceCode, {eslint: true})
113+
: detail.description || 'Unknown React Compiler error';
112114

113115
diagnostics.push({detail, loc, message});
114116
}

0 commit comments

Comments
 (0)