Skip to content

Commit

Permalink
[#78] ⚰️ remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
yongholeeme committed Feb 14, 2025
1 parent d6b1248 commit af36927
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions packages/eslint-plugin/lib/utils/astParser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {getReactComponentDeclaration, getImportDeclarations} from '@naverpay/ast-parser'
import {getReactComponentDeclaration} from '@naverpay/ast-parser'

export const ReactComponentDeclarationType = {
VariableDeclaration: 'VariableDeclaration',
Expand Down Expand Up @@ -113,27 +113,6 @@ export function hasSpecificReturnStatement(functionDeclaration, returnType) {
)
}

/**
*
* @param {import('eslint').Rule.RuleContext} context
*/
export const getCommentsBeforeImportDeclaration = (context, {name, from}) => {
const globalScope = context.getScope()
const importDeclarations = getImportDeclarations(globalScope.block)
const styleImportDeclaration = findSpecificImportDeclaration(importDeclarations, {
name,
from,
})

const sourceCode = context.getSourceCode()

if (styleImportDeclaration) {
return sourceCode.getCommentsBefore(styleImportDeclaration)
} else {
sourceCode.getAllComments()
}
}

/**
*
* @param {import('eslint').Rule.RuleContext} context
Expand Down

0 comments on commit af36927

Please sign in to comment.