mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 05:09:43 +02:00
Move from prettier-eslint to eslint-plugin-prettier, update dependencies
This commit is contained in:
parent
1f43d4f214
commit
45bde7e7c0
254 changed files with 5539 additions and 5170 deletions
|
@ -2,14 +2,14 @@ const GAP = 2 ** 14;
|
|||
const MIN_GAP = 0.125;
|
||||
const MAX_POSITION = 2 ** 50;
|
||||
|
||||
const findBeginnings = (positions) => {
|
||||
const findBeginnings = positions => {
|
||||
positions.unshift(0);
|
||||
|
||||
let prevPosition = positions.pop();
|
||||
const beginnings = [prevPosition];
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
_.forEachRight(positions, (position) => {
|
||||
_.forEachRight(positions, position => {
|
||||
if (prevPosition - MIN_GAP >= position) {
|
||||
return false;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ const findBeginnings = (positions) => {
|
|||
return beginnings;
|
||||
};
|
||||
|
||||
const getRepositionsMap = (positions) => {
|
||||
const getRepositionsMap = positions => {
|
||||
const repositionsMap = {};
|
||||
|
||||
if (positions.length <= 1) {
|
||||
|
@ -62,7 +62,7 @@ const getRepositionsMap = (positions) => {
|
|||
return repositionsMap;
|
||||
};
|
||||
|
||||
const getFullRepositionsMap = (positions) => {
|
||||
const getFullRepositionsMap = positions => {
|
||||
const repositionsMap = {};
|
||||
|
||||
_.forEach(positions, (position, index) => {
|
||||
|
@ -96,8 +96,9 @@ module.exports = {
|
|||
|
||||
const beginnings = findBeginnings([...lowers, inputs.position]);
|
||||
|
||||
const repositionsMap = getRepositionsMap([...beginnings, ...uppers])
|
||||
|| getFullRepositionsMap([...lowers, inputs.position, ...uppers]);
|
||||
const repositionsMap =
|
||||
getRepositionsMap([...beginnings, ...uppers]) ||
|
||||
getFullRepositionsMap([...lowers, inputs.position, ...uppers]);
|
||||
|
||||
const position = repositionsMap[inputs.position]
|
||||
? repositionsMap[inputs.position].pop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue