- Overview
- Transcript
4.7 Sublime Linter
A proper linter is the first tester in your arsenal. Let's get one setup for Sublime in this video.
1.Introduction1 lesson, 02:05
1.1Welcome02:05
2.Getting Started9 lessons, 35:20
2.1Installation and Base Settings04:54
2.2Services and Opening Sublime From the Terminal02:20
2.3Multiple Cursors and Incremental Search06:54
2.4The Command Palette04:13
2.5Instant File Changing03:19
2.6Symbols04:17
2.7Key Bindings02:33
2.8Installing Plugins Without Package Control02:54
2.9Package Control03:56
3.Snippets3 lessons, 14:40
3.1Your First Snippet09:04
3.2Adding Snippets Through Package Control02:32
3.3Easier Testing With Snippets03:04
4.Essential Plugins12 lessons, 46:58
4.1Zen Coding07:09
4.2Emmet06:52
4.3Cross-Browser CSS With Prefixr02:17
4.4Fetch Files With Ease 04:22
4.5Lightning Fast Folder and File Creation 02:12
4.6Sidebar Enhancements03:09
4.7Sublime Linter02:01
4.8Sexy Code Snippet Management With Gists07:50
4.9DocBlockr03:49
4.10Pretty Task Management02:42
4.11HTTP Requests Within Sublime02:29
4.12LiveReload02:06
5.Tips, Techniques and Modifications8 lessons, 49:09
5.1Regular Expressions in Sublime05:49
5.2Vintage Mode10:46
5.3Quicker Stylesheet References02:30
5.4Joining Lines04:40
5.5Sublime and Markdown with Marked03:10
5.6All About Projects 05:54
5.7Configuring and Mastering Split Windows07:19
5.8Custom Builds09:01
6.Closing1 lesson, 00:49
6.1Conclusion00:49
4.7 Sublime Linter
Within our sample directory, I have created a new script.js file. And what would be nice is, if I create this syntax error, right now, by default in Sublime, it's not gonna let me know. So if I say var name equals jeff, var age equals 27. Notice I have forgotten the semicolons, but I don't get any feedback. So, we're going to install the Sublime Lint plugin that will let me know when I screw up like that. Shift+Cmd+P, install. And I'm gonna look for Lint. There we go. SublimeLinter's the one we want. So we run that. That's now been installed. And you can see it has built in support for copy script, Java, JavaScript, PHP, lots of stuff. So, let's try it out. Now, I'm going to save the file, and notice that this time it is active, and it's letting you know, hey, you made some mistakes here. So, we add the semicolon. That fixes that line. Here's var age. There's another line. So you can imagine how helpful this. Let's do a function. But we're gonna forget the closing curly brace, and we'll paste these two lines in like so. Now, we continue on, console.log name, and notice that it becomes active when I hit Save. And Cmd+S, and now it's letting you know there's an error. If I click on the line, and I look at the bottom of the screen, you'll see, hey, there's an Unmatched opening curly brace. So, we close it, hit Save again. And now, it's still happening. So, we click on it again, and it's saying hey, you forgot the function name. So, function person, and now it's working. And then, of course, if this was an instance of person, I would hit Cmd+D to select the vars, and change that to this.name and this.age. And new Person, but I digress. So, this will, of course, work for your JavaScript. It's gonna work for your PHP. It'll work for a lot of things. And if you want to disable Lint at some point, you can do that from the command pallet. So if I look for Lint, you can see that there is the option to Disable Linting, if you don't want it for a particular project.