- To work along with me on the files for this course you need three applications. ESLint, a web browser and a code editor. ESLint is a command line utility that you install using the node package manager or npm. Npm is part of the node JS run time. If you don't have node installed, start by visiting nodejs.org and installing the LTS version. With that installed open your terminal application and navigate to the exercise files folder that contains the files for this course. And we're going to start by initializing this directory for our use with npm. So we're going to type npm space init and press enter. It's going to ask you a series of questions and you're just going to press enter for all of them. For right now we're not concerned about the configuration here at all. So we're just accepting the default answers for all these. And when we get a new command prompt then we're all good. So now we have this directory initialized for npm and now we can install ESLint. SO, that next command is going to be npm space install space ESLint. And this will install the files that will enable you to use ESLint to the command line. We've got a warning here, and that's not a problem it's just telling us that if we're really serious about this later on we can go configure a file with some more information but for our uses for this course, this is just fine as is. You undoubtedly already have a web browser installed in your machine and any major modern browser, Chrome, Firefox or Microsoft edge is fine for this course. I'll be using Firefox for these videos which includes a powerful sweet of developer tools. A number of great code editors are available both free and paid apps. Any editor that lets you edit and save plain text is fine for this course. So if you have a code editor you like such as sublime text or Adam, it's fine to use that. I use visual studio code in these videos. Which is a version of Microsoft's visual studio code created specifically for web development. Visual studio code is free and has Windows, Mac and Linux releases. The code is available on GitHub and users can submit issues there as well. I've turned on word wrap on my editor. If you want to do the same, just click view and then toggle word wrap. This ensures that long lines of code don't run off the screen. I've also installed a couple extensions. The ESLint extension by Dirk Baeumer enables visual studio code to highlight code that violates rules specified in a projects ESLint configuration file. Live Server by Ritwick Dey is an http server you can launch with a single click that automatically opens the current html document in your default browser. This makes testing code in the browser quick and easy to do. If you want to learn more about anything I just used or talk about in this course, I encourage you to explore the library for a deeper dive on that topic. Now, let's get started.
- Using modern deployment tools
- Working with ESLint
- Creating easy-to-read comments
- Using commas consistently
- Standardizing line length in your code
- Using a consistent format for blocks
- Choosing and implementing a standard indent