Rules
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
class CustomError extends Error {
constructor(message, options) {
super(message, options);
// The `this.message` assignment is useless as it's already set via the `super()` call.
this.message = message;
this.name = 'CustomError';
}
}class UserNotFoundError extends GraphQLError {
constructor(userId) {
super(`User "${userId}" does not exist`, {extensions: {code: 'NOT_FOUND'}});
this.name = 'UserNotFoundError';
}
}Popular · 1 of 50
class CustomError extends Error {
constructor(message, options) {
super(message, options);
// The `this.message` assignment is useless as it's already set via the `super()` call.
this.message = message;
this.name = 'CustomError';
}
}class UserNotFoundError extends GraphQLError {
constructor(userId) {
super(`User "${userId}" does not exist`, {extensions: {code: 'NOT_FOUND'}});
this.name = 'UserNotFoundError';
}
}