Angularjs grunt jshint角度服务丢失';新';调用构造函数时的前缀 Gruntile

Angularjs grunt jshint角度服务丢失';新';调用构造函数时的前缀 Gruntile,angularjs,gruntjs,jshint,grunt-contrib-jshint,Angularjs,Gruntjs,Jshint,Grunt Contrib Jshint,我不确定您是否有jshint配置对象。这是我在npm和grunt contrib jshint中使用的模式 也许可以用grunt contrib jshint软件包试一试这个问题我更新了我设置为true而不是false的问题:) module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // This line makes your node configura

我不确定您是否有jshint配置对象。这是我在npm和grunt contrib jshint中使用的模式


也许可以用grunt contrib jshint软件包试一试这个问题

我更新了我设置为true而不是false的问题:)
module.exports = function(grunt) {

    // Project configuration.
    grunt.initConfig({
        // This line makes your node configurations available for use
        pkg: grunt.file.readJSON('package.json'),
        banner:
            '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
            '<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
            ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>;\n' +
            ' * Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n */\n',
        src: {
            js: ['src/**/*.js']
        },
        // This is where we configure JSHint
        jshint: {
           myFiles: ['gruntFile.js', '<%= src.js %>'],
           options:{
                newcap:true,
                globals:{}
           } 
        }
    });
    // Each plugin must be loaded following this pattern
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.registerTask('default', ['jshint']);

};
options:{
    newcap:false,
    globals:{}
} 
    jshint: {
        options: {
            jshintrc: 'jshintrc'
        },
        main: {
            src: [
                'app/js/**/*.js',
                'test/unit/**/*.js'
            ]
        }
    },