Skip to content
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

ES6: Migrate "audio" with proper logging #925

Merged
merged 13 commits into from
Mar 22, 2017
Merged

ES6: Migrate "audio" with proper logging #925

merged 13 commits into from
Mar 22, 2017

Conversation

bennycode
Copy link
Contributor

Type of change

Screenshot

else if (this.audio_preference() === z.audio.AudioPreference.SOME && !(z.audio.AudioPlayingType.SOME.includes(audio_id))) {
reject(new z.audio.AudioError(z.audio.AudioError.prototype.TYPE.IGNORED_SOUND));
}
else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://eslint.org/docs/rules/brace-style we should have the 1tbs :)

if (...) {
  ...
} else if (...) {
  ...
} else {
 ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as it can be done automatically, I am fine with it. :-)


(function() {
function AudioError(type) {
this.name = this.constructor.name;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cant we use es6 classes here?

'use strict';

(function() {
window.z = window.z || {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u can remove the self executing fucntion

@@ -13,6 +13,7 @@ globals:
z: true

rules:
brace-style: [2, 1tbs]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bennycode bennycode merged commit fad99f3 into dev Mar 22, 2017
@bennycode bennycode deleted the es6-audio branch March 22, 2017 16:33
@lipis lipis mentioned this pull request Mar 23, 2017
79 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants