diff --git a/libs/remix-ui/search/src/lib/components/results/Results.tsx b/libs/remix-ui/search/src/lib/components/results/Results.tsx index 32efca1484..810b2351fd 100644 --- a/libs/remix-ui/search/src/lib/components/results/Results.tsx +++ b/libs/remix-ui/search/src/lib/components/results/Results.tsx @@ -1,10 +1,8 @@ import React, { useContext, useEffect, useState } from 'react' import { SearchContext } from '../../context/context' import { ResultItem } from './ResultItem' -interface ResultsProps { -} -export const Results = (props: ResultsProps) => { +export const Results = () => { const { state} = useContext(SearchContext) const [alertText, setAlertText] = useState('') diff --git a/libs/remix-ui/search/src/lib/components/results/SearchHelper.ts b/libs/remix-ui/search/src/lib/components/results/SearchHelper.ts index 8cd3c0fe36..88ae6b1de1 100644 --- a/libs/remix-ui/search/src/lib/components/results/SearchHelper.ts +++ b/libs/remix-ui/search/src/lib/components/results/SearchHelper.ts @@ -54,7 +54,7 @@ export const findLinesInStringWithMatch = (str: string, re: RegExp) => { const matchesInString = (str: string, re: RegExp) => { let a: RegExpExecArray - let results:RegExpExecArray[] = []; + const results:RegExpExecArray[] = []; while ((a = re.exec(str || '')) !== null) { results.push(a); } diff --git a/libs/remix-ui/search/src/lib/context/context.tsx b/libs/remix-ui/search/src/lib/context/context.tsx index 2b03c54df0..c3f387857c 100644 --- a/libs/remix-ui/search/src/lib/context/context.tsx +++ b/libs/remix-ui/search/src/lib/context/context.tsx @@ -5,7 +5,7 @@ import { SearchReducer, } from '../reducers/Reducer' import { SearchState, SearchResult, SearchResultLine, SearchResultLineLine, SearchingInitialState } from '../types' -const filePathFilter = require('@jsdevtools/file-path-filter') +import { filePathFilter } from '@jsdevtools/file-path-filter' export interface SearchingStateInterface { state: SearchState @@ -125,7 +125,7 @@ export const SearchProvider = ({ replaceText: async(result: SearchResult, line: SearchResultLineLine) => { await plugin.call('editor', 'discardHighlight') await plugin.call('editor', 'highlight', line.position, result.path) - let content = await plugin.call('fileManager', 'readFile', result.path) + const content = await plugin.call('fileManager', 'readFile', result.path) await plugin.call('fileManager','setFile', result.path, replaceTextInLine(content, line, state.replace)) } }