sindresorhus/eslint-plugin-unicorn
The issue has been solved
custom-error-definition rule does not validate against exported name #190
MrHen posted onGitHub
The following passes linting:
exports.fooError = class FooError extends Error {
constructor(error) {
super(error);
this.name = 'FooError';
}
};
The name used in exports.fooError
should match the name used in this.name = 'FooError';
.
A commented out test was added as part of #188 to cover this scenario.