Coder Social home page Coder Social logo

Disable jshint about ember-cli-eslint HOT 14 CLOSED

ember-cli avatar ember-cli commented on June 15, 2024
Disable jshint

from ember-cli-eslint.

Comments (14)

nybblr avatar nybblr commented on June 15, 2024 1

@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.

from ember-cli-eslint.

jonathanKingston avatar jonathanKingston commented on June 15, 2024

@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

from ember-cli-eslint.

jonathanKingston avatar jonathanKingston commented on June 15, 2024

@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.

from ember-cli-eslint.

mmahalwy avatar mmahalwy commented on June 15, 2024

@jonathanKingston any update on this?

from ember-cli-eslint.

jonathanKingston avatar jonathanKingston commented on June 15, 2024

@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.

from ember-cli-eslint.

yagni avatar yagni commented on June 15, 2024

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
  }
});

from ember-cli-eslint.

mmahalwy avatar mmahalwy commented on June 15, 2024

@yagni any idea when it will be released?

from ember-cli-eslint.

yagni avatar yagni commented on June 15, 2024

@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.

from ember-cli-eslint.

yagni avatar yagni commented on June 15, 2024

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.

from ember-cli-eslint.

jonathanKingston avatar jonathanKingston commented on June 15, 2024

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.

from ember-cli-eslint.

nybblr avatar nybblr commented on June 15, 2024

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 =)

from ember-cli-eslint.

jonathanKingston avatar jonathanKingston commented on June 15, 2024

@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?

from ember-cli-eslint.

nybblr avatar nybblr commented on June 15, 2024

@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?

from ember-cli-eslint.

jonathanKingston avatar jonathanKingston commented on June 15, 2024

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

from ember-cli-eslint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.