Using ESLint to restrict where files can be imported from
Published on in ESLint and JavaScript
There's an ESLint rule to prevent importing certain files in certain folders. I needed this in a multi-site project to prevent importing site-specific components in other sites' folders.