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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f0b7e570
Commit
f0b7e570
authored
Dec 20, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flag multiple empty lines in eslint, fix offenses.
parent
665dd387
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
27 deletions
+6
-27
.eslintrc
.eslintrc
+2
-1
app/assets/javascripts/environments/environments_bundle.js.es6
...ssets/javascripts/environments/environments_bundle.js.es6
+0
-1
app/assets/javascripts/issues_bulk_assignment.js.es6
app/assets/javascripts/issues_bulk_assignment.js.es6
+0
-2
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+0
-21
changelogs/unreleased/newline-eslint-rule.yml
changelogs/unreleased/newline-eslint-rule.yml
+4
-0
spec/javascripts/abuse_reports_spec.js.es6
spec/javascripts/abuse_reports_spec.js.es6
+0
-1
spec/javascripts/environments/environment_rollback_spec.js.es6
...javascripts/environments/environment_rollback_spec.js.es6
+0
-1
No files found.
.eslintrc
View file @
f0b7e570
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
"filenames"
"filenames"
],
],
"rules": {
"rules": {
"filenames/match-regex": [2, "^[a-z0-9_]+(.js)?$"]
"filenames/match-regex": [2, "^[a-z0-9_]+(.js)?$"],
"no-multiple-empty-lines": ["error", { "max": 1 }]
}
}
}
}
app/assets/javascripts/environments/environments_bundle.js.es6
View file @
f0b7e570
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
//= require ./components/environment
//= require ./components/environment
//= require ./vue_resource_interceptor
//= require ./vue_resource_interceptor
$(() => {
$(() => {
window.gl = window.gl || {};
window.gl = window.gl || {};
...
...
app/assets/javascripts/issues_bulk_assignment.js.es6
View file @
f0b7e570
...
@@ -61,7 +61,6 @@
...
@@ -61,7 +61,6 @@
return labels;
return labels;
}
}
/**
/**
* Will return only labels that were marked previously and the user has unmarked
* Will return only labels that were marked previously and the user has unmarked
* @return {Array} Label IDs
* @return {Array} Label IDs
...
@@ -80,7 +79,6 @@
...
@@ -80,7 +79,6 @@
return result;
return result;
}
}
/**
/**
* Simple form serialization, it will return just what we need
* Simple form serialization, it will return just what we need
* Returns key/value pairs from form data
* Returns key/value pairs from form data
...
...
app/assets/javascripts/notes.js
View file @
f0b7e570
...
@@ -220,7 +220,6 @@
...
@@ -220,7 +220,6 @@
})(
this
));
})(
this
));
};
};
/*
/*
Increase @pollingInterval up to 120 seconds on every function call,
Increase @pollingInterval up to 120 seconds on every function call,
if `shouldReset` has a truthy value, 'null' or 'undefined' the variable
if `shouldReset` has a truthy value, 'null' or 'undefined' the variable
...
@@ -244,7 +243,6 @@
...
@@ -244,7 +243,6 @@
return
this
.
initRefresh
();
return
this
.
initRefresh
();
};
};
Notes
.
prototype
.
handleCreateChanges
=
function
(
note
)
{
Notes
.
prototype
.
handleCreateChanges
=
function
(
note
)
{
if
(
typeof
note
===
'
undefined
'
)
{
if
(
typeof
note
===
'
undefined
'
)
{
return
;
return
;
...
@@ -294,7 +292,6 @@
...
@@ -294,7 +292,6 @@
}
}
};
};
/*
/*
Check if note does not exists on page
Check if note does not exists on page
*/
*/
...
@@ -307,7 +304,6 @@
...
@@ -307,7 +304,6 @@
return
this
.
view
===
'
parallel
'
;
return
this
.
view
===
'
parallel
'
;
};
};
/*
/*
Render note in discussion area.
Render note in discussion area.
...
@@ -358,7 +354,6 @@
...
@@ -358,7 +354,6 @@
return
this
.
updateNotesCount
(
1
);
return
this
.
updateNotesCount
(
1
);
};
};
/*
/*
Called in response the main target form has been successfully submitted.
Called in response the main target form has been successfully submitted.
...
@@ -390,7 +385,6 @@
...
@@ -390,7 +385,6 @@
return
form
.
find
(
"
.js-note-text
"
).
trigger
(
"
input
"
);
return
form
.
find
(
"
.js-note-text
"
).
trigger
(
"
input
"
);
};
};
/*
/*
Shows the main form and does some setup on it.
Shows the main form and does some setup on it.
...
@@ -415,7 +409,6 @@
...
@@ -415,7 +409,6 @@
return
this
.
parentTimeline
=
form
.
parents
(
'
.timeline
'
);
return
this
.
parentTimeline
=
form
.
parents
(
'
.timeline
'
);
};
};
/*
/*
General note form setup.
General note form setup.
...
@@ -432,7 +425,6 @@
...
@@ -432,7 +425,6 @@
return
new
Autosave
(
textarea
,
[
"
Note
"
,
form
.
find
(
"
#note_noteable_type
"
).
val
(),
form
.
find
(
"
#note_noteable_id
"
).
val
(),
form
.
find
(
"
#note_commit_id
"
).
val
(),
form
.
find
(
"
#note_type
"
).
val
(),
form
.
find
(
"
#note_line_code
"
).
val
(),
form
.
find
(
"
#note_position
"
).
val
()]);
return
new
Autosave
(
textarea
,
[
"
Note
"
,
form
.
find
(
"
#note_noteable_type
"
).
val
(),
form
.
find
(
"
#note_noteable_id
"
).
val
(),
form
.
find
(
"
#note_commit_id
"
).
val
(),
form
.
find
(
"
#note_type
"
).
val
(),
form
.
find
(
"
#note_line_code
"
).
val
(),
form
.
find
(
"
#note_position
"
).
val
()]);
};
};
/*
/*
Called in response to the new note form being submitted
Called in response to the new note form being submitted
...
@@ -448,7 +440,6 @@
...
@@ -448,7 +440,6 @@
return
new
Flash
(
'
Your comment could not be submitted! Please check your network connection and try again.
'
,
'
alert
'
,
this
.
parentTimeline
);
return
new
Flash
(
'
Your comment could not be submitted! Please check your network connection and try again.
'
,
'
alert
'
,
this
.
parentTimeline
);
};
};
/*
/*
Called in response to the new note form being submitted
Called in response to the new note form being submitted
...
@@ -473,7 +464,6 @@
...
@@ -473,7 +464,6 @@
this
.
removeDiscussionNoteForm
(
$form
);
this
.
removeDiscussionNoteForm
(
$form
);
};
};
/*
/*
Called in response to the edit note form being submitted
Called in response to the edit note form being submitted
...
@@ -498,7 +488,6 @@
...
@@ -498,7 +488,6 @@
}
}
};
};
Notes
.
prototype
.
checkContentToAllowEditing
=
function
(
$el
)
{
Notes
.
prototype
.
checkContentToAllowEditing
=
function
(
$el
)
{
var
initialContent
=
$el
.
find
(
'
.original-note-content
'
).
text
().
trim
();
var
initialContent
=
$el
.
find
(
'
.original-note-content
'
).
text
().
trim
();
var
currentContent
=
$el
.
find
(
'
.note-textarea
'
).
val
();
var
currentContent
=
$el
.
find
(
'
.note-textarea
'
).
val
();
...
@@ -522,7 +511,6 @@
...
@@ -522,7 +511,6 @@
return
isAllowed
;
return
isAllowed
;
};
};
/*
/*
Called in response to clicking the edit note link
Called in response to clicking the edit note link
...
@@ -551,7 +539,6 @@
...
@@ -551,7 +539,6 @@
this
.
putEditFormInPlace
(
$target
);
this
.
putEditFormInPlace
(
$target
);
};
};
/*
/*
Called in response to clicking the edit note link
Called in response to clicking the edit note link
...
@@ -596,7 +583,6 @@
...
@@ -596,7 +583,6 @@
return
form
.
find
(
'
.js-note-text
'
).
val
(
form
.
find
(
'
form.edit-note
'
).
data
(
'
original-note
'
));
return
form
.
find
(
'
.js-note-text
'
).
val
(
form
.
find
(
'
form.edit-note
'
).
data
(
'
original-note
'
));
};
};
/*
/*
Called in response to deleting a note of any kind.
Called in response to deleting a note of any kind.
...
@@ -636,7 +622,6 @@
...
@@ -636,7 +622,6 @@
return
this
.
updateNotesCount
(
-
1
);
return
this
.
updateNotesCount
(
-
1
);
};
};
/*
/*
Called in response to clicking the delete attachment link
Called in response to clicking the delete attachment link
...
@@ -653,7 +638,6 @@
...
@@ -653,7 +638,6 @@
return
note
.
find
(
"
.current-note-edit-form
"
).
remove
();
return
note
.
find
(
"
.current-note-edit-form
"
).
remove
();
};
};
/*
/*
Called when clicking on the "reply" button for a diff line.
Called when clicking on the "reply" button for a diff line.
...
@@ -673,7 +657,6 @@
...
@@ -673,7 +657,6 @@
return
this
.
setupDiscussionNoteForm
(
replyLink
,
form
);
return
this
.
setupDiscussionNoteForm
(
replyLink
,
form
);
};
};
/*
/*
Shows the diff or discussion form and does some setup on it.
Shows the diff or discussion form and does some setup on it.
...
@@ -715,7 +698,6 @@
...
@@ -715,7 +698,6 @@
.
addClass
(
"
discussion-form js-discussion-note-form
"
);
.
addClass
(
"
discussion-form js-discussion-note-form
"
);
};
};
/*
/*
Called when clicking on the "add a comment" button on the side of a diff line.
Called when clicking on the "add a comment" button on the side of a diff line.
...
@@ -772,7 +754,6 @@
...
@@ -772,7 +754,6 @@
}
}
};
};
/*
/*
Called in response to "cancel" on a diff note form.
Called in response to "cancel" on a diff note form.
...
@@ -806,7 +787,6 @@
...
@@ -806,7 +787,6 @@
return
this
.
removeDiscussionNoteForm
(
form
);
return
this
.
removeDiscussionNoteForm
(
form
);
};
};
/*
/*
Called after an attachment file has been selected.
Called after an attachment file has been selected.
...
@@ -821,7 +801,6 @@
...
@@ -821,7 +801,6 @@
return
form
.
find
(
"
.js-attachment-filename
"
).
text
(
filename
);
return
form
.
find
(
"
.js-attachment-filename
"
).
text
(
filename
);
};
};
/*
/*
Called when the tab visibility changes
Called when the tab visibility changes
*/
*/
...
...
changelogs/unreleased/newline-eslint-rule.yml
0 → 100644
View file @
f0b7e570
---
title
:
Flag multiple empty lines in eslint, fix offenses.
merge_request
:
8137
author
:
spec/javascripts/abuse_reports_spec.js.es6
View file @
f0b7e570
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
messages = $('.abuse-reports .message');
messages = $('.abuse-reports .message');
});
});
it('should truncate long messages', () => {
it('should truncate long messages', () => {
const $longMessage = findMessage('LONG MESSAGE');
const $longMessage = findMessage('LONG MESSAGE');
expect($longMessage.data('original-message')).toEqual(jasmine.anything());
expect($longMessage.data('original-message')).toEqual(jasmine.anything());
...
...
spec/javascripts/environments/environment_rollback_spec.js.es6
View file @
f0b7e570
...
@@ -33,7 +33,6 @@ describe('Rollback Component', () => {
...
@@ -33,7 +33,6 @@ describe('Rollback Component', () => {
expect(component.$el.querySelector('span').textContent).toContain('Re-deploy');
expect(component.$el.querySelector('span').textContent).toContain('Re-deploy');
});
});
it('Should render Rollback label when isLastDeployment is false', () => {
it('Should render Rollback label when isLastDeployment is false', () => {
const component = new window.gl.environmentsList.RollbackComponent({
const component = new window.gl.environmentsList.RollbackComponent({
el: document.querySelector('.test-dom-element'),
el: document.querySelector('.test-dom-element'),
...
...
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