How to set up reusable ESLint configs for SharePoint Framework (SPFx) projects
Channel: Andrew Connell
Date: 2022-07-26

In a recent video, I talked about some of the challenges developers ran into with ESLint rules that Microsoft introduced in the SharePoint Framework v1.15 release. That video covered some common rules you’re likely to run into and how to address the warning messages.

I also showed how you can selectively disable rules within files, blocks of code, on individual lines, or how you can make global changes to a project in the ESLint configuration file.

But, you have to make these changes in every single project. What if you want to have a single set of ESLint rules for your own coding style that is applied to every SPFx project?

Or better yet, what if you need to follow your company’s coding style guide? Or what if you’re a consultant with multiple clients, each having their own coding style guides?

Making these changes to each SPFx project is a pain and error-prone. Wouldn’t it be cool if there was a better way?

There is… and in this video, I’ll show you how!


This video is also available as a blog post and our podcast as episode 25 via the following links:
📜  https://www.voitanos.io/blog/sharepoint-framework-spfx-reusable-eslint-configurations
🎙  https://www.voitanos.io/podcast


📚 Additional Resources:
----------------------------------------
🔗  SharePoint Framework v1.15 - The Attack of ESLint!: https://youtu.be/0XXm-zH8wes
🔗  [RFC] Consider dialing back ESLint rules (ESLint & SPFx rule feedback): https://github.com/SharePoint/sp-dev-docs/discussions/8290


🎧  Chapters
-------------------------------------------
00:00 : Introduction
05:30 : Change default project .eslintrc.js configuration
09:35 : Add your ESLint config override


🔖  My on-demand & free email courses
-------------------------------------------
📺  Mastering the SharePoint Framework
  https://www.voitanos.io/course-master-sharepoint-framework
📺  Microsoft 365 Certified Developer Associate MS-600 Exam Prep
  https://www.voitanos.io/course-prepare-m365-certified-developer-associate-exam-ms-600
✉️  Explore & evaluate the SharePoint Framework
  https://www.voitanos.io/ecourse-explore-evaluate-spfx/
✉️  Understand the SharePoint Framework toolchain
  https://www.voitanos.io/ecourse-understand-spfx-dev-toolchain/


🔗  Links
-------------------------------------------
🌎  https://www.voitanos.io
🎙  Podcast: https://www.voitanos.io/podcast
https://twitter.com/andrewconnell
https://www.facebook.com/voitanos
https://www.linkedin.com/in/andrewconnell
https://www.instagram.com/voitanos_llc

#SharePoint #sharepointframework #spfx