eslint rule to required imported objects to have the same name as file?

Viewed 603

I seem to remember there was a rule for this but I can't find it. Basically something to require that imported objects have the same name as the package.

For example, this would be considered incorrect:

import MyButton from './ui/Button.js'; // NOT OK

because the package is called "Button", not "MyButton".

This would be fine:

import Button from './ui/Button.js'; // OK

Maybe even this:

import UserList from './ui/user-list.js'; // OK

Any idea if a rule can be used for this?

2 Answers
Related