Installation
Install eslint-plugin-boundaries as a dev dependency:
npm install --save-dev eslint eslint-plugin-boundaries
note
eslint-plugin-boundaries does not install eslint automatically. You must install it yourself.
Once installed, enable the plugin and apply one of the predefined configs in your eslint.config.js file. The recommended config enables the boundary rules and is safe for existing projects:
- JavaScript
- TypeScript
import boundaries from "eslint-plugin-boundaries";
export default [
{
plugins: {
boundaries,
},
...boundaries.configs.recommended,
},
];
import boundaries, { Config } from "eslint-plugin-boundaries";
export default [
{
plugins: {
boundaries,
},
...boundaries.configs.recommended,
} satisfies Config,
];
ESLint Version Compatibility
Starting from version 5.0.0, this plugin is compatible with ESLint v9 and above.
While it may still work with earlier versions of ESLint, refer to the
documentation for version 4.2.2 if you need to configure it using the legacy format.
Next Steps
- Follow the Quick Start to classify your files and configure your first rule.
- Learn how to configure elements in depth in Elements.