website refactor
This commit is contained in:
@@ -75,10 +75,18 @@ module.exports = {
|
||||
ClassDeclaration(node) {
|
||||
const className = node.id?.name;
|
||||
if (className && className.endsWith('PageQuery')) {
|
||||
if (!node.implements ||
|
||||
!node.implements.some(impl =>
|
||||
impl.expression.type === 'GenericIdentifier' &&
|
||||
impl.expression.name === 'PageQuery')) {
|
||||
const hasPageQueryImpl = node.implements && node.implements.some(impl => {
|
||||
// Handle different AST node types for generic interfaces
|
||||
if (impl.expression.type === 'TSExpressionWithTypeArguments') {
|
||||
return impl.expression.expression.name === 'PageQuery';
|
||||
}
|
||||
if (impl.expression.type === 'Identifier') {
|
||||
return impl.expression.name === 'PageQuery';
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
if (!hasPageQueryImpl) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: 'message',
|
||||
|
||||
Reference in New Issue
Block a user