Fix the “can’t find custom rule directory: tslint-microsoft-contrib” error in SPFx projects

Tuesday, July 13, 2021 10:00 AM

Recently, when I was rebuilding all the projects in my Mastering the SharePoint Framework course to the latest version of the SharePoint Framework (SPFx) v1.12.1, I kept running into a random error. It didn’t happen all the time which made it not just annoying, but a pain trying to figure out the root cause.

It appears it’s just a random oddity that happens on occasion without a good explanation as to why. But the good news is that it’s easily fixed.

In this post, I’ll explain the problem as well as how to fix it.