Code Monkey home page Code Monkey logo

Comments (3)

emil10001 avatar emil10001 commented on July 20, 2024 1

After digging into it for a bit, I was finally able to get a config that worked for me. I think that this is more of a documentation issue for the sites pushing new users to install this tool-chain without really going over the details needed to be able to deploy a site.

Here's what I ended up with for a .jshintrc file:

{
"node": true,
"browser": true,
"bitwise": true,
"camelcase": false,
"curly": false,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": false,
"strict": false,
"trailing": false,
"smarttabs": true,
"globals":{"angular": false,"confirm":false,"CryptoJS":false}
}

I've probably turned off more than was necessary, but without much direction, I just needed something that would work.

from grunt-contrib-jshint.

jsoverson avatar jsoverson commented on July 20, 2024

The output shows that your config appears to be looking for a .jshintrc file in the root of your project, where your Gruntfile is, but it can not find it, hence the ENOENT error.

The fix would be to either place a global .jshintrc in your project's root, reference one of the dozen as your global in your default task configuration, or split up your jshint task configuration so that different directories are configured with the appropriate jshintrcs, eg

jshint : {
  dir1 : {
    src : 'app/dir1/**/*.js',
    options : {
      jshintrc : 'app/dir1/.jshintrc'
    }
  },
  dir2 : {
    src : 'app/dir2/**/*.js',
    options : {
      jshintrc : 'app/dir2/.jshintrc'
    }
  }
}

from grunt-contrib-jshint.

emil10001 avatar emil10001 commented on July 20, 2024

Hmm, ok, I'll give this a shot. I am really unclear as to what's supposed to have a .jshintrc file and what's not, and if there's one missing, what it is supposed to look like.

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.