1 00:00:00,780 --> 00:00:05,690 In this section we're going to go through the installation of E-wrestling lint on top of vs code. 2 00:00:05,760 --> 00:00:09,170 So if you're using Visual Studio code you're in the right place. 3 00:00:09,210 --> 00:00:14,640 Let's go through the installation I'm inside of my project directory and I've currently got to open 4 00:00:14,640 --> 00:00:17,610 the index dot Iowa dot J.S. file. 5 00:00:17,610 --> 00:00:20,050 Now we've only got this file open just to verify that. 6 00:00:20,070 --> 00:00:21,050 Yes that works. 7 00:00:21,060 --> 00:00:22,690 After we actually install it. 8 00:00:22,920 --> 00:00:24,330 So let's go through the installation. 9 00:00:24,570 --> 00:00:29,610 The first thing we're going to do is flip over to our terminal and I'm inside the project directory 10 00:00:29,610 --> 00:00:30,330 right now. 11 00:00:30,420 --> 00:00:33,040 And I'm going to install Yes lint globally. 12 00:00:33,180 --> 00:00:38,320 So I'll run NPM install d'Asti Yes lint. 13 00:00:38,490 --> 00:00:40,090 This is going to take a minute to install. 14 00:00:40,110 --> 00:00:45,570 So while this is going to flip back over to Visual Studio code and do a little bit more setup over here 15 00:00:47,280 --> 00:00:53,350 on the left hand side I'm going to find my packages button and I'm going to install an extension called 16 00:00:53,660 --> 00:00:54,590 Yes lint. 17 00:00:54,650 --> 00:00:56,590 So do a search for E.S. lint. 18 00:00:56,640 --> 00:00:59,700 I see it as the first and only results in here. 19 00:00:59,820 --> 00:01:05,800 And we can just click install after I install it I will enable the extension. 20 00:01:05,880 --> 00:01:07,880 I'm going to be prompted to restart my editor. 21 00:01:07,920 --> 00:01:09,840 No problem let's do it. 22 00:01:13,330 --> 00:01:14,440 And we're back. 23 00:01:14,470 --> 00:01:16,320 So here we go. 24 00:01:16,450 --> 00:01:18,760 I'm going to flip back over really quick to my terminal. 25 00:01:18,760 --> 00:01:22,340 It looks like that global installation of yes land is complete. 26 00:01:22,480 --> 00:01:27,020 This global installation of Ascelin is used to do the actual parsing of the code that we write. 27 00:01:27,040 --> 00:01:29,020 So that is why we installed that. 28 00:01:29,020 --> 00:01:33,760 The second package that we needed to install really quickly is the actual ruleset that we're going to 29 00:01:33,760 --> 00:01:37,140 use to validate the javascript that we actually write. 30 00:01:37,180 --> 00:01:38,530 So remember by default. 31 00:01:38,650 --> 00:01:40,520 Yes lint does nothing for us. 32 00:01:40,600 --> 00:01:43,150 We have to give it a default rule set. 33 00:01:43,600 --> 00:01:50,080 So I'm going to install a bundle of rules that's already been written for us using NPM all execute NPM 34 00:01:50,110 --> 00:01:59,790 install dash dash save Dev Yes limt config Rallye coding. 35 00:01:59,840 --> 00:02:00,300 So I've got. 36 00:02:00,320 --> 00:02:06,160 Yes Slint dash config dash rally coding and we'll let the install itself. 37 00:02:06,170 --> 00:02:08,070 This is also going to take a moment to install. 38 00:02:08,090 --> 00:02:11,530 So while it's doing that we'll do one last piece of startup. 39 00:02:11,660 --> 00:02:14,870 I'm going to flip back over to Visual Studio code really quick. 40 00:02:14,990 --> 00:02:21,890 Am going to make a new file inside of my project directory so I'm going to make a new file called Dot 41 00:02:22,370 --> 00:02:23,960 Slint RC. 42 00:02:24,340 --> 00:02:25,200 So Dot. 43 00:02:25,270 --> 00:02:33,620 Yes r RC and inside of your we are going to tell us land that we want to use that rule set that we just 44 00:02:33,620 --> 00:02:35,180 installed with NPM. 45 00:02:35,360 --> 00:02:38,420 So I will add in a new object. 46 00:02:38,970 --> 00:02:39,600 Oh boy. 47 00:02:39,830 --> 00:02:40,490 Well that's legible. 48 00:02:40,490 --> 00:02:41,470 There you go. 49 00:02:41,540 --> 00:02:46,580 And then inside this object and put a set of double quotes make sure you're using double quotes you 50 00:02:46,580 --> 00:02:52,770 can not use single quotes to use double extends Rallye coding. 51 00:02:53,210 --> 00:03:00,340 So both extends and key and rarely coding are wrapped with double quotes like so now I'll just save 52 00:03:00,340 --> 00:03:01,520 this. 53 00:03:02,480 --> 00:03:05,150 Let's see how our installation is going up. 54 00:03:05,190 --> 00:03:07,400 Looks like the installation is all done. 55 00:03:07,490 --> 00:03:12,690 So the last thing I'm going to do is test this out inside of that index. 56 00:03:12,900 --> 00:03:14,140 SJS file. 57 00:03:14,400 --> 00:03:18,100 Let's try by just taking on a semi-colon or two. 58 00:03:18,210 --> 00:03:24,550 Andy me I get an error message popping up and I can put the semi-colon back on and we're back in business. 59 00:03:24,560 --> 00:03:29,330 Or I can delete the entire first line and now I get a whole bunch of big errors popping up on the screen 60 00:03:29,390 --> 00:03:34,430 so it definitely looks like we've successfully got Yeslam working inside of the code. 61 00:03:34,430 --> 00:03:36,570 Let's continue in the next section.