Main features and options

An overview of the plugin

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

Table of Contents

This lesson preview is part of the Master Testing Library with ESLint Plugin course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to Master Testing Library with ESLint Plugin, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course Master Testing Library with ESLint Plugin
  • [00:00 - 00:16] As every ESLint plugin, ESLint plugin tested library adds extra rules to the different ones. ESLint will run all enabled rules, both built-in and from plugins, over each one of the indicated files.

    [00:17 - 00:33] This plugin can now fix some problems reported, but for most of them, it won't be smart enough to update the code automatically for you. However, you will get a brief explanation about the problem found, and you can find more information about the reason behind the reported issue in the plugin documentation.

    [00:34 - 00:48] As mentioned in the welcome lesson of the course, ESLint plugin tested library is the perfect companion for DOM, Angular, React, and build tested library. There is no official support yet for other tested library packages, although some of the existing rules can work fine with them.

    [00:49 - 00:59] The rules, including this plugin, are split into three different categories, preventing errors. This is the most important group, since it will catch actual errors from your code, best practices.

    [01:00 - 01:08] There are situations where you can implement something in tested library in several ways. Rules on this group will suggest one of them because they provide more benefit than the others.

    [01:09 - 01:13] Style guidelines. They'll enforce some particular way of doing things just for consistency.

    [01:14 - 01:25] ESLint plugin tested library allows you to enable or disable each rule available in the plugin through the ESLint config file. As you can see in this sample, all the rules are prefected with tested library.

    [01:26 - 01:37] This is an ESLint pattern, so rules from plugins don't overlap the built-in rules or other plugins. This plugin also provides some presets that will enable a bunch of recommended rules for a specific tested library package.

    [01:38 - 01:49] The existing presets are available for React, Angular, View, and DOM packages. You can find which rules are enabled for each preset within the plugin supported rules section.

    [01:50 - 02:08] Last but not least, you can use ESLint Share Settings to configure a few options shared across all the plugin's rules. This is used for setting up the aggressive reporting feature of the plugin, which we will see at the end of the course, since we need first to understand the problems supported by individual rules.