Setting Up Your Editor
When working with Create React App, there are several tools you can use to enhance your editing experience and maximize productivity. Let's go through some tips to get your editor set up correctly.
Syntax Highlightingβ
To enable syntax highlighting in your favorite text editor, you can refer to the Babel documentation page for instructions. Most popular editors have coverage in the documentation.
Displaying Lint Output in the Editorβ
-
This feature requires
react-scripts@0.2.0
or higher. -
For projects created with
react-scripts@2.0.3
or higher, this feature works out of the box. -
Please ensure you have npm 3 or higher.
Some editors like Sublime Text, Atom, and Visual Studio Code provide ESLint plugins for displaying linting output in the editor. However, these plugins are not mandatory. You will still see the linting results in your terminal and browser console by default. If you prefer to view the linting results directly in your editor, you can install an ESLint plugin or extension.
Keep in mind that any customizations made to your ESLint config will only affect the editor integration, not the terminal or in-browser lint output. Create React App intentionally provides a minimal set of rules to catch common mistakes.
If you want to enforce a specific coding style for your project, you can consider using Prettier instead of ESLint style rules.