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

Disable jshint #7

Closed
topaxi opened this issue Apr 15, 2015 · 14 comments
Closed

Disable jshint #7

topaxi opened this issue Apr 15, 2015 · 14 comments

Comments

@topaxi
Copy link

topaxi commented Apr 15, 2015

Probably more a question, but after googling around without luck...
Is there a way to disable only the jshint tests?

var app = EmberApp({
  'hinting': false
})

Seems to disable both, jshint and jslint.

Maybe this belongs more into ember-cli, I'm not sure.

@jonathanKingston
Copy link
Member

@topaxi linting comes from both ember-cli-mocha/qunit currently so it might belong as a flag in ember-cli however would trickle down to those two. Either way there is a ticket raised on ember-cli-mocha:
ember-cli/ember-cli-mocha#44

It is mostly out of my control however you can turn jshint off with code comments: /* jshint ignore: start */ however this is not brilliant.

I'm likely going to raise this as a formal RFC with ember-cli if there continues to be little notice as @teddyzeenny seems to be interested from past comments and his changes to Ember inspector: emberjs/ember-inspector@b8f6226

@jonathanKingston
Copy link
Member

@topaxi just chiming in with an update here so you are fully aware. I raised the following: ember-cli/rfcs#15 which would be great if you could provide feedback on if you have any.

@mmahalwy
Copy link

@jonathanKingston any update on this?

@jonathanKingston
Copy link
Member

@mmahalwy I think time is the limiting factor here sorry. I'm probably going to submit a patch to ember-cli soon so long as @stefanpenner is ok with that.

@yagni
Copy link

yagni commented Oct 8, 2015

The next release of ember-cli-qunit will support the 'useLintTree' option (see here for relevant pull request) for disabling the JSHint test generation. When it's released, something like this should do the trick:

var app = new EmberApp({
  "ember-cli-qunit": {
    useLintTree: false
  }
});

@mmahalwy
Copy link

mmahalwy commented Oct 9, 2015

@yagni any idea when it will be released?

@yagni
Copy link

yagni commented Oct 9, 2015

@mmahalwy Unfortunately no, but it looks like they have a history of monthly releases, so I bet one is due any day now. I'll post here when I notice one.

@yagni
Copy link

yagni commented Nov 10, 2015

Great news: a new version of ember-cli-qunit has been released and useLintTree works great! See the readme at https://github.com/ember-cli/ember-cli-qunit for an example of how to use it to disable JSHint. Should be able to close this one now.

@topaxi topaxi closed this as completed Dec 30, 2015
@nybblr
Copy link

nybblr commented Mar 3, 2016

@jonathanKingston is this still in progress for ember-cli-mocha, or maybe I've missed the good tidings on another issue?

I'm using ember-cli-eslint + ember-cli-mocha; an (old) version of eslint is used during builds, but ember test continues to generate jshint tests.

@jonathanKingston
Copy link
Member

So the good news is all the test libraries were fixed to turn this off if you set this setting:
https://github.com/switchfly/ember-cli-mocha#turning-off-jshint-linting

I think there was some mention by @topaxi to set this to false if a addon like ember-cli-eslint has it's own linting, however I don't know if that went any further than discussion.

@nybblr
Copy link

nybblr commented Mar 4, 2016

Gotcha, I'm using that setting currently but it turns off all linting in the test suite, including eslint. Was hoping I could have eslint run in the test suite with Mocha =)

@jonathanKingston
Copy link
Member

@nybblr I have not tested it extensively however it should work with Mocha as that was my old setup I was using regular.
Are you mixing this up with the general turn off linting flag?

@nybblr
Copy link

nybblr commented Mar 4, 2016

@jonathanKingston Hmm, maybe I am? Here's my setup:

var EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    sassOptions: {
      includePaths: [
        'bower_components'
      ]
    },
    babel: {
      includePolyfill: true
    },
    'ember-cli-mocha': {
      useLintTree: false
    }
  });

  return app.toTree();
};

My package.json has:

    "ember-cli-mocha": "^0.10.0",
    "ember-cli-eslint": "1.2.1",

The useLintTree seems to turn off all linting, but removing that flag still runs JSHint specs in ember test. Anything obvious?

@jonathanKingston
Copy link
Member

@nybblr nothing obvious sorry, can you raise another bug with ember-cli-mocha and reference this and me?

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

5 participants