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

Oh Dear! I wasn't able to save the following files... #72

Open
elwayman02 opened this issue Aug 14, 2015 · 2 comments
Open

Oh Dear! I wasn't able to save the following files... #72

elwayman02 opened this issue Aug 14, 2015 · 2 comments

Comments

@elwayman02
Copy link

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?

@alexlafroscia
Copy link

Looks like the same problem that I'm having with #90

@apengstrom
Copy link

We are also having this issue with one of our ember projects that we just set up with Watson today. I have to disable it for now.

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

No branches or pull requests

3 participants