Skip to content

Update editor-setup.md #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions beta/src/pages/learn/editor-setup.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
---
title: Editor Setup
title: התקנת עורך קוד
---

<Intro>

A properly configured editor can make code clearer to read and faster to write. It can even help you catch bugs as your write them! If this is your first time setting up an editor or you're looking to tune up your current editor, we have a few recommendations.

עורך קוד שמקונפג כראוי עוזר לקרוא ולכתוב קוד בקלות ובמהירות. בנוסף הוא יכול לעזור לנו לתפוס באגים בזמן שאנחנו כותבים אותם! אם זאת הפעם הראשונה שאתה מתקין עורך קוד או שאתה מחפש לשפר את שלך, יש לנו כמה המלצות.
</Intro>

<YouWillLearn>

* What the most popular editors are
* How to format your code automatically
* אילו עורכי קוד הם הכי פופולריים
* איך לסדר את הקוד שלך אוטומטית

</YouWillLearn>

## Your editor {/*your-editor*/}
## העורך שלך {/*your-editor*/}

[VS Code](https://code.visualstudio.com/) is one of the most popular editors in use today. It has a large marketplace of extensions and integrates well with popular services like GitHub. Most of the features listed below can be added to VS Code as extensions as well, making it highly configurable!
אחד מעורכי הקוד הפופולריים ביותר (אם לא הכי) הוא [VS Code](https://code.visualstudio.com/). יש לו תוספים רבים שניתן להתקין והוא מתממשק טוב עם שירותים כמו גיטהאב. ניתן להוסיף את רוב הפיצ׳רים הכתובים כאן בהמשך ל-VS Code כתוספים.

Other popular text editors used in the React community include:
עורכי קוד נוספים שמשתמשים בהם בקהילת ריאקט כוללים:

* [WebStorm](https://www.jetbrains.com/webstorm/) is an integrated development environment designed specifically for JavaScript.
* [Sublime Text](https://www.sublimetext.com/) has support for JSX and TypeScript, [syntax highlighting](https://stackoverflow.com/a/70960574/458193) and autocomplete built in.
* [Vim](https://www.vim.org/) is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as "vi" with most UNIX systems and with Apple OS X.
* וובסטורם - [WebStorm](https://www.jetbrains.com/webstorm/) הוא סביבת פיתוח שעוצבה במיוחד לפיתוח בעזרת JavaScript.
* סאבליים טקסט - [Sublime Text](https://www.sublimetext.com/) תומך ב-syntax highlighting של JSX ו-TypeScript.
* וים - [Vim](https://www.vim.org/) הוא עורך קוד גמיש מאוד שנבנה על מנת לאפשר פיתוח מהיר. הוא כלול ברוב מערכות ההפעלה מבוססות Unix וב-MacOS.

## Recommended text editor features {/*recommended-text-editor-features*/}
## פיצ׳רים מומלצים בעורכי קוד {/*recommended-text-editor-features*/}

Some editors come with these features built in, but others might require adding an extension. Check to see what support your editor of choice provides to be sure!
חלק מעורכי הקוד מגיעים עם פיצ׳רים אלה ישר מהקופסה, אבל אחרים דורשים את הוספתם באמצעות תוסף. בדוק מה מובנה בעורך הקוד שלך ליתר ביטחון.

### Linting {/*linting*/}

Code linters find problems in your code as you write, helping you fix them early. [ESLint](https://eslint.org/) is a popular, open source linter for JavaScript.
לינטרים מוצאים בעיות בקוד שלך בזמן שאתה כותב אותו, מה שמאפשר תיקון מוקדם. לינטר פופולרי ומומלץ הוא [ESLint](https://eslint.org/).

* [Install ESLint with the recommended configuration for React](https://www.npmjs.com/package/eslint-config-react-app) (be sure you have [Node installed!](https://nodejs.org/en/download/current/))
* [התקן ESLint עם האופציות המומלצות לריאקט](https://www.npmjs.com/package/eslint-config-react-app) (וודא שיש לך [Node מותקן!](https://nodejs.org/en/download/current/))
* [Integrate ESLint in VSCode with the official extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)

### Formatting {/*formatting*/}

The last thing you want to do when sharing your code with another contributor is get into an discussion about [tabs vs spaces](https://www.google.com/search?q=tabs+vs+spaces)! Fortunately, [Prettier](https://prettier.io/) will clean up your code by reformatting it to conform to preset, configurable rules. Run Prettier, and all your tabs will be converted to spaces—and your indentation, quotes, etc will also all be changed to conform to the configuration. In the ideal setup, Prettier will run when you save your file, quickly making these edits for you.
הדרך האחרון שאתה רוצה כשאתה משתף קוד עם מפתח אחר הוא להיכנס לוויכוח [tabs vs spaces](https://www.google.com/search?q=tabs+vs+spaces). למזלנו, [prettier](https://prettier.io/)) ינקה את הקוד שלך על ידי התאמתו לחוקים קיימים. בעת הרצת prettier, כל ה-tabs יהפכו ל-spaces, וגרשיים כפולים או יחידים ישונו בהתאם לקונפיגורציה. בסביבת פיתוח אידיאלית, Prettier ירוץ בעת שמירת קובץ, ויעשה את כל השינויים הללו אוטומטית.

You can install the [Prettier extension in VSCode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) by following these steps:
ניתן להתקין את Prettier ב[VS Code](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) בעזרת הצעדים הבאים:

1. Launch VS Code
2. Use Quick Open (press Ctrl/Cmd+P)
3. Paste in `ext install esbenp.prettier-vscode`
4. Press Enter
1. פתח את VS Code
2. הרץ את Quick Open (בעזרת Ctrl/Cmd+p)
3. הדבק בפנים את `ext install esbenp.prettier-vscode`
4. לחץ Enter

#### Formatting on save {/*formatting-on-save*/}

Ideally, you should format your code on every save. VS Code has settings for this!
באופן אידיאלי, כדאי לאפשר לתוסף לסדר את הקוד בכל שמירת קובץ. מזל ש-VS Code מאפשר לנו את זה!

1. In VS Code, press `CTRL/CMD + SHIFT + P`.
2. Type "settings"
3. Hit Enter
4. In the search bar, type "format on save"
5. Be sure the "format on save" option is ticked!
1. ב-VS Code, לחץ `CTRL/CMD + SHIFT + P`.
2. כתוב "settings"
3. לחץ Enter
4. בשורת החיפוש, כתוב "format on save"
5. וודא כי האופצייה "format on save" מסומנת

> If your ESLint preset has formatting rules, they may conflict with Prettier. We recommend to disable all formatting rules in your ESLint preset using [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier) so that ESLint is *only* used for catching logical mistakes. If you want to enforce that files are formatted before a pull request is merged, use [`prettier --check`](https://prettier.io/docs/en/cli.html#--check) for your continuous integration.
> אם קונפיג הESLint שלך מכיל חוקים שקשורים לסידור קוד, הם עלולים להתנגש עם Prettier. אנחנו ממליצים לכבות את חוקים אלו בקונפיג הESLint שלך באמצעות [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier), ככה שESLint עובד רק על מנת לתפוס שגיאות לוגיות. אם אתה רוצה להחיל סידור קוד לפני מירג׳וג׳ PR, השתמש ב-[`prettier --check`](https://prettier.io/docs/en/cli.html#--check) ב-CI שלך.