Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: 1.7.14.9 – ERROR LINTING WITH GULP #25895
    Jonathan
    Participant

    Hi Zac! 🙂 Greetings from Venezuela (though I’m currently living in Chile).

    I’m sorry; I’m kinda sleepy, this is the problem I’m having, take a look! It’s kinda working, but not as it’s supposed to?

    Following the video completely, I installed the gulp-eslint package and followed all directions.

    If I modify an Js file while gulp is running, it throws this error:

    
    [11:45:05] Starting 'bundlejs'...
    /Users/Mistwalker/Desktop/gurupu/node_modules/eslint/lib/config.js:170
                throw noConfigError;
                ^
    
    Error: No ESLint configuration found.
        at getLocalConfig (/Users/Mistwalker/Desktop/gurupu/node_modules/eslint/lib/config.js:162:35)
        at Config.getConfig (/Users/Mistwalker/Desktop/gurupu/node_modules/eslint/lib/config.js:260:26)
        at processText (/Users/Mistwalker/Desktop/gurupu/node_modules/eslint/lib/cli-engine.js:224:33)
        at CLIEngine.executeOnText (/Users/Mistwalker/Desktop/gurupu/node_modules/eslint/lib/cli-engine.js:754:26)
        at verify (/Users/Mistwalker/Desktop/gurupu/node_modules/gulp-eslint/index.js:20:25)
        at Transform._transform (/Users/Mistwalker/Desktop/gurupu/node_modules/gulp-eslint/index.js:70:17)
        at Transform._read (_stream_transform.js:167:10)
        at Transform._write (_stream_transform.js:155:12)
        at doWrite (_stream_writable.js:300:12)
        at writeOrBuffer (_stream_writable.js:286:5)
    

    I haven’t touched anything but adding another number in the console log @ app.js:23

    
    console.log( 'Testing 1,2,3,4' );
    

    But whenever I add this code to the package.json

    
      "eslintConfig": {
        "eslintConfig": {
          "env": {
            "no-unused-vars": ["error", { "vars": "all" }]
          }
        }
      },
    

    And add another number to app.js:23

    
    console.log( 'Testing 1,2,3,4,5' );
    

    It works.

    In other words, without the eslintConfig part, the eslint won’t work with my project! Shouldn’t it be working without that snippet?

    in reply to: 1.7.14.9 – ERROR LINTING WITH GULP #25883
    Jonathan
    Participant

    Nevermind, it kinda worked but the console outputs this:

    
    [11:28:49] Starting 'bundlejs'...
    [11:28:49] 
    /Users/Mistwalker/Desktop/gurupu/src/js/app.js
      10:18  error  Parsing error: Unexpected token {
    
    ✖ 1 problem (1 error, 0 warnings)
    
    stream.js:74
          throw er; // Unhandled stream error in pipe.
          ^
    GulpUglifyError: unable to minify JavaScript
        at createError (/Users/Mistwalker/Desktop/gurupu/node_modules/gulp-uglify/lib/create-error.js:6:14)
        at wrapper (/Users/Mistwalker/Desktop/gurupu/node_modules/gulp-uglify/node_modules/lodash/_createHybrid.js:87:15)
        at trycatch (/Users/Mistwalker/Desktop/gurupu/node_modules/gulp-uglify/minifier.js:26:12)
        at DestroyableTransform.minify [as _transform] (/Users/Mistwalker/Desktop/gurupu/node_modules/gulp-uglify/minifier.js:79:19)
        at DestroyableTransform.Transform._read (/Users/Mistwalker/Desktop/gurupu/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:159:10)
        at DestroyableTransform.Transform._write (/Users/Mistwalker/Desktop/gurupu/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:147:83)
        at doWrite (/Users/Mistwalker/Desktop/gurupu/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:338:64)
        at writeOrBuffer (/Users/Mistwalker/Desktop/gurupu/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:327:5)
        at DestroyableTransform.Writable.write (/Users/Mistwalker/Desktop/gurupu/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:264:11)
        at DestroyableTransform.ondata (stream.js:31:26)
    
Viewing 2 posts - 1 through 2 (of 2 total)