Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

useLintTree: false breaks the app if Babel is used #83

Closed
voltidev opened this issue Oct 10, 2015 · 4 comments
Closed

useLintTree: false breaks the app if Babel is used #83

voltidev opened this issue Oct 10, 2015 · 4 comments

Comments

@voltidev
Copy link

I've tried useLintTree: false option like this:

  var app = new EmberApp(defaults, {
    'ember-cli-qunit': {
      useLintTree: false
    },

Before that the build file contented module definitions like this:

define('widget/tests/authenticators/jwt.jshint', function () {
  'use strict';
  QUnit.module('JSHint - authenticators');
  QUnit.test('authenticators/jwt.js should pass jshint', function(assert) { 
    assert.ok(true, 'authenticators/jwt.js should pass jshint.'); 
  });
});

After I set useLintTree to false, the build didn't content the widget/tests/authenticators/jwt.jshint, but instead it contented something like that:

define('widget/tests/authenticators/jwt', ['exports', 'ember', 'ember-ajax', 'ember-simple-auth/authenticators/base'], function (exports, Ember, ajax, Base) {
  'use strict';
  const {RSVP} = Ember['default'];
  // ...

As you can see it contents ES6 syntax that is invalid for most of current browsers. Without the option the build file contents only JS code transformed with Babel.

The widget/tests/authenticators/jwt in this case will content application module code from app/authenticators/jwt

@swalkinshaw
Copy link

Just reporting that I've gotten the same problem trying out ember-cli-qunit#master.

@yagni
Copy link

yagni commented Nov 3, 2015

If the next version of ember-cli-qunit will drop with the next version of ember-cli, we can just return false from lintTree when useLintTree is false. Current ember-cli master ignores any lintTree hooks that return false. Not sure what the roadmap looks like, though.

@ghost
Copy link

ghost commented Nov 6, 2015

I need this to work, so i'll have a shot at fixing this today. Hints are welcome. (@rwjblue)

@rwjblue
Copy link
Member

rwjblue commented Dec 14, 2015

I think this was fixed by #87. Closing for now...

@rwjblue rwjblue closed this as completed Dec 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants