Home > Development Tools > VSCode > body text

10 Must-Have VSCode Extensions for JavaScript Developers

青灯夜游
Release: 2019-11-16 09:32:27
forward
3012 people have browsed it

Today, Visual Studio Code is undoubtedly the most popular lightweight code editor. It does borrow a lot from other code editors, most notably Sublime and Atom. However, the key to its success is its ability to provide better performance and stable performance.

10 Must-Have VSCode Extensions for JavaScript Developers

#In addition, it also provides functions that developers need very much, such as smart code prompts. These features were once only available in complete integrated development environments (IDEs) like Eclipse or Visual Studio 2017.

The power of VS Code undoubtedly comes from its plug-in market. Thanks to the open source community, VS Code now supports almost every programming language, framework, and development technology. There are various ways to provide this support, mainly including providing code snippets, syntax highlighting, Emmet, and smart prompt functions for specific technologies.

Types of VS Code plug-ins

In this article, I mainly introduce the VS Code plug-ins specifically for JavaScript developers. There are many VS Code plug-ins that meet this condition, and of course I won't introduce them all. Instead, I’ll focus on VS Code plugins that have become quite popular and are essential for JavaScript developers. For simplicity, I divided them into 10 categories.

There may be plug-ins that you already know and are using, but there are also probably some that you have heard of but have never used. I also hope that this article can give you a brief introduction. Check out these plugins.

1. Code snippet plug-in

When you first install VS Code, it will come with some JavaScript and TypeScript code snippets. Before you get started with modern JavaScript, you'll need some additional code snippets to help you write ES6/ES7 code quickly:

2. Syntax highlighting plug-in

The latest version of VS Code currently supports coloring of variables and function references. It is now more like the Atom.io editor syntax, so extensions like JavaScript Atom Grammar are no longer needed.

However, we still have some syntax highlighting extensions that can be useful in some projects. Here are a couple:

  • Babel JavaScript: Supports syntax highlighting for ES201X, React, FlowType, and GraphQL.

  • DotENV: Supports .env file syntax highlighting, which will be very useful when you use Node.

3. Code linting plug-in

To write JavaScript code efficiently with minimal trouble, you need a code linting (linter) tool. It forces all members of the team to follow specific coding conventions. ESLint is the most popular and supports many coding styles, including Standard, Google, and Airbnb's JavaScript coding specifications. Here are the most popular VS Code code checking plugins:

  • ESLint: This plugin integrates ESLint into VS Code. It is the most popular code detection plugin with over 6.7 million downloads. Its rules are configured in .eslintrc.json.

  • JSHint: Code detection plug-in based on JSHint. Use the .jshintrc file in the project and directory as its configuration.

  • JavaScript Standard Style: Zero configuration and strict rule code detection, enforced use of StandardJS rules.

  • JSLint: linter extension of JSLint.

If you want to see a review of the advantages and disadvantages of various code detection tools, you can take a look at ourComparison of code detection tools.

4. Node plugin

Every JavaScript project needs at least one Node package, unless you are the kind of person who likes to do things the hard way. Here are some VS Code plugins that can help you work with Node modules more easily.

  • npm: Use package.json to verify the installed npm package to ensure that the version of the installation package is correct. For packages that lack the package.json file or are not installed Packages are highlighted.

  • npm Intellisense: Automatically complete npm modules in import statements.

    10 Must-Have VSCode Extensions for JavaScript Developers

  • Path IntelliSense: It actually has nothing to do with Node, but you definitely need intelligent prompts for local files , this plug-in will automatically complete file names.

  • Node exec: Allows you to use Node to execute the current file or selected code.

  • View Node Package: Use this plug-in to quickly view the source code of the Node package, allowing you to open the code library or document of the Node package directly in VS Code.

  • Node Readme: Quickly open the npm package document.

  • Search node_modules: Usually the node_modules folder is not included in the default search scope, this plugin allows you to search it. Source code: vscode-search-node-modules.

    10 Must-Have VSCode Extensions for JavaScript Developers

  • Import Cost: Displays the size of the imported package. Source code: import-cost.

    10 Must-Have VSCode Extensions for JavaScript Developers

5. Code Formatting Plug-in

Sometimes, you find yourself thinking about the past Format code that has been written in a less than ideal style. To save time, you can install any of the following VS Code plug-ins to quickly format and refactor existing code:

  • Beatufy:a The plugin of jsBeautifier supports JavaScript, JSON, CSS and HTML. Can be customized via .jsbeautifyrc file. It is the most popular formatting tool with 2.3 million downloads currently.

  • Prettier Code Formatter: Take advantage of Prettier’s plug-in that supports JavaScript, TypeScript and CSS and currently has more than 1.5 million downloads.

  • JS Refactor: Provides many practical methods and operations for refactoring JavaScript code, such as extracting variables and methods, and converting existing code to use arrow functions and template strings. Equivalent forms, derived functions, etc.

  • JavaScript Booster: An amazing code refactoring tool. It requires code operations, such as converting var to const or let, removing redundant else statements, and merging declarations and initialization. A lot of its inspiration comes from WebStorm. Source code: vscode-javascript-booster.

    10 Must-Have VSCode Extensions for JavaScript Developers

