From the course: Node.js: Testing and Code Quality
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Linting your codebase
From the course: Node.js: Testing and Code Quality
Linting your codebase
- [Instructor] The ability to Lint the entire code base is built into ESLint. The trick is making it useful. Switch back to VS code. From the terminal we're going to use NPX to run ESLint but this time we're going to specify dot, which is the current directory, press Enter. Well, there's over 1000 errors but a lot of these aren't actually in our custom code and our false positives. If I scroll up, contrib is third-party code. This is a very real-world situation. A single codebase can include many different types of functionality. Of course the Node.js application itself is included. There's also tests, which may use a different environmental configuration. The front end may use different coding standards such as supporting legacy browsers. Finally, similar to testing third-party code should be excluded because you're not maintaining it. To address this type of situation, ESLint configuration files support a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Standardizing with EditorConfig8m 23s
-
(Locked)
Adding EditorConfig to a project and IDE4m 3s
-
(Locked)
Comparing JavaScript linters4m 56s
-
(Locked)
Installing ESLint3m 47s
-
(Locked)
Configuring ESLint6m 23s
-
(Locked)
Extending an ESLint shareable config5m 5s
-
(Locked)
Linting your codebase6m 14s
-
(Locked)
Fixing code in VSC with ESLint7m 3s
-
(Locked)
Challenge: Create a shareable ESLint config51s
-
(Locked)
Solution: Create a shareable ESLint config5m 25s
-
(Locked)
-
-
-
-