Skip to content

Bump prettier from 1.19.1 to 2.0.1 #2308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default RESTAdapter.extend({

namespace: 'api/v1',

headers: computed('fastboot.{isFastBoot,request.headers}', function() {
headers: computed('fastboot.{isFastBoot,request.headers}', function () {
if (this.fastboot.isFastBoot) {
return { 'User-Agent': this.fastboot.request.headers.get('User-Agent') };
}
Expand Down
10 changes: 5 additions & 5 deletions app/components/badge-appveyor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default Component.extend({
id: alias('badge.attributes.id'),
repository: alias('badge.attributes.repository'),

imageUrl: computed('badge.attributes.id', function() {
imageUrl: computed('badge.attributes.id', function () {
let id = this.get('badge.attributes.id');
let branch = this.branch;
if (id !== undefined && id !== null) {
Expand All @@ -20,19 +20,19 @@ export default Component.extend({
}
}),

branch: computed('badge.attributes.branch', function() {
branch: computed('badge.attributes.branch', function () {
return this.get('badge.attributes.branch') || 'master';
}),

projectName: computed('badge.attributes.project_name', function() {
projectName: computed('badge.attributes.project_name', function () {
return this.get('badge.attributes.project_name') || this.get('badge.attributes.repository').replace(/[_.]/g, '-');
}),

service: computed('badge.attributes.service', function() {
service: computed('badge.attributes.service', function () {
return this.get('badge.attributes.service') || 'github';
}),

text: computed('badge', function() {
text: computed('badge', function () {
return `Appveyor build status for the ${this.branch} branch`;
}),
});
4 changes: 2 additions & 2 deletions app/components/badge-azure-devops.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export default Component.extend({
project: alias('badge.attributes.project'),
pipeline: alias('badge.attributes.pipeline'),

build: computed('badge.attributes.build', function() {
build: computed('badge.attributes.build', function () {
return this.get('badge.attributes.build') || '1';
}),

text: computed('pipeline', function() {
text: computed('pipeline', function () {
return `Azure Devops build status for the ${this.pipeline} pipeline`;
}),
});
4 changes: 2 additions & 2 deletions app/components/badge-bitbucket-pipelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export default Component.extend({
tagName: '',
repository: alias('badge.attributes.repository'),

branch: computed('badge.attributes.branch', function() {
branch: computed('badge.attributes.branch', function () {
return encodeURIComponent(this.get('badge.attributes.branch'));
}),

text: computed('badge.attributes.branch', function() {
text: computed('badge.attributes.branch', function () {
const branch = this.get('badge.attributes.branch');
return `Bitbucket Pipelines build status for the ${branch} branch`;
}),
Expand Down
4 changes: 2 additions & 2 deletions app/components/badge-circle-ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export default Component.extend({
tagName: '',
repository: alias('badge.attributes.repository'),

branch: computed('badge.attributes.branch', function() {
branch: computed('badge.attributes.branch', function () {
return encodeURIComponent(this.get('badge.attributes.branch') || 'master');
}),

text: computed('branch', function() {
text: computed('branch', function () {
return `Circle CI build status for the ${this.branch} branch`;
}),
});
4 changes: 2 additions & 2 deletions app/components/badge-cirrus-ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export default Component.extend({
tagName: '',
repository: alias('badge.attributes.repository'),

branch: computed('badge.attributes.branch', function() {
branch: computed('badge.attributes.branch', function () {
return encodeURIComponent(this.get('badge.attributes.branch') || 'master');
}),

text: computed('branch', function() {
text: computed('branch', function () {
return `Cirrus CI build status for the ${this.branch} branch`;
}),
});
6 changes: 3 additions & 3 deletions app/components/badge-codecov.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export default Component.extend({
tagName: '',
repository: alias('badge.attributes.repository'),

branch: computed('badge.attributes.branch', function() {
branch: computed('badge.attributes.branch', function () {
return this.get('badge.attributes.branch') || 'master';
}),

service: computed('badge.attributes.service', function() {
service: computed('badge.attributes.service', function () {
return this.get('badge.attributes.service') || 'github';
}),

text: computed('branch', function() {
text: computed('branch', function () {
return `CodeCov coverage status for the ${this.branch} branch`;
}),
});
6 changes: 3 additions & 3 deletions app/components/badge-coveralls.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export default Component.extend({
tagName: '',
repository: alias('badge.attributes.repository'),

branch: computed('badge.attributes.branch', function() {
branch: computed('badge.attributes.branch', function () {
return this.get('badge.attributes.branch') || 'master';
}),

service: computed('badge.attributes.service', function() {
service: computed('badge.attributes.service', function () {
return this.get('badge.attributes.service') || 'github';
}),

text: computed('branch', function() {
text: computed('branch', function () {
return `Coveralls coverage status for the ${this.branch} branch`;
}),
});
4 changes: 2 additions & 2 deletions app/components/badge-gitlab.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export default Component.extend({
tagName: '',
repository: alias('badge.attributes.repository'),

branch: computed('badge.attributes.branch', function() {
branch: computed('badge.attributes.branch', function () {
return this.get('badge.attributes.branch') || 'master';
}),

text: computed('badge', function() {
text: computed('badge', function () {
return `GitLab build status for the ${this.branch} branch`;
}),
});
2 changes: 1 addition & 1 deletion app/components/badge-is-it-maintained-issue-resolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default Component.extend({
tagName: '',
repository: alias('badge.attributes.repository'),

text: computed('badge', function() {
text: computed('badge', function () {
return `Is It Maintained average time to resolve an issue`;
}),
});
2 changes: 1 addition & 1 deletion app/components/badge-is-it-maintained-open-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default Component.extend({
tagName: '',
repository: alias('badge.attributes.repository'),

text: computed('badge', function() {
text: computed('badge', function () {
return `Is It Maintained percentage of issues still open`;
}),
});
6 changes: 3 additions & 3 deletions app/components/badge-maintenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import { alias } from '@ember/object/computed';
export default Component.extend({
tagName: '',

escapedStatus: computed('badge', function() {
escapedStatus: computed('badge', function () {
return this.get('badge.attributes.status').replace(/-/g, '--');
}),

none: computed('badge', function() {
none: computed('badge', function () {
return this.get('badge.attributes.status') === 'none' || !this.get('badge.attributes.status');
}),

status: alias('badge.attributes.status'),

// eslint-disable-next-line ember/require-return-from-computed
color: computed('badge', function() {
color: computed('badge', function () {
switch (this.get('badge.attributes.status')) {
case 'actively-developed':
return 'brightgreen';
Expand Down
4 changes: 2 additions & 2 deletions app/components/badge-travis-ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export default Component.extend({
tagName: '',
repository: alias('badge.attributes.repository'),

branch: computed('badge.attributes.branch', function() {
branch: computed('badge.attributes.branch', function () {
return this.get('badge.attributes.branch') || 'master';
}),

text: computed('branch', function() {
text: computed('branch', function () {
return `Travis CI build status for the ${this.branch} branch`;
}),
});
4 changes: 2 additions & 2 deletions app/components/crate-badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { computed } from '@ember/object';
export default Component.extend({
tagName: '',

version: computed('crate.max_version', function() {
version: computed('crate.max_version', function () {
return this.get('crate.max_version').replace('-', '--');
}),

color: computed('crate.max_version', function() {
color: computed('crate.max_version', function () {
if (this.get('crate.max_version')[0] == '0') {
return 'orange';
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/components/crate-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { computed } from '@ember/object';

export default Component.extend({
tagName: '',
crateTomlText: computed('crate.name', 'max_version', function() {
crateTomlText: computed('crate.name', 'max_version', function () {
return `${this.get('crate.name')} = "${this.get('crate.max_version')}"`;
}),
});
4 changes: 2 additions & 2 deletions app/components/download-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export default Component.extend({
// use a DataView to calculate an x-day moving average
let days = 7;
let view = new window.google.visualization.DataView(myData);
let moving_avg_func_for_col = function(col) {
return function(dt, row) {
let moving_avg_func_for_col = function (col) {
return function (dt, row) {
// For the last rows (the *first* days, remember, the dataset is
// backwards), we cannot calculate the avg. of previous days.
if (row >= dt.getNumberOfRows() - days) {
Expand Down
2 changes: 1 addition & 1 deletion app/components/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default Component.extend(EKMixin, EKOnInsertMixin, {

dropdownExpanded: false,

onEscape: on(keyDown('Escape'), function() {
onEscape: on(keyDown('Escape'), function () {
this.set('dropdownExpanded', false);
}),

Expand Down
4 changes: 2 additions & 2 deletions app/components/dropdown/trigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export default Component.extend({

attributeBindings: ['type', 'role', 'disabled'],

type: computed('tagName', function() {
type: computed('tagName', function () {
return this.tagName === 'button' ? 'button' : null;
}),

role: computed('tagName', function() {
role: computed('tagName', function () {
return this.tagName === 'a' ? 'button' : null;
}),

Expand Down
10 changes: 5 additions & 5 deletions app/components/email-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ export default Component.extend({
notValidEmail: false,
prevEmail: '',

emailIsNull: computed('user.email', function() {
emailIsNull: computed('user.email', function () {
let email = this.get('user.email');
return email == null;
}),

emailNotVerified: computed('user.{email,email_verified}', function() {
emailNotVerified: computed('user.{email,email_verified}', function () {
let email = this.get('user.email');
let verified = this.get('user.email_verified');

Expand All @@ -31,7 +31,7 @@ export default Component.extend({
emailError: '',
disableResend: false,

resendButtonText: computed('disableResend', 'user.email_verification_sent', function() {
resendButtonText: computed('disableResend', 'user.email_verification_sent', function () {
if (this.disableResend) {
return 'Sent!';
} else if (this.get('user.email_verification_sent')) {
Expand All @@ -44,7 +44,7 @@ export default Component.extend({
actions: {
editEmail() {
let email = this.value;
let isEmailNull = function(email) {
let isEmailNull = function (email) {
return email == null;
};

Expand All @@ -57,7 +57,7 @@ export default Component.extend({
let userEmail = this.value;
let user = this.user;

let emailIsProperFormat = function(userEmail) {
let emailIsProperFormat = function (userEmail) {
let regExp = /^\S+@\S+\.\S+$/;
return regExp.test(userEmail);
};
Expand Down
4 changes: 2 additions & 2 deletions app/components/follow-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export default class extends Component {
this.followStateTask.perform();
}

@(task(function*() {
@(task(function* () {
let d = yield ajax(`/api/v1/crates/${this.args.crate.name}/following`);
this.following = d.following;
}).drop())
followStateTask;

@task(function*() {
@task(function* () {
let crate = this.args.crate;

if (!this.following) {
Expand Down
2 changes: 1 addition & 1 deletion app/components/owned-crate-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default Component.extend({
tagName: '',

name: alias('ownedCrate.name'),
controlId: computed('ownedCrate.id', function() {
controlId: computed('ownedCrate.id', function () {
return `${this.ownedCrate.id}-email-notifications`;
}),
emailNotifications: alias('ownedCrate.email_notifications'),
Expand Down
6 changes: 3 additions & 3 deletions app/components/user-avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default Component.extend({
attributeBindings: ['src', 'width', 'height', 'alt'],
tagName: 'img',

width: computed('size', function() {
width: computed('size', function () {
if (this.size === 'small') {
return 22;
} else if (this.size === 'medium-small') {
Expand All @@ -20,11 +20,11 @@ export default Component.extend({

height: readOnly('width'),

alt: computed('user', function() {
alt: computed('user', function () {
return `${this.get('user.name')} (${this.get('user.login')})`;
}),

src: computed('size', 'user', function() {
src: computed('size', 'user', function () {
return `${this.get('user.avatar')}&s=${this.width * 2}`;
}),
});
2 changes: 1 addition & 1 deletion app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default Controller.extend(EKMixin, {

keyboardActivated: true,

focusSearch: on(keyDown('KeyS'), keyPress('KeyS'), keyDown('shift+KeyS'), function(event) {
focusSearch: on(keyDown('KeyS'), keyPress('KeyS'), keyDown('shift+KeyS'), function (event) {
if (event.ctrlKey || event.altKey || event.metaKey) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default Controller.extend(PaginationMixin, {

totalItems: readOnly('model.meta.total'),

currentSortBy: computed('sort', function() {
currentSortBy: computed('sort', function () {
return this.sort === 'crates' ? '# Crates' : 'Alphabetical';
}),
});
2 changes: 1 addition & 1 deletion app/controllers/category/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default Controller.extend(PaginationMixin, {

category: null,

currentSortBy: computed('sort', function() {
currentSortBy: computed('sort', function () {
if (this.sort === 'downloads') {
return 'All-Time Downloads';
} else if (this.sort === 'alpha') {
Expand Down
Loading