DEV: updates prettier and displays linters/prettifiers version in CI
This commit is contained in:
parent
8126b603e4
commit
2f7960bd2a
|
@ -10,8 +10,7 @@ export default Ember.Route.extend({
|
|||
if (preloadedLogs && preloadedLogs.length) {
|
||||
// we need to filter out message like: "[SUCCESS]"
|
||||
// and convert POJOs to Ember Objects
|
||||
const newLogs = _
|
||||
.chain(preloadedLogs)
|
||||
const newLogs = _.chain(preloadedLogs)
|
||||
.reject(function(log) {
|
||||
return log.message.length === 0 || log.message[0] === "[";
|
||||
})
|
||||
|
|
|
@ -72,16 +72,14 @@ export default Ember.Component.extend(
|
|||
|
||||
if (notices.length > 0) {
|
||||
buffer.push(
|
||||
_
|
||||
.map(notices, n => {
|
||||
var html = `<div class='row'><div class='alert alert-info ${
|
||||
n[1]
|
||||
}'>`;
|
||||
if (n[2]) html += n[2];
|
||||
html += `${n[0]}</div></div>`;
|
||||
return html;
|
||||
})
|
||||
.join("")
|
||||
_.map(notices, n => {
|
||||
var html = `<div class='row'><div class='alert alert-info ${
|
||||
n[1]
|
||||
}'>`;
|
||||
if (n[2]) html += n[2];
|
||||
html += `${n[0]}</div></div>`;
|
||||
return html;
|
||||
}).join("")
|
||||
);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -142,12 +142,12 @@ export function ajax() {
|
|||
!Discourse.Session.currentProp("csrfToken")
|
||||
) {
|
||||
promise = new Ember.RSVP.Promise((resolve, reject) => {
|
||||
ajaxObj = $
|
||||
.ajax(Discourse.getURL("/session/csrf"), { cache: false })
|
||||
.done(result => {
|
||||
Discourse.Session.currentProp("csrfToken", result.csrf);
|
||||
performAjax(resolve, reject);
|
||||
});
|
||||
ajaxObj = $.ajax(Discourse.getURL("/session/csrf"), {
|
||||
cache: false
|
||||
}).done(result => {
|
||||
Discourse.Session.currentProp("csrfToken", result.csrf);
|
||||
performAjax(resolve, reject);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
promise = new Ember.RSVP.Promise(performAjax);
|
||||
|
|
|
@ -68,9 +68,9 @@ export function linkSeenMentions($elem, siteSettings) {
|
|||
.substr(1)
|
||||
);
|
||||
updateFound($mentions, usernames);
|
||||
return _
|
||||
.uniq(usernames)
|
||||
.filter(u => !checked[u] && u.length >= siteSettings.min_username_length);
|
||||
return _.uniq(usernames).filter(
|
||||
u => !checked[u] && u.length >= siteSettings.min_username_length
|
||||
);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
|
|
@ -330,8 +330,7 @@ const TopicTrackingState = Discourse.Model.extend({
|
|||
},
|
||||
|
||||
countNew(category_id) {
|
||||
return _
|
||||
.chain(this.states)
|
||||
return _.chain(this.states)
|
||||
.where(isNew)
|
||||
.where(
|
||||
topic =>
|
||||
|
@ -353,8 +352,7 @@ const TopicTrackingState = Discourse.Model.extend({
|
|||
},
|
||||
|
||||
countUnread(category_id) {
|
||||
return _
|
||||
.chain(this.states)
|
||||
return _.chain(this.states)
|
||||
.where(isUnread)
|
||||
.where(
|
||||
topic =>
|
||||
|
|
|
@ -103,9 +103,9 @@ export default MultiSelectComponent.extend(Tags, {
|
|||
};
|
||||
|
||||
if (selectedTags.length || this.get("blacklist").length) {
|
||||
data.selected_tags = _
|
||||
.uniq(selectedTags.concat(this.get("blacklist")))
|
||||
.slice(0, 100);
|
||||
data.selected_tags = _.uniq(
|
||||
selectedTags.concat(this.get("blacklist"))
|
||||
).slice(0, 100);
|
||||
}
|
||||
|
||||
if (!this.get("everyTag")) data.filterForInput = true;
|
||||
|
|
|
@ -40,6 +40,9 @@ task 'docker:test' do
|
|||
@good = true
|
||||
unless ENV['SKIP_LINT']
|
||||
puts "Running linters/prettyfiers"
|
||||
puts "eslint #{`eslint -v`}"
|
||||
puts "prettier #{`prettier -v`}"
|
||||
|
||||
if ENV["SINGLE_PLUGIN"]
|
||||
@good &&= run_or_fail("bundle exec rubocop --parallel plugins/#{ENV["SINGLE_PLUGIN"]}")
|
||||
@good &&= run_or_fail("eslint --ext .es6 plugins/#{ENV['SINGLE_PLUGIN']}")
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"chrome-launcher": "^0.10.2",
|
||||
"chrome-remote-interface": "^0.25.6",
|
||||
"eslint": "^4.19.1",
|
||||
"prettier": "1.13.4",
|
||||
"prettier": "^1.13.0",
|
||||
"puppeteer": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue