We haven't replaced Visual Studio, but it's great for some aspects of our development process. Previously, we used a lot of different development tools (alongside Visual Studio), but that changed when Microsoft launched Visual Studio Code. You can find your settings.json by using Preferences: Open User Settings from your Command Palette (⇧+⌘+P | ⇧+CTRL+P).Īnd now every time you save a file Prettier will format it according to your ES Lint configuration.Extending your IDE is the new black and we also use a lot of extensions every day in our daily work. "editor.formatOnSave": true, "prettier.eslintIntegration": true To achieve this we simply add two lines to our VS Codes settings.json. For today we will only use it every time we save a file in our editor. With prettier you can achieve great things, even format your code on commit which can greatly help to streamline coding-style across the team. The later is a tool generally used to format code. The first is a plugin you probably have installed already to help you see errors in your code-style. Go ahead and install ES Lint and Prettier. Luckily there are two plugins that can help us get around this. Especially if you are regularly engaged with different companies using different styles this becomes quite cumbersome. Once you have rules setup and are hacking away in VS Code, the editor will start to complain every time you forget that “you should indent x” or whatever extraordinary rule your company might use. If not the airbnb rules are a good place to get you started. This assumes that you already have some ESLint rules in place. Let’s add some style to our code, like color to a canvas, just easier.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |