DEV: Remove ESLint warnings 🚨

This commit is contained in:
Rishabh 2019-01-22 17:19:01 +05:30
parent 77d603098f
commit a96bfdf6d5
8 changed files with 16 additions and 17 deletions

View File

@ -2,7 +2,7 @@ export default Ember.Component.extend({
classNameBindings: [":schema-table", "open"],
tagName: "li",
open: Em.computed.alias("table.open"),
open: Ember.computed.alias("table.open"),
_bindClicks: function() {
const self = this;

View File

@ -52,7 +52,7 @@ export default Ember.Component.extend({
}.property("schema"),
rfilter: function() {
if (!Em.isBlank(this.get("filter"))) {
if (!Ember.isBlank(this.get("filter"))) {
return new RegExp(this.get("filter"));
}
}.property("filter"),
@ -99,7 +99,7 @@ export default Ember.Component.extend({
filterCols.push(col);
}
});
if (!Em.isEmpty(filterCols)) {
if (!Ember.isEmpty(filterCols)) {
tables.push({
name: key,
columns: filterCols,

View File

@ -66,7 +66,7 @@ export default Ember.Component.extend({
const type = this.get("info.type"),
value = this.get("value");
if (Em.isEmpty(this.get("value"))) {
if (Ember.isEmpty(this.get("value"))) {
return this.get("info.nullable");
}

View File

@ -26,11 +26,11 @@ function transformedRelTable(table, modelClass) {
const QueryResultComponent = Ember.Component.extend({
layoutName: "explorer-query-result",
rows: Em.computed.alias("content.rows"),
columns: Em.computed.alias("content.columns"),
params: Em.computed.alias("content.params"),
explainText: Em.computed.alias("content.explain"),
hasExplain: Em.computed.notEmpty("content.explain"),
rows: Ember.computed.alias("content.rows"),
columns: Ember.computed.alias("content.columns"),
params: Ember.computed.alias("content.params"),
explainText: Ember.computed.alias("content.explain"),
hasExplain: Ember.computed.notEmpty("content.explain"),
@computed("content.result_count")
resultCount: function(count) {
@ -184,7 +184,7 @@ const QueryResultComponent = Ember.Component.extend({
document.body.appendChild(form);
form.submit();
Em.run.next("afterRender", function() {
Ember.run.next("afterRender", function() {
document.body.removeChild(form);
});
});

View File

@ -84,7 +84,6 @@ const QueryRowContentComponent = Ember.Component.extend(
(t.template || fallback)(ctx, params)
);
} catch (e) {
console.error(e);
return "error";
}
});

View File

@ -17,7 +17,7 @@ export default Ember.Controller.extend({
saveDisabled: Ember.computed.not("selectedItem.dirty"),
runDisabled: Ember.computed.alias("selectedItem.dirty"),
results: Em.computed.alias("selectedItem.results"),
results: Ember.computed.alias("selectedItem.results"),
asc: null,
order: null,
@ -25,10 +25,10 @@ export default Ember.Controller.extend({
everEditing: false,
showRecentQueries: true,
sortBy: ["last_run_at:desc"],
sortedQueries: Em.computed.sort("model", "sortBy"),
sortedQueries: Ember.computed.sort("model", "sortBy"),
@computed("search", "sortBy")
filteredContent(search) {
filteredContent() {
const regexp = new RegExp(this.get("search"), "i");
return this.get("sortedQueries").filter(function(result) {
return (

View File

@ -2,7 +2,7 @@ import ModalFunctionality from "discourse/mixins/modal-functionality";
import { popupAjaxError } from "discourse/lib/ajax-error";
export default Ember.Controller.extend(ModalFunctionality, {
notReady: Em.computed.not("ready"),
notReady: Ember.computed.not("ready"),
adminPluginsExplorer: Ember.inject.controller(),

View File

@ -12,10 +12,10 @@ export default function binarySearch(list, target, keyProp) {
while (min <= max) {
guess = Math.floor((min + max) / 2);
if (Em.get(list[guess], keyProperty) === target) {
if (Ember.get(list[guess], keyProperty) === target) {
return guess;
} else {
if (Em.get(list[guess], keyProperty) < target) {
if (Ember.get(list[guess], keyProperty) < target) {
min = guess + 1;
} else {
max = guess - 1;