Code Monkey home page Code Monkey logo

Comments (4)

netpoetica avatar netpoetica commented on July 20, 2024

It looks like these are user-specified properties to pass to watchers, and are not parsed in your scripts. I'm going to close this issue because this isn't really a problem you guys should address as much as a problem with people polluting config objects. I wonder if this is a common thing to do? If there's anything you feel would be valuable to someone else who might stumble across this issue feel free to post about it!

from grunt-contrib-jshint.

shama avatar shama commented on July 20, 2024

Those are targets which can be named however the author chooses. This allows for more fine grained control as the jshint task in that Gruntfile.js can be ran like grunt jshint:gruntfile or grunt jshint:lib_test. options can be set at the task level (applies to all targets) or target level, as only applies to that target.

from grunt-contrib-jshint.

netpoetica avatar netpoetica commented on July 20, 2024

Gotcha, thanks for the link. When you call grunt jshint:gruntfile, does it run jshint with all of the jshint options but only on that source? It's not very clear from looking at the source that the JS hint task will just kick in on those. For example, could someone do something like:

jshint: {
      options: {
        node : true,
        curly: true,
        eqeqeq: true,
        immed: true,
        latedef: true,
        newcap: true,
        noarg: true,
        sub: true,
        undef: true,
        unused: true,
        boss: true,
        eqnull: true,
        globals: {}
      },
      gruntfile: {
        src: 'Gruntfile.js',
        options: {
           eqeqeq: false
        }
      }
}

with the task grunt jshint:gruntfile, and the one option would override the default options but the rest would cascade? I'm imagining these things to be more like sub-tasks. But from the looks of the usage I'm seeing, the user is basically just storing properties in an arbitrary namespace that really has nothing to do with the jshint task?

from grunt-contrib-jshint.

shama avatar shama commented on July 20, 2024

Yes the options work as you've indicated. I wouldn't necessarily call targets "sub-tasks". They're more akin to make targets in a traditional makefile. A good example, imo, is a dev and prod setup. You may only want to target certain files (and options) per task based on the operation you're doing.

from grunt-contrib-jshint.

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.