Skip to content

Commit

Permalink
Consistent quotes style
Browse files Browse the repository at this point in the history
  • Loading branch information
vlazar committed Jun 24, 2016
1 parent f30069c commit cb8868f
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ rules:
prefer-reflect: 0
quote-props: 0
quotes:
- 0
- 2
- double
- avoid-escape
radix: 0
require-yield: 0
semi: 0
Expand Down
12 changes: 6 additions & 6 deletions awesomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var _ = function (input, o) {

$.bind(this.input, {
"input": this.evaluate.bind(this),
"blur": this.close.bind(this, { reason: 'blur' }),
"blur": this.close.bind(this, { reason: "blur" }),
"keydown": function(evt) {
var c = evt.keyCode;

Expand All @@ -67,7 +67,7 @@ var _ = function (input, o) {
me.select();
}
else if (c === 27) { // Esc
me.close({ reason: 'esc' });
me.close({ reason: "esc" });
}
else if (c === 38 || c === 40) { // Down/Up arrow
evt.preventDefault();
Expand All @@ -77,7 +77,7 @@ var _ = function (input, o) {
}
});

$.bind(this.input.form, {"submit": this.close.bind(this, { reason: 'submit' })});
$.bind(this.input.form, {"submit": this.close.bind(this, { reason: "submit" })});

$.bind(this.ul, {"mousedown": function(evt) {
var li = evt.target;
Expand Down Expand Up @@ -216,7 +216,7 @@ _.prototype = {

if (allowed) {
this.replace(suggestion);
this.close({ reason: 'select' });
this.close({ reason: "select" });
$.fire(this.input, "awesomplete-selectcomplete", {
text: suggestion
});
Expand Down Expand Up @@ -248,13 +248,13 @@ _.prototype = {
});

if (this.ul.children.length === 0) {
this.close({ reason: 'nomatches' });
this.close({ reason: "nomatches" });
} else {
this.open();
}
}
else {
this.close({ reason: 'nomatches' });
this.close({ reason: "nomatches" });
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/api/closeSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("awesomplete.close", function () {
this.subject.close();

expect(handler).toHaveBeenCalledWith(
jasmine.any(document.createEvent('HTMLEvents').constructor)
jasmine.any(document.createEvent("HTMLEvents").constructor)
);
});

Expand Down
4 changes: 2 additions & 2 deletions test/api/evaluateSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("awesomplete.evaluate", function () {
this.subject.evaluate();

expect(this.subject.close).toHaveBeenCalledWith({
reason: 'nomatches'
reason: "nomatches"
});
});
});
Expand All @@ -31,7 +31,7 @@ describe("awesomplete.evaluate", function () {
this.subject.evaluate();

expect(this.subject.close).toHaveBeenCalledWith({
reason: 'nomatches'
reason: "nomatches"
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/api/selectSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe("awesomplete.select", function () {
this.subject.select(this.selectArgument);

expect(this.subject.close).toHaveBeenCalledWith({
reason: 'select'
reason: "select"
});
});

Expand Down
4 changes: 2 additions & 2 deletions test/events/blurSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ describe("blur event", function () {
spyOn(Awesomplete.prototype, "close");
$.fire(this.subject.input, "blur");
expect(Awesomplete.prototype.close).toHaveBeenCalledWith(
{ reason: 'blur' },
jasmine.any(document.createEvent('HTMLEvents').constructor)
{ reason: "blur" },
jasmine.any(document.createEvent("HTMLEvents").constructor)
);
});
});
2 changes: 1 addition & 1 deletion test/events/keydownSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe("keydown event", function () {
$.keydown(this.subject.input, $.k.ESC);

expect(this.subject.close).toHaveBeenCalledWith({
reason: 'esc'
reason: "esc"
});
});

Expand Down
4 changes: 2 additions & 2 deletions test/events/submitSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ describe("form submit event", function () {
$.on(this.subject.input.form, "submit", function (evt) { evt.preventDefault() });
$.fire(this.subject.input.form, "submit");
expect(Awesomplete.prototype.close).toHaveBeenCalledWith(
{ reason: 'submit' },
jasmine.any(document.createEvent('HTMLEvents').constructor)
{ reason: "submit" },
jasmine.any(document.createEvent("HTMLEvents").constructor)
);
});
});

0 comments on commit cb8868f

Please sign in to comment.