-
Notifications
You must be signed in to change notification settings - Fork 1
Editor setup #11
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
Open
pchalupa
wants to merge
9
commits into
main
Choose a base branch
from
editor-setup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Editor setup #11
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
204c59a
sidebar translation
pchalupa cb4ba05
translate you will learn component
pchalupa 9446937
translation draft
pchalupa e61847a
translate toc
pchalupa e92409f
translation review
pchalupa 7a97c0d
typo fix
pchalupa d0341cd
fix: typo
pchalupa ca285ff
fix: translation
pchalupa 82e31ba
Update src/content/learn/editor-setup.md
pchalupa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,62 +1,62 @@ | ||
| --- | ||
| title: Editor Setup | ||
| title: Nastavení editoru | ||
| --- | ||
|
|
||
| <Intro> | ||
|
|
||
| A properly configured editor can make code clearer to read and faster to write. It can even help you catch bugs as you 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. | ||
| Dobře nastavený editor vám pomůže ke kódu, který bude snazší číst i psát. Dokonce vám pomůže odhalit chyby již během psaní! Pokud je toto poprvé, kdy si nastavujete editor, nebo hledáte, jak vylepši stávající nastavení, máme pro vás několik tipů. | ||
|
|
||
| </Intro> | ||
|
|
||
| <YouWillLearn> | ||
|
|
||
| * What the most popular editors are | ||
| * How to format your code automatically | ||
| * Které jsou nejpopulárnější editory | ||
pchalupa marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * Jak automaticky formátovat kód | ||
|
|
||
| </YouWillLearn> | ||
|
|
||
| ## Your editor {/*your-editor*/} | ||
| ## Váš 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/) je jeden z nejpoužívanějších editorů. Obsahuje rozsáhlé tržiště s rozšířeními a také integruje populární služby, jako je například GitHub. Většina vlastností, které zde budou zmíněny, mohou být do VS Code nainstalovány jako rozšíření, což ho činí vysoce konfigurovatelný! | ||
|
|
||
| Other popular text editors used in the React community include: | ||
| Další populární textové editory v React komunitě: | ||
|
|
||
| * [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/) je integrované vývojové prostředí navrženo přímo pro JavaScript. | ||
| * [Sublime Text](https://www.sublimetext.com/) má podporu pro JSX a TypeScript, [zvýraznění syntaxí](https://stackoverflow.com/a/70960574/458193) a našeptávač. | ||
| * [Vim](https://www.vim.org/) je vysoce konfigurovatelný textový editor, postavený tak aby tvorba a úprava textu byla velmi efektivní. Jako "vi" je dostupný ve většině UNIX systémech a také v Apple OS X. | ||
|
|
||
| ## Recommended text editor features {/*recommended-text-editor-features*/} | ||
| ## Doporučené vlastnosti textového editoru {/*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! | ||
| Některé editory mají tyto vlastnosti již integrovány v sobě, jiné mohou potřebovat dodatečné rozšíření. Rozhodně si zkontrolujte co vám zvolený editor nabízí! | ||
|
|
||
| ### Linting {/*linting*/} | ||
| ### Linter {/*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. | ||
| Lintery upozorňují na problémy již během psaní kódu, což vede k jejich dřívějšímu opravení. [ESLint](https://eslint.org/) je populární, open source linter pro JavaScript. | ||
|
|
||
| * [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/)) | ||
| * [Integrate ESLint in VSCode with the official extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) | ||
| * [Nainstalujte si ESlint s doporučenou konfigurací pro React](https://www.npmjs.com/package/eslint-config-react-app) (ujistěte se že máte nainstalovaný [Node](https://nodejs.org/en/download/current/)!) | ||
| * [Integrace ESlintu do VSCode pomocí oficiálního rozšíření](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) | ||
|
|
||
| **Make sure that you've enabled all the [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) rules for your project.** They are essential and catch the most severe bugs early. The recommended [`eslint-config-react-app`](https://www.npmjs.com/package/eslint-config-react-app) preset already includes them. | ||
| **Ujistěte se že máte aktivovány všechny [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) pravidla pro váš projekt.** Jsou nezbytné a odchytí závažné chyby včas. Doporučované [`eslint-config-react-app`](https://www.npmjs.com/package/eslint-config-react-app) přednastavení je již obsahuje. | ||
|
|
||
| ### Formatting {/*formatting*/} | ||
| ### Formátování {/*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. | ||
| Poslední věc, kterou byste chtěli je diskuse s dalšími vývojáři ohledně [tabulátory vs mezery](https://www.google.com/search?q=tabs+vs+spaces)! Naštěstí, [Prettier](https://prettier.io/) zformátuje váš kód tak aby vyhovoval přednastavení, pomocí konfigurovatelných pravidel. Spusťte Prettier, a všechny tabulátory budou převedeny na mezery s odsazením, uvozovky a další budou vyhovovat přednastavení. V ideálním případě se Prettier spustí při uložení souboru a rychle provede tyto změny za vás. | ||
pchalupa marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| You can install the [Prettier extension in VSCode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) by following these steps: | ||
| [Prettier pro VSCode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) si můžete nainstalovat následovně: | ||
|
|
||
| 1. Launch VS Code | ||
| 2. Use Quick Open (press Ctrl/Cmd+P) | ||
| 3. Paste in `ext install esbenp.prettier-vscode` | ||
| 4. Press Enter | ||
| 1. Otevřete VS Code | ||
| 2. Použijte nabídku rychlého otevření (stiskněte Ctrl/Cmd+P) | ||
| 3. Vložte `ext install esbenp.prettier-vscode` | ||
| 4. Zmáčkněte Enter | ||
|
|
||
| #### Formatting on save {/*formatting-on-save*/} | ||
| #### Formátování při uložení {/*formatting-on-save*/} | ||
|
|
||
| Ideally, you should format your code on every save. VS Code has settings for this! | ||
| Ideální je formátovat kód při každém uložení. VS Code má pro to nastavení! | ||
|
|
||
| 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. Ve VS Code, stiskněte `CTRL/CMD + SHIFT + P`. | ||
| 2. Napište "nastavení" | ||
| 3. Zmáčkněte Enter | ||
| 4. Do vyhledávacího políčka zadejte "format on save" | ||
| 5. Ujistěte se že "format on save" volba je zaškrtnuta! | ||
|
|
||
| > If your ESLint preset has formatting rules, they may conflict with Prettier. We recommend disabling 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. | ||
| > Pokud vaše konfigurace ESLintu obsahuje také pravidla pro formátování, může nastat konflikt s Prettierem. Doporučujeme vypnout všechny pravidla formátování v konfiguraci Eslintu pomocí [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier) aby se ESlint zaměřoval *pouze* na logické chyby. Pokud chcete zajistit, že budou soubory zformátovány před sloučením pull requestu, použijte [`prettier --check`](https://prettier.io/docs/en/cli.html#--check) ve vašem systému pro kontinuální integraci. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.