forked from forgejo/forgejo
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:
parent
71451ab844
commit
4aacc3ac78
6 changed files with 127 additions and 3 deletions
|
@ -36,7 +36,7 @@ export function initCopyContent() {
|
|||
}
|
||||
} else { // text, read from DOM
|
||||
const lineEls = document.querySelectorAll('.file-view .lines-code');
|
||||
content = Array.from(lineEls).map((el) => el.textContent).join('');
|
||||
content = Array.from(lineEls, (el) => el.textContent).join('');
|
||||
}
|
||||
|
||||
// try copy original first, if that fails and it's an image, convert it to png
|
||||
|
|
|
@ -15,7 +15,7 @@ function moveIssue({item, from, to, oldIndex}) {
|
|||
updateIssueCount(to);
|
||||
|
||||
const columnSorting = {
|
||||
issues: [...columnCards].map((card, i) => ({
|
||||
issues: Array.from(columnCards, (card, i) => ({
|
||||
issueID: parseInt($(card).attr('data-issue')),
|
||||
sorting: i
|
||||
}))
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue