I've been searching the web and StackOverflow for this for quite some time with no success.
What I'm trying to do have ESLint mark the following as errors:
export default ...;
with default
being the key here. So far the best I've got is a reference to eslint-plugin-import
plugin and some of its rules that can make me closer to the target, namely the no-anonymous-default-export rule. But even with this rule the following default exports would be valid:
const foo = 123
export default foo
export default class MyClass() {}
export default function foo() {}
How can I configure ESLint in such a way that these four would also be considered errors?
import { Foo } from 'foo';
kinda thing versusimport Bar from 'bar';
for the reasons of our team preference, and having a linting rule to check for such things would have been great