File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,6 @@ import JSXElementMock from './JSXElementMock';
1010import type { JSXAttributeMockType } from './JSXAttributeMock' ;
1111import type { JSXElementMockType } from './JSXElementMock' ;
1212
13- const { fromEntries } = Object ;
14-
1513const domElements = dom . keys ( ) ;
1614const roleNames = roles . keys ( ) ;
1715
@@ -122,7 +120,7 @@ const nonInteractiveElementsMap: {[string]: Array<{[string]: string}>} = {
122120 ul : [ ] ,
123121} ;
124122
125- const indeterminantInteractiveElementsMap : { [ key : string ] : Array < any > } = fromEntries ( domElements . map ( ( name ) => [ name , [ ] ] ) ) ;
123+ const indeterminantInteractiveElementsMap : { [ key : string ] : Array < any > } = Object . fromEntries ( domElements . map ( ( name ) => [ name , [ ] ] ) ) ;
126124
127125Object . keys ( interactiveElementsMap )
128126 . concat ( Object . keys ( nonInteractiveElementsMap ) )
Original file line number Diff line number Diff line change 22 * @flow
33 */
44
5- const { fromEntries, entries } = Object ;
6-
75type ESLintTestRunnerTestCase = {
86 code : string ,
97 errors : ?Array < { message : string , type : string } > ,
@@ -23,7 +21,7 @@ export default function ruleOptionsMapperFactory(ruleOptions: Array<mixed> = [])
2321 code,
2422 errors,
2523 // Flatten the array of objects in an array of one object.
26- options : [ fromEntries ( ( options || [ ] ) . concat ( ruleOptions ) . flatMap ( ( item ) => entries ( ( item : any ) ) ) ) ] ,
24+ options : [ Object . fromEntries ( ( options || [ ] ) . concat ( ruleOptions ) . flatMap ( ( item ) => Object . entries ( ( item : any ) ) ) ) ] ,
2725 parserOptions,
2826 settings,
2927 } ;
Original file line number Diff line number Diff line change 11import editDistance from 'damerau-levenshtein' ;
22
3- const { fromEntries } = Object ;
4-
53// Minimum edit distance to be considered a good suggestion.
64const THRESHOLD = 2 ;
75
@@ -10,7 +8,7 @@ const THRESHOLD = 2;
108 * to return.
119 */
1210export default function getSuggestion ( word , dictionary = [ ] , limit = 2 ) {
13- const distances = fromEntries (
11+ const distances = Object . fromEntries (
1412 dictionary . map ( ( dictionaryWord ) => {
1513 const distance = editDistance ( word . toUpperCase ( ) , dictionaryWord . toUpperCase ( ) ) ;
1614 const { steps } = distance ;
You can’t perform that action at this time.
0 commit comments