When working with ESLint, you might encounter an error message that reads: [boundaries]: Please provide element types using the 'boundaries/elements' setting. This issue typically arises after integrating the plugin:boundaries/recommended configuration, which is used to enforce architectural boundaries in your codebase. While this plugin is powerful for maintaining a clean architecture, it can be tricky to set up without the correct configuration. In this post, we’ll dive into why this error occurs and walk you through the steps to resolve it. Additional note: this error is related to the eslint-plugin-boundaries package.
Thank me by sharing on Twitter 🙏
Boundaries Error Description:
The exact error message you may encounter is:
[boundaries]: Please provide element types using the 'boundaries/elements' settingThis message appears when you’ve added the plugin:boundaries/recommended configuration, but haven’t fully specified the element types required by the plugin. ESLint uses these element types to determine and enforce which parts of your project can interact, based on your architectural decisions.
Cause of the Error
The root cause of this error is that the settings.boundaries/elements configuration is missing or incomplete in your ESLint setup. This setting is crucial because it defines the different architectural layers or modules in your project (e.g., components, services, modules), allowing the boundaries plugin to enforce rules based on those layers.
Solution
To resolve this error, you need to add the necessary settings.boundaries/elements configuration to your .eslintrc file. Here’s a step-by-step guide:
The Technological Republic: Hard Power, Soft Belief, and the Future of the West
$15.01 (as of November 19, 2025 18:29 GMT +00:00 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)SanDisk 128GB Extreme PRO SDXC UHS-I Memory Card - C10, U3, V30, 4K UHD, SD Card - SDSDXXD-128G-GN4IN
$24.95 (as of November 20, 2025 01:32 GMT +00:00 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Logitech H390 Wired Headphones with Mic, USB-A Headset with Microphone for PC, Noise Cancelling Microphone for Video Meetings, Music, Gaming - Black
$24.99 (as of November 20, 2025 01:32 GMT +00:00 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)- Open your ESLint configuration file (usually
.eslintrc,.eslintrc.json, or.eslintrc.js). - Add the following settings under
settings.boundaries/elements:
"settings": {
"boundaries/elements": [
{ "type": "components", "pattern": "src/components/*" },
{ "type": "services", "pattern": "src/services/*" },
{ "type": "modules", "pattern": "src/modules/*" }
]
}This example defines three element types: components, services, and modules. Adjust the pattern field according to the folder structure in your project.
3. Ensure that your ESLint rules align with these element types. For example:
"rules": {
"boundaries/element-types": [
"error", {
"default": "disallow",
"rules": [
{ "from": ["components"], "allow": ["services"] }
]
}
]
}This configuration specifies which types can interact, based on your architectural boundaries.
4. Save the changes and run ESLint again.
Verification
Once you’ve updated your .eslintrc configuration, run ESLint in your project. The error [boundaries]: Please provide element types using the 'boundaries/elements' setting should no longer appear. This indicates that ESLint can now correctly identify the architectural layers and enforce the rules as expected.
Conclusion
Setting up architectural boundaries in a project can significantly enhance code quality and maintainability, but it requires a proper configuration. By defining the necessary element types, you can fully leverage the power of the plugin:boundaries/recommended configuration without running into errors. The next time you encounter this issue, remember that it’s simply a matter of adding the correct settings.
Tags/Keywords
- ESLint
- module boundaries
- architecture
- JavaScript
- TypeScript
- error handling

![How to fix [Feed Page] Excluded by ‘noindex’ tag Error In Search Console for WordPress Feed Pages green and orange bug](https://www.timsanteford.com/wp-content/uploads/2024/09/idkn0kjhyts.jpg)
![How to Fix Cannot Convert Type Object[] to System.Collections.Generic.List<object> in C#</object> red heart shaped plastic toy](https://www.timsanteford.com/wp-content/uploads/2024/09/aynyc6fih84.jpg)