6. Browser plug-in

Unless you are writing the console in JavaScript program, otherwise you would probably execute your JavaScript code in the browser. This means that you will frequently refresh your browser to see the effect of each code update you make. Here are some tools that can greatly reduce this repetitive process when you develop, instead of manually refreshing the browser every time:

7. Framework plug-ins

For most projects, you will use an appropriate framework to build your code to reduce development time . VS Code supports most mainstream frameworks through plug-ins. However, there are still some specific frameworks that are not fully supported. Below are some VS Code plugins that provide powerful features.

  • Angular 7 Snippets: Snippets for Angular 2, 4, 5, 6, 7 and 8 Beta. Supports Typescript, HTML, Angular Material ngRx, RxJS, PWA and Flex Layout. Contains 237 angle clips so far.

  • Angular v7 snippets: Provides code snippets for TypeScript, RxJS, HTML and Docker files. There are currently over 2.7 million downloads.

  • ES7 React/Redux/GraphQL/React-Native snippets: Use the Babel plugin feature to provide React/Redux snippets in ES7 syntax. Contains code snippets for JavaScript and TypeScript.

  • React Native Tools: Provides code intelligence tips, command line tools and debugging features for the React Native framework.

  • React-Native/React/Redux snippets for es6/es7: Provides ES6/ES7 syntax snippets for React, React Native, Redux and storybook in ES6/ES7 syntax.

  • Vetur: Provides syntax highlighting, code snippets, Emmet, code detection, smart tips and debugging support for the Vue framework. It comes with good documentation posted on GitBook.

  • Ember: Provides command line support and smart prompts for Ember. After installation, all ember cli commands can be used directly in VS Code's own command line list.

  • Cordava Tools: Supports Cordava plug-ins and Ionic framework, providing support for smart prompts, debugging and other features of Cordova-based projects.

  • jQuery Code Snippets: Provides more than 130 jQuery code snippets, activated using the jq prefix.

8. Test plug-in

Testing is a key part of software development, especially for projects in the production stage. You can learn all about testing in JavaScript and read more about the various tests you can run in our guide, JavaScript Testing: Unit vs. Functional vs. Integration Testing. Here are some VS Code plugins for testing:

  • Mocha sidebar

    : Use the Mocha library to provide unit testing for your project. This framework helps you run tests directly in the code and display error messages in the form of decorators.

  • ES Mocha Snippets

    : Provides Mocha code snippets in ES6 syntax. The focus of this plug-in is to use arrow functions to reduce the use of curly braces as much as possible and keep the code compact. Semicolons can be allowed through settings.

  • Jasmine Code Snippets

    : Code snippets for the Jasmine testing framework.

  • Protractor Snippets

    : Code snippets for the Protractor end-to-end testing framework. Supports JavaScript and TypeScript.

  • Node TDD

    : Provides support for test-driven development for Node and JavaScript projects. The build of automated tests can be triggered immediately after the source code is updated. Source code: node-tdd

    10 Must-Have VSCode Extensions for JavaScript Developers

  • ##9. Other great plug-ins

I put the next batch of VS Code plug-ins in the "awesome" category because that description is just right.

    Quokka.js
  • : A very powerful debugging tool that provides a training ground for quickly building prototypes for JavaScript, and comes with

    very good documentation.

  • Paste as JSON
  • : Quickly convert JSON data into JavaScript code. Source code:

    quick-type.

    10 Must-Have VSCode Extensions for JavaScript Developers

  • Code Metrics
  • : This is another great plugin that calculates the complexity of JavaScript and TypeScript code . Source code:

    codemetrics.

    10 Must-Have VSCode Extensions for JavaScript Developers

    10 Must-Have VSCode Extensions for JavaScript Developers

    10 Must-Have VSCode Extensions for JavaScript Developers

##10. Plug-in package

Now that we have come to the last category, I want you to know that the VS Code market has a category of plug-in packages. Essentially, they are a collection of related

VS Code plug-ins, bundled into one package for easy installation. Here are some of the better ones:

Summary

VS Code has a large number of high-quality plug-ins, which makes it popular among the JavaScript developer community. Writing JavaScript code has never been easier.

● Plug-ins like ESLint help you avoid common errors in your code;

●Debugger for Chrome helps you debug code more easily;

●With The smart prompt Node.js plug-in helps you correctly reference modules;

● Available tools like Live Server and REST client allow you to reduce your dependence on external tools when completing your work;

●●Another example is the SpreadJS pure front-end table control, which allows online Excel to be embedded in your application.

All these tools greatly speed up your iteration process.

I hope these lists expose you to new VS Code plugins and help your workflow.

Recommended tutorial:

vscode tutorial

The above is the detailed content of 10 Must-Have VSCode Extensions for JavaScript Developers. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:sitepoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!