Skip to content

Commit

Permalink
chore: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiand391 committed Jul 23, 2024
1 parent 4ca8a0d commit 063ebe7
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/rules/only-extend-sfCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,10 @@ export const onlyExtendSfCommand = RuleCreator.withoutDocs({
},
defaultOptions: [],
create(context) {
// function extendsSfCommand(node: TSESTree.ClassDeclaration, context: RuleContext<any, any>): boolean {
// // Track imported classes and their aliases
// const importedClasses = new Map();
//
// for (const node of (context.sourceCode).ast.body) {
// if (node.type === 'ImportDeclaration') {
// node.specifiers.forEach(specifier => {
// if (specifier.type === 'ImportSpecifier' && specifier.imported.name === 'SfCommand') {
// importedClasses.set(specifier.local.name, 'SfCommand');
// }
// // Handle import aliases
// else if (specifier.type === 'ImportSpecifier' && specifier.local.name !== specifier.imported.name) {
// importedClasses.set(specifier.local.name, specifier.imported.name);
// }
// })
// }
// }
//
// return node.superClass?.type === AST_NODE_TYPES.Identifier && (importedClasses.get(node.superClass.name) == 'SfCommand');
// }

return isInCommandDirectory(context)
? {
ClassDeclaration(node): void {
// verify it extends SfCommand
// importedClasses.has()
if (!extendsSfCommand(node, context) && node.id) {
context.report({
node: node.id,
Expand Down

0 comments on commit 063ebe7

Please sign in to comment.