Closed mistercoffee66 closed 8 years ago
@shinnn Could you elaborate? There's an ES6 arrow function on line 32 of gulp-eslint/index.js:32. Why would one instance compile fine and another not? There's no Babel or other transpiler in the project. According to http://node.green/ arrow funcs are supported near 100% in Node going back to 4.4.6. One of the machines not throwing an err has 4.2.2, lower than the machine throwing the error.
I must be missing something, since you closed it w/o reply, but I'm not sure what. Any guidance would be appreciated.
package.json
{
"name": "redacted",
"title": "redacted",
"version": "2.0.0",
"description": "front end build tools, including legacy and current",
"main": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"gulp": "./node_modules/gulp-cli/bin/gulp.js",
"generate": "./node_modules/generator/bin/index.js"
},
"author": "",
"devDependencies": {
"browser-sync": "^2.13.0",
"camelcase": "^3.0.0",
"eslint-formatter-pretty": "^0.3.1",
"fs-extra-promise": "^0.4.0",
"glob": "^7.0.5",
"gulp": "github:gulpjs/gulp#4.0",
"gulp-angular-templatecache": "^1.8.0",
"gulp-cli": "latest",
"gulp-concat": "^2.6.0",
"gulp-eslint": "^3.0.1",
"gulp-imagemin": "^2.4.0",
"gulp-less": "^3.0.5",
"gulp-load-plugins": "^1.1.0",
"gulp-ng-annotate": "^1.1.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.6.0",
"gulp-svg-sprite": "^1.3.3",
"gulp-template": "^4.0.0",
"gulp-uglify": "^1.5.1",
"gulp-util": "^3.0.7",
"gulp.spritesmith": "^6.2.1",
"imagemin-jpeg-recompress": "^4.3.0",
"less-plugin-glob": "^1.1.1",
"lodash": "^4.14.0",
"node-notifier": "^4.3.1",
"request": "^2.72.0",
"require-dir": "^0.3.0",
"yargs": "^3.30.0"
}
}
eslint config
{
"extends": "eslint:recommended",
"rules": {
"no-alert": 1,
"no-bitwise": 0,
"camelcase": 1,
"curly": 0,
"eqeqeq": 0,
"no-eq-null": 0,
"guard-for-in": 1,
"no-empty": 1,
"no-unused-vars": 1,
"no-console": 1,
"no-mixed-spaces-and-tabs": 0
},
"globals": {
"$": true,
"angular": true,
"App": true,
"MainController": true,
"Modernizr": true
},
"env": {
"browser": true,
"node": false
}
}
gulp task
var gulp = require('gulp'),
config = require('../config'),
packages = require('../packages'),
plugins = require('../plugins'),
utils = require('../utils');
gulp.task('js:app',function(){
utils.logImportant('begin js:app');
return gulp.src([config.paths.src + config.paths.appDir + '/**/*.js'])
.pipe(plugins.eslint('./gulp_components/eslint.json'))
.pipe(plugins.eslint.format('node_modules/eslint-formatter-pretty'))
.pipe(plugins.eslint.results(function(results){
if (results.errorCount > 0) {
packages.nodeNotifier.notify({
'title': results.errorCount + ' ERRORS FOUND',
'message': 'see terminal for details',
'wait': true,
'priority': 2
});
process.env.errors = true;
}
else {
process.env.errors = false;
}
}))
//.pipe(plugins.eslint.format())
.pipe(plugins.sourcemaps.init())
.pipe(plugins.concat('app.min.js'))
.pipe(plugins.ngAnnotate())
.pipe(plugins.uglify())
.pipe(plugins.sourcemaps.write('.'))
.pipe(gulp.dest(process.env.target));
});
you closed it w/o reply
You're missing https://github.com/adametry/gulp-eslint/issues/175#issuecomment-244254081.
We can dig into the problem further by spending our precious lifetime, if:
However, I still want you to read and understand https://github.com/adametry/gulp-eslint/issues/175#issuecomment-244254081.
Ouch. Well, based on your comment, you're misunderstanding the question. No worries, time to move on.
If the issue reporter doesn't satisfy the demand for the error-reproducible repository, this issue will never be fixed. Fragments of the code pasted in https://github.com/adametry/gulp-eslint/issues/175#issuecomment-244270928 don't help investigating the problem.
Using latest gulp-eslint with gulp 4.0. On a couple of OSX machines, no problems. On another with identical setup and same package.json, getting the following:
Looking at mismatch version of gulp-cli, but that doesn't seem to be the case. Any thoughts? Thanks!