You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered this while running the codeclimate-watson engine. Here's the full error:
error: (JSON::ParserError) 757: unexpected token at 'Oh Dear! I wasn't able to save the following files:
app/utils/observers.js
A possible cause is having all the source code commented.
If that's not the problem please fill a report with the hospital directors
at https://github.com/abuiles/ember-watson/issues.
{"type":"Issue","check_name":"transformEmberDataModelLookups","description":"Convert Ember Data model lookups to use a dasherized string","categories":["Style"],"location":{"path":"app/components/agent-claim.js","lines":{"begin":1,"end":1}}}'
Here's the contents of the file:
import Ember from 'ember';
function getArgs(args) {
return {
time: args.slice(-1)[0],
func: args.slice(-2, -1)[0],
keys: args.slice(0, -2)
};
}
export default {
debouncedObserver: function (...args) {
const { time, func, keys } = getArgs(args);
return Ember.observer(...keys, function () {
Ember.run.debounce(this, func, time);
});
},
throttledObserver: function (...args) {
const { time, func, keys } = getArgs(args);
return Ember.observer(...keys, function () {
Ember.run.throttle(this, func, time);
});
}
};
Thoughts?
The text was updated successfully, but these errors were encountered:
I encountered this while running the codeclimate-watson engine. Here's the full error:
Here's the contents of the file:
Thoughts?
The text was updated successfully, but these errors were encountered: