packages/extension/src/js/components/AutocompleteSearch/index.tsx
Showing 1 of 4 total issues
Function AutocompleteSearch
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AutocompleteSearch = observer((props: Props) => { const { autoFocus, open } = props const searchInputRef = useSearchInputRef() const options = useOptions() const { userStore, searchStore } = useStore()
Function getFilterOptions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
const getFilterOptions = (showUrl, isCommand) => { if (isCommand) { return commandFilter } return (options, { inputValue }) => {
Function sortRankedValues
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Wontfix
Wontfix
function sortRankedValues(a, b, baseSort): number { const aFirst = -1 const bFirst = 1 const { rank: aRank, keyIndex: aKeyIndex } = a const { rank: bRank, keyIndex: bKeyIndex } = b
- Read upRead up
Function getFilterOptions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Wontfix
Wontfix
const getFilterOptions = (showUrl, isCommand) => { if (isCommand) { return commandFilter } return (options, { inputValue }) => {
- Read upRead up