Skip to content
Snippets Groups Projects
Verified Commit 55a5ced4 authored by Mike Greiling's avatar Mike Greiling
Browse files

Upgrade prettier to latest (v1.18.2)

Upgrades prettier to the latest version, and auto-corrects files with
yarn prettier-all-save

The diffs all seem to stem from formatting changes in brackets within
template literals. Nothing major.

Relevant changelogs here:

https://prettier.io/blog/2019/04/12/1.17.0.html
https://prettier.io/blog/2019/06/06/1.18.0.html
parent 76f49de4
No related branches found
No related tags found
No related merge requests found
Showing
with 19 additions and 49 deletions
Loading
Loading
@@ -201,9 +201,7 @@ class GfmAutoComplete {
const autoCompleteAvatar = m.avatar_url || m.username.charAt(0).toUpperCase();
 
const rectAvatarClass = m.type === GROUP_TYPE ? 'rect-avatar' : '';
const imgAvatar = `<img src="${m.avatar_url}" alt="${
m.username
}" class="avatar ${rectAvatarClass} avatar-inline center s26"/>`;
const imgAvatar = `<img src="${m.avatar_url}" alt="${m.username}" class="avatar ${rectAvatarClass} avatar-inline center s26"/>`;
const txtAvatar = `<div class="avatar ${rectAvatarClass} center avatar-inline s26">${autoCompleteAvatar}</div>`;
 
return {
Loading
Loading
Loading
Loading
@@ -77,9 +77,7 @@ export default function groupsSelect() {
}
},
formatResult(object) {
return `<div class='group-result'> <div class='group-name'>${
object.full_name
}</div> <div class='group-path'>${object.full_path}</div> </div>`;
return `<div class='group-result'> <div class='group-name'>${object.full_name}</div> <div class='group-path'>${object.full_path}</div> </div>`;
},
formatSelection(object) {
return object.full_name;
Loading
Loading
Loading
Loading
@@ -63,9 +63,7 @@ export const setLastCommitMessage = ({ commit, rootGetters }, data) => {
const commitMsg = sprintf(
__('Your changes have been committed. Commit %{commitId} %{commitStats}'),
{
commitId: `<a href="${currentProject.web_url}/commit/${data.short_id}" class="commit-sha">${
data.short_id
}</a>`,
commitId: `<a href="${currentProject.web_url}/commit/${data.short_id}" class="commit-sha">${data.short_id}</a>`,
commitStats,
},
false,
Loading
Loading
@@ -215,9 +213,7 @@ export const commitChanges = ({ commit, state, getters, dispatch, rootState, roo
 
if (rootGetters.activeFile) {
router.push(
`/project/${rootState.currentProjectId}/blob/${getters.branchName}/-/${
rootGetters.activeFile.path
}`,
`/project/${rootState.currentProjectId}/blob/${getters.branchName}/-/${rootGetters.activeFile.path}`,
);
}
}
Loading
Loading
Loading
Loading
@@ -86,9 +86,7 @@ export default {
return sprintf(
'%{startLink}%{name}%{endLink}',
{
startLink: `<a href="${
this.deploymentStatus.environment.environment_path
}" class="js-environment-link">`,
startLink: `<a href="${this.deploymentStatus.environment.environment_path}" class="js-environment-link">`,
name: _.escape(this.deploymentStatus.environment.name),
endLink: '</a>',
},
Loading
Loading
Loading
Loading
@@ -1284,9 +1284,7 @@ export default class Notes {
 
putConflictEditWarningInPlace(noteEntity, $note) {
if ($note.find('.js-conflict-edit-warning').length === 0) {
const open_link = `<a href="#note_${
noteEntity.id
}" target="_blank" rel="noopener noreferrer">`;
const open_link = `<a href="#note_${noteEntity.id}" target="_blank" rel="noopener noreferrer">`;
const $alert = $(`<div class="js-conflict-edit-warning alert alert-danger">
${sprintf(
s__(
Loading
Loading
Loading
Loading
@@ -6,9 +6,7 @@ document.addEventListener('DOMContentLoaded', () => {
const twoFactorNode = document.querySelector('.js-two-factor-auth');
const skippable = parseBoolean(twoFactorNode.dataset.twoFactorSkippable);
if (skippable) {
const button = `<a class="btn btn-sm btn-warning float-right" data-method="patch" href="${
twoFactorNode.dataset.two_factor_skip_url
}">Configure it later</a>`;
const button = `<a class="btn btn-sm btn-warning float-right" data-method="patch" href="${twoFactorNode.dataset.two_factor_skip_url}">Configure it later</a>`;
const flashAlert = document.querySelector('.flash-alert .container-fluid');
if (flashAlert) flashAlert.insertAdjacentHTML('beforeend', button);
}
Loading
Loading
Loading
Loading
@@ -191,7 +191,7 @@
"nodemon": "^1.18.9",
"pixelmatch": "^4.0.2",
"postcss": "^7.0.14",
"prettier": "1.16.4",
"prettier": "1.18.2",
"stylelint": "^9.10.1",
"stylelint-config-recommended": "^2.1.0",
"stylelint-scss": "^3.5.4",
Loading
Loading
Loading
Loading
@@ -101,9 +101,7 @@ describe('Stages Dropdown', () => {
});
 
it(`renders the pipeline info text like "Pipeline #123 for !456 with source_branch into target_branch"`, () => {
const expected = `Pipeline #${pipeline.id} for !${pipeline.merge_request.iid} with ${
pipeline.merge_request.source_branch
} into ${pipeline.merge_request.target_branch}`;
const expected = `Pipeline #${pipeline.id} for !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch} into ${pipeline.merge_request.target_branch}`;
const actual = trimText(vm.$el.querySelector('.js-pipeline-info').innerText);
 
expect(actual).toBe(expected);
Loading
Loading
@@ -144,9 +142,7 @@ describe('Stages Dropdown', () => {
});
 
it(`renders the pipeline info like "Pipeline #123 for !456 with source_branch"`, () => {
const expected = `Pipeline #${pipeline.id} for !${pipeline.merge_request.iid} with ${
pipeline.merge_request.source_branch
}`;
const expected = `Pipeline #${pipeline.id} for !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch}`;
const actual = trimText(vm.$el.querySelector('.js-pipeline-info').innerText);
 
expect(actual).toBe(expected);
Loading
Loading
Loading
Loading
@@ -26,9 +26,7 @@ describe('Promote label modal', () => {
 
it('contains the proper description', () => {
expect(vm.text).toContain(
`Promoting ${labelMockData.labelTitle} will make it available for all projects inside ${
labelMockData.groupName
}`,
`Promoting ${labelMockData.labelTitle} will make it available for all projects inside ${labelMockData.groupName}`,
);
});
 
Loading
Loading
Loading
Loading
@@ -24,9 +24,7 @@ describe('Promote milestone modal', () => {
 
it('contains the proper description', () => {
expect(vm.text).toContain(
`Promoting ${
milestoneMockData.milestoneTitle
} will make it available for all projects inside ${milestoneMockData.groupName}.`,
`Promoting ${milestoneMockData.milestoneTitle} will make it available for all projects inside ${milestoneMockData.groupName}.`,
);
});
 
Loading
Loading
Loading
Loading
@@ -222,9 +222,7 @@ describe('MRWidgetPipeline', () => {
sourceBranchLink: mockCopy.source_branch_link,
});
 
const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${
pipeline.commit.short_id
} on ${mockCopy.source_branch_link}`;
const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${pipeline.commit.short_id} on ${mockCopy.source_branch_link}`;
 
const actual = trimText(vm.$el.querySelector('.js-pipeline-info-container').innerText);
 
Loading
Loading
@@ -247,11 +245,7 @@ describe('MRWidgetPipeline', () => {
sourceBranchLink: mockCopy.source_branch_link,
});
 
const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${
pipeline.commit.short_id
} on !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch} into ${
pipeline.merge_request.target_branch
}`;
const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${pipeline.commit.short_id} on !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch} into ${pipeline.merge_request.target_branch}`;
 
const actual = trimText(vm.$el.querySelector('.js-pipeline-info-container').innerText);
 
Loading
Loading
@@ -274,9 +268,7 @@ describe('MRWidgetPipeline', () => {
sourceBranchLink: mockCopy.source_branch_link,
});
 
const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${
pipeline.commit.short_id
} on !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch}`;
const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${pipeline.commit.short_id} on !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch}`;
 
const actual = trimText(vm.$el.querySelector('.js-pipeline-info-container').innerText);
 
Loading
Loading
Loading
Loading
@@ -8699,10 +8699,10 @@ prettier@1.16.3:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.3.tgz#8c62168453badef702f34b45b6ee899574a6a65d"
integrity sha512-kn/GU6SMRYPxUakNXhpP0EedT/KmaPzr0H5lIsDogrykbaxOpOfAFfk5XA7DZrJyMAv1wlMV3CPcZruGXVVUZw==
 
prettier@1.16.4:
version "1.16.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==
prettier@1.18.2:
version "1.18.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
 
pretty-format@^24.8.0:
version "24.8.0"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment