mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-29 22:13:57 +08:00
Add two eslint plugins (#24776)
Add these two plugins and autofix issues: - [eslint-plugin-no-use-extend-native](https://github.com/dustinspecker/eslint-plugin-no-use-extend-native) - [eslint-plugin-array-func](https://github.com/freaktechnik/eslint-plugin-array-func)
This commit is contained in:
@ -3,7 +3,7 @@ import emojis from '../../../assets/emoji.json';
|
||||
const maxMatches = 6;
|
||||
|
||||
function sortAndReduce(map) {
|
||||
const sortedMap = new Map([...map.entries()].sort((a, b) => a[1] - b[1]));
|
||||
const sortedMap = new Map(Array.from(map.entries()).sort((a, b) => a[1] - b[1]));
|
||||
return Array.from(sortedMap.keys()).slice(0, maxMatches);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user