2017-01-06 4 views
0

実行 "jshint:すべて"(jshint)タスク平均いくつかのエラーを示すスタックイサキ '関数名()' だった使用が定義された前

modules/codes/client/config/codes.client.config.js 
     6 | function menuConfig(menuService) { 
           ^'menuConfig' was used before it was defined. 
    modules/codes/client/config/codes.client.routes.js 
     6 | function routeConfig($stateProvider) { 
           ^'routeConfig' was used before it was defined. 
    58 | function getCode($stateParams, CodesService) { 
          ^'getCode' was used before it was defined. 
    65 | function newCode(CodesService) { 
          ^'newCode' was used before it was defined. 
    modules/codes/client/controllers/codes.client.controller.js 
    11 | function CodesController ($scope, $state, $window, Authentication, code) { 
            ^'CodesController' was used before it was defined. 
    22 | function remove() { 
          ^'remove' was used before it was defined. 
    29 | function save(isValid) { 
         ^'save' was used before it was defined. 
    42 |  function successCallback(res) { 
            ^'successCallback' was used before it was defined. 
    48 |  function errorCallback(res) { 
            ^'errorCallback' was used before it was defined. 
    modules/codes/client/controllers/list-codes.client.controller.js 
    10 | function CodesListController(CodesService) { 
            ^'CodesListController' was used before it was defined. 
    modules/codes/client/services/codes.client.service.js 
    11 | function CodesService($resource) { 
           ^'CodesService' was used before it was defined. 

>> 11 errors in 99 files 

私は、にMongoDBを使用してMEANスタックアプリケーションを作成Express、yo meanjs、nodejs、gruntと私はを使用してモジュールを作成します。meanjs:crud-module myModuleName、それも作成され、アプリメニューにも表示されますが、私はgruntコマンドを実行しているとき、コンソールは404エラーを返します。私のコードはここにあります..

}());

答えて

0

おそらく発電機に問題があります。あなたが見ている リンティングエラーがhere

は、あなたがjshint設定ファイル(通常は名前の.jshintrc)を見つける必要があり、それをバイパスラインに
"latedef" : true, を見つけて、それはdoesnの場合は、それを "latedef" : "nofunc",に変更したり追加するには定義されています存在しない。

私の考えでは、巻上げは機能よりも変数にとって危険ですから、これは安全な操作でなければなりません。

関連する問題