-
Notifications
You must be signed in to change notification settings - Fork 292
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
Conversation
app/script/audio/AudioRepository.js
Outdated
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 { |
There was a problem hiding this comment.
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 {
...
}
There was a problem hiding this comment.
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. :-)
app/script/audio/AudioError.js
Outdated
|
||
(function() { | ||
function AudioError(type) { | ||
this.name = this.constructor.name; |
There was a problem hiding this comment.
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?
app/script/audio/AudioRepository.js
Outdated
'use strict'; | ||
|
||
(function() { | ||
window.z = window.z || {}; |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Type of change
Screenshot