Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
f5cbb44d
Commit
f5cbb44d
authored
Jun 21, 2018
by
gfyoung
Committed by
Clement Ho
Jun 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow-up to !19808: Split up for-loop initializations
parent
94ac31e2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
18 deletions
+17
-18
app/assets/javascripts/line_highlighter.js
app/assets/javascripts/line_highlighter.js
+4
-4
app/assets/javascripts/network/branch_graph.js
app/assets/javascripts/network/branch_graph.js
+2
-4
app/assets/javascripts/profile/gl_crop.js
app/assets/javascripts/profile/gl_crop.js
+3
-4
app/assets/javascripts/project_find_file.js
app/assets/javascripts/project_find_file.js
+1
-2
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+2
-4
changelogs/unreleased/no-multi-assign-follow-up.yml
changelogs/unreleased/no-multi-assign-follow-up.yml
+5
-0
No files found.
app/assets/javascripts/line_highlighter.js
View file @
f5cbb44d
...
...
@@ -142,14 +142,14 @@ LineHighlighter.prototype.highlightLine = function(lineNumber) {
//
// range - Array containing the starting and ending line numbers
LineHighlighter
.
prototype
.
highlightRange
=
function
(
range
)
{
var
i
,
lineNumber
,
ref
,
ref1
,
results
;
if
(
range
[
1
])
{
results
=
[];
const
results
=
[];
const
ref
=
range
[
0
]
<=
range
[
1
]
?
range
:
range
.
reverse
();
// eslint-disable-next-line no-multi-assign
for
(
lineNumber
=
i
=
ref
=
range
[
0
],
ref1
=
range
[
1
];
ref
<=
ref1
?
i
<=
ref1
:
i
>=
ref1
;
lineNumber
=
ref
<=
ref1
?
(
i
+=
1
)
:
(
i
-=
1
))
{
for
(
let
lineNumber
=
range
[
0
];
lineNumber
<=
ref
[
1
];
lineNumber
+=
1
)
{
results
.
push
(
this
.
highlightLine
(
lineNumber
));
}
return
results
;
}
else
{
return
this
.
highlightLine
(
range
[
0
]);
...
...
app/assets/javascripts/network/branch_graph.js
View file @
f5cbb44d
...
...
@@ -113,8 +113,7 @@ export default (function() {
});
ref
=
this
.
days
;
// eslint-disable-next-line no-multi-assign
for
(
mm
=
j
=
0
,
len
=
ref
.
length
;
j
<
len
;
mm
=
(
j
+=
1
))
{
for
(
mm
=
0
,
len
=
ref
.
length
;
mm
<
len
;
mm
+=
1
)
{
day
=
ref
[
mm
];
if
(
cuday
!==
day
[
0
]
||
cumonth
!==
day
[
1
])
{
// Dates
...
...
@@ -288,8 +287,7 @@ export default (function() {
ref
=
commit
.
parents
;
results
=
[];
// eslint-disable-next-line no-multi-assign
for
(
i
=
j
=
0
,
len
=
ref
.
length
;
j
<
len
;
i
=
(
j
+=
1
))
{
for
(
i
=
0
,
len
=
ref
.
length
;
i
<
len
;
i
+=
1
)
{
parent
=
ref
[
i
];
parentCommit
=
this
.
preparedCommits
[
parent
[
0
]];
parentY
=
this
.
offsetY
+
this
.
unitTime
*
parentCommit
.
time
;
...
...
app/assets/javascripts/profile/gl_crop.js
View file @
f5cbb44d
...
...
@@ -140,10 +140,9 @@ import _ from 'underscore';
binary
=
atob
(
dataURL
.
split
(
'
,
'
)[
1
]);
array
=
[];
// eslint-disable-next-line no-multi-assign
for
(
k
=
i
=
0
,
len
=
binary
.
length
;
i
<
len
;
k
=
(
i
+=
1
))
{
v
=
binary
[
k
];
array
.
push
(
binary
.
charCodeAt
(
k
));
for
(
i
=
0
,
len
=
binary
.
length
;
i
<
len
;
i
+=
1
)
{
v
=
binary
[
i
];
array
.
push
(
binary
.
charCodeAt
(
i
));
}
return
new
Blob
([
new
Uint8Array
(
array
)],
{
type
:
'
image/png
'
...
...
app/assets/javascripts/project_find_file.js
View file @
f5cbb44d
...
...
@@ -92,8 +92,7 @@ export default class ProjectFindFile {
this
.
element
.
find
(
"
.tree-table > tbody
"
).
empty
();
results
=
[];
// eslint-disable-next-line no-multi-assign
for
(
i
=
j
=
0
,
len
=
filePaths
.
length
;
j
<
len
;
i
=
(
j
+=
1
))
{
for
(
i
=
0
,
len
=
filePaths
.
length
;
i
<
len
;
i
+=
1
)
{
filePath
=
filePaths
[
i
];
if
(
i
===
20
)
{
break
;
...
...
app/assets/javascripts/users_select.js
View file @
f5cbb44d
...
...
@@ -259,8 +259,7 @@ function UsersSelect(currentUser, els, options = {}) {
showDivider
=
0
;
if
(
firstUser
)
{
// Move current user to the front of the list
// eslint-disable-next-line no-multi-assign
for
(
index
=
j
=
0
,
len
=
users
.
length
;
j
<
len
;
index
=
(
j
+=
1
))
{
for
(
index
=
0
,
len
=
users
.
length
;
index
<
len
;
index
+=
1
)
{
obj
=
users
[
index
];
if
(
obj
.
username
===
firstUser
)
{
users
.
splice
(
index
,
1
);
...
...
@@ -563,8 +562,7 @@ function UsersSelect(currentUser, els, options = {}) {
// Move current user to the front of the list
ref
=
data
.
results
;
// eslint-disable-next-line no-multi-assign
for
(
index
=
j
=
0
,
len
=
ref
.
length
;
j
<
len
;
index
=
(
j
+=
1
))
{
for
(
index
=
0
,
len
=
ref
.
length
;
index
<
len
;
index
+=
1
)
{
obj
=
ref
[
index
];
if
(
obj
.
username
===
firstUser
)
{
data
.
results
.
splice
(
index
,
1
);
...
...
changelogs/unreleased/no-multi-assign-follow-up.yml
0 → 100644
View file @
f5cbb44d
---
title
:
Improve no-multi-assignment fixes after enabling rule
merge_request
:
19915
author
:
gfyoung
type
:
other
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment