mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
DEV: prettier 1.18.2 (#7810)
This commit is contained in:
@ -332,9 +332,7 @@ const Report = Discourse.Model.extend({
|
|||||||
ignoreTitle: true
|
ignoreTitle: true
|
||||||
});
|
});
|
||||||
|
|
||||||
return `<a href='${href}'>${avatarImg}<span class='username'>${
|
return `<a href='${href}'>${avatarImg}<span class='username'>${user.name}</span></a>`;
|
||||||
user.name
|
|
||||||
}</span></a>`;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -72,9 +72,7 @@ export default Ember.Component.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_formatReplyToUserPost(avatar, link) {
|
_formatReplyToUserPost(avatar, link) {
|
||||||
const htmlLink = `<a class="user-link" href="${link.href}">${
|
const htmlLink = `<a class="user-link" href="${link.href}">${link.anchor}</a>`;
|
||||||
link.anchor
|
|
||||||
}</a>`;
|
|
||||||
return `${avatar}${htmlLink}`.htmlSafe();
|
return `${avatar}${htmlLink}`.htmlSafe();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -10,9 +10,7 @@ function replaceSpan($e, username, opts) {
|
|||||||
|
|
||||||
if (opts && opts.group) {
|
if (opts && opts.group) {
|
||||||
if (opts.mentionable) {
|
if (opts.mentionable) {
|
||||||
extra = `data-name='${username}' data-mentionable-user-count='${
|
extra = `data-name='${username}' data-mentionable-user-count='${opts.mentionable.user_count}' data-max-mentions='${maxGroupMention}'`;
|
||||||
opts.mentionable.user_count
|
|
||||||
}' data-max-mentions='${maxGroupMention}'`;
|
|
||||||
extraClass = "notify";
|
extraClass = "notify";
|
||||||
}
|
}
|
||||||
$e.replaceWith(
|
$e.replaceWith(
|
||||||
|
@ -53,9 +53,7 @@ export function registerTopicFooterButton(button) {
|
|||||||
!normalizedButton.translatedTitle
|
!normalizedButton.translatedTitle
|
||||||
) {
|
) {
|
||||||
Ember.error(
|
Ember.error(
|
||||||
`Attempted to register a topic button: ${
|
`Attempted to register a topic button: ${button.id} with no icon or title.`
|
||||||
button.id
|
|
||||||
} with no icon or title.`
|
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,7 @@ export default class Connector {
|
|||||||
|
|
||||||
if (opts.templateName) {
|
if (opts.templateName) {
|
||||||
deprecated(
|
deprecated(
|
||||||
`Using a 'templateName' for a connector is deprecated. Use 'component' instead [${
|
`Using a 'templateName' for a connector is deprecated. Use 'component' instead [${opts.templateName}]`
|
||||||
opts.templateName
|
|
||||||
}]`
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,9 +67,7 @@ export const DefaultNotificationItem = createWidget(
|
|||||||
|
|
||||||
if (this.attrs.fancy_title) {
|
if (this.attrs.fancy_title) {
|
||||||
if (this.attrs.topic_id) {
|
if (this.attrs.topic_id) {
|
||||||
return `<span data-topic-id="${this.attrs.topic_id}">${
|
return `<span data-topic-id="${this.attrs.topic_id}">${this.attrs.fancy_title}</span>`;
|
||||||
this.attrs.fancy_title
|
|
||||||
}</span>`;
|
|
||||||
}
|
}
|
||||||
return this.attrs.fancy_title;
|
return this.attrs.fancy_title;
|
||||||
}
|
}
|
||||||
|
@ -399,9 +399,7 @@ export default createWidget("header", {
|
|||||||
var params = "";
|
var params = "";
|
||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
params = `?context=${context.type}&context_id=${
|
params = `?context=${context.type}&context_id=${context.id}&skip_context=${this.state.skipSearchContext}`;
|
||||||
context.id
|
|
||||||
}&skip_context=${this.state.skipSearchContext}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentPath = this.register
|
const currentPath = this.register
|
||||||
|
@ -73,9 +73,7 @@ createSearchResult({
|
|||||||
return h(
|
return h(
|
||||||
"span",
|
"span",
|
||||||
{
|
{
|
||||||
className: `tag-${tag} discourse-tag ${
|
className: `tag-${tag} discourse-tag ${Discourse.SiteSettings.tag_style}`
|
||||||
Discourse.SiteSettings.tag_style
|
|
||||||
}`
|
|
||||||
},
|
},
|
||||||
tag
|
tag
|
||||||
);
|
);
|
||||||
|
@ -230,9 +230,7 @@ export default class Widget {
|
|||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Couldn't find ${widgetName} or fallback ${
|
`Couldn't find ${widgetName} or fallback ${otherOpts.fallbackWidgetName}`
|
||||||
otherOpts.fallbackWidgetName
|
|
||||||
}`
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,7 @@ export default Ember.Mixin.create({
|
|||||||
this.bodySelector = ".select-kit-body";
|
this.bodySelector = ".select-kit-body";
|
||||||
this.wrapperSelector = ".select-kit-wrapper";
|
this.wrapperSelector = ".select-kit-wrapper";
|
||||||
this.scrollableParentSelector = ".modal-body";
|
this.scrollableParentSelector = ".modal-body";
|
||||||
this.fixedPlaceholderSelector = `.select-kit-fixed-placeholder-${
|
this.fixedPlaceholderSelector = `.select-kit-fixed-placeholder-${this.elementId}`;
|
||||||
this.elementId
|
|
||||||
}`;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
$findRowByValue(value) {
|
$findRowByValue(value) {
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
"chrome-remote-interface": "^0.25",
|
"chrome-remote-interface": "^0.25",
|
||||||
"eslint": "^4.19",
|
"eslint": "^4.19",
|
||||||
"pretender": "^1.6",
|
"pretender": "^1.6",
|
||||||
"prettier": "^1.16.4",
|
"prettier": "^1.18.2",
|
||||||
"puppeteer": "1.16",
|
"puppeteer": "1.16",
|
||||||
"qunit": "2.8.0",
|
"qunit": "2.8.0",
|
||||||
"route-recognizer": "^0.3.3",
|
"route-recognizer": "^0.3.3",
|
||||||
|
@ -22,9 +22,7 @@ QUnit.test("Reply as new topic", async assert => {
|
|||||||
find(".d-editor-input")
|
find(".d-editor-input")
|
||||||
.val()
|
.val()
|
||||||
.trim(),
|
.trim(),
|
||||||
`Continuing the discussion from [Internationalization / localization](${
|
`Continuing the discussion from [Internationalization / localization](${window.location.origin}/t/internationalization-localization/280):`,
|
||||||
window.location.origin
|
|
||||||
}/t/internationalization-localization/280):`,
|
|
||||||
"it fills composer with the ring string"
|
"it fills composer with the ring string"
|
||||||
);
|
);
|
||||||
assert.equal(
|
assert.equal(
|
||||||
@ -47,9 +45,7 @@ QUnit.test("Reply as new message", async assert => {
|
|||||||
find(".d-editor-input")
|
find(".d-editor-input")
|
||||||
.val()
|
.val()
|
||||||
.trim(),
|
.trim(),
|
||||||
`Continuing the discussion from [PM for testing](${
|
`Continuing the discussion from [PM for testing](${window.location.origin}/t/pm-for-testing/12):`,
|
||||||
window.location.origin
|
|
||||||
}/t/pm-for-testing/12):`,
|
|
||||||
"it fills composer with the ring string"
|
"it fills composer with the ring string"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1863,10 +1863,10 @@ pretender@^1.6:
|
|||||||
fake-xml-http-request "^1.6.0"
|
fake-xml-http-request "^1.6.0"
|
||||||
route-recognizer "^0.3.3"
|
route-recognizer "^0.3.3"
|
||||||
|
|
||||||
prettier@^1.16.4:
|
prettier@^1.18.2:
|
||||||
version "1.16.4"
|
version "1.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
|
||||||
integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==
|
integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
|
||||||
|
|
||||||
process-nextick-args@~2.0.0:
|
process-nextick-args@~2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
|
Reference in New Issue
Block a user