Code Monkey home page Code Monkey logo

Comments (10)

bclinkinbeard avatar bclinkinbeard commented on July 20, 2024

Just discovered this syntax works, so maybe the README just needs to be updated?

files: {
    src: ['./Gruntfile.js', '<%= cfg.js_src %>', '!<%= cfg.libs_dir %>/**']
}

from grunt-contrib-jshint.

shama avatar shama commented on July 20, 2024

Sorry I'm not seeing where in the docs it's attempting that syntax. Could you point where in the examples the error is? https://github.com/gruntjs/grunt-contrib-jshint/blob/master/docs/jshint-examples.md

Using files is usually for multiple src-dest mappings: http://gruntjs.com/configuring-tasks#files-object-format

I find it easiest to just do one of these formats:

jshint: {
  target: {
    src: ['Gruntfile.js']
  },
  target2: ['Gruntfile.js']
}

from grunt-contrib-jshint.

bclinkinbeard avatar bclinkinbeard commented on July 20, 2024

Ah, sorry, I was looking at the last example on https://npmjs.org/package/grunt-contrib-jshint, which I thought was pulled from the Github README, but now I see that is not the case.

from grunt-contrib-jshint.

shama avatar shama commented on July 20, 2024

Ah ha... yeah the npm readmes are from the last npm published version of the github readme. That was a change we reverted but never published. I just published as 0.4.0 and so that readme should be updated soon. Thanks for reporting!

from grunt-contrib-jshint.

mtpultz avatar mtpultz commented on July 20, 2024

Not sure if it matters, but npm still has the syntax example for ignoring specific files using files: [array of files] and not src: [array of files]. I was having the same issue as bclinkinbeard.

from grunt-contrib-jshint.

shama avatar shama commented on July 20, 2024

Thanks @mtpultz. Removed that example from the docs. npm should get updated (for real this time) upon next publish.

from grunt-contrib-jshint.

wkeese avatar wkeese commented on July 20, 2024

@mtpultz / @shama, how do you ignore files by using src: [ ... ]?

from grunt-contrib-jshint.

shama avatar shama commented on July 20, 2024

@wkeese By using negate ! at the beginning of a pattern: http://gruntjs.com/configuring-tasks#globbing-patterns

from grunt-contrib-jshint.

wkeese avatar wkeese commented on July 20, 2024

Ah, I see, thanks!

from grunt-contrib-jshint.

ccorcos avatar ccorcos commented on July 20, 2024

Im confused -- what about the files array format? http://gruntjs.com/configuring-tasks#files-array-format

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.