Questions tagged [gulp-eslint]

18 questions
14
votes
1 answer

How to switch output from task to task

Is it possible to switch Gulp's output between tasks? For example, I'd like to run my build task continuously and see its output by default, and I want to be able to replace build's output with eslint's output, but only if such occurs. So, I can see…
askhat
  • 59
  • 2
  • 19
6
votes
1 answer

Eslint Error while working with Trails js

I am using Eslint to lint the code of my Trails.js project before testing it. Tails.js comes with existing pre-configurations eslint-config-trails. However, when I am testing my code eslint throws a Definition for rule 'no-global-assign' was not…
Lando-L
  • 843
  • 6
  • 19
4
votes
2 answers

gulp-eslint: How to configure the "no-use-before-define" rule

I'm trying to turn off the "no-use-before-define" rule for functions, but leave it active for variables and classes. In the documentation found here http://eslint.org/docs/rules/no-use-before-define it says that this is the correct configuration…
Daniel Tonon
  • 9,261
  • 5
  • 61
  • 64
3
votes
0 answers

How to find ES6 code using gulp-eslint (error only es6 code -no other rules needed)

gulp.task('lint', () => { return gulp.src(['**/*.js']) .pipe(eslint({ rules: {'rule1': 1,'rule2': 2}, envs: [{ "es6": false }] })) .pipe(eslint.format()) …
2
votes
1 answer

Troubles with using gulp-eslint

Im trying to add gulp-eslint to my build process, having gulp watch my files and run eslint whenever a file is changed. However, I am getting an error that says: D:\code\project\node_modules\gulp-eslint\index.js:4 const {CLIEngine} =…
Sidd Menon
  • 856
  • 6
  • 18
1
vote
1 answer

gulp-eslint fails to parse optional chaining syntax

I'm trying to lint JavaScript code with optional chaining syntax like: let foo = bar?.property; When parsing my JS files with eslint explicitly, it passes. When parsing with gulp-eslint using the same configuration, linting fails with: Parsing…
Ted Nyberg
  • 7,001
  • 7
  • 41
  • 72
1
vote
1 answer

Gulp swallowing eslint output if there are too many files

Consider the following gulp file: var gulp = require('gulp'); var eslint = require('gulp-eslint'); var debug = require('gulp-debug'); gulp.task('lint', function (done) { gulp .src([ 'src/**/*.js', …
Jerome Reinländer
  • 1,227
  • 1
  • 10
  • 26
1
vote
1 answer

Break from underscore loop with lint issues

Below is the code, trying to break the loop once the result is found by returning true ngModel.$parsers.unshift(function (viewValue) { let names = scope.vm.names; _.find(names, function (elem) { …
Mithun Shreevatsa
  • 3,588
  • 9
  • 50
  • 95
1
vote
1 answer

gulp-eslint: TypeError: (0 , _eslint2.default) is not a function

Trying to run eslint with gulp and getting this error. What have I missed? Here's my gulpfile.bable.js file. import gulp from 'gulp'; import eslint from 'eslint'; const jsFiles = ['*.js', 'src/**/*.js']; gulp.task('lint', () => { …
LoneWolfPR
  • 3,978
  • 12
  • 48
  • 84
0
votes
1 answer

Environment key "es2021" is unknown

Sorry for repeating the question, but I am a rookie and didn't understand how to solve this problem. Please, if it is not difficult, describe in more detail how to solve this problem. I'm creating my learning project using the 2017 textbook and…
GeKtoRiX
  • 31
  • 1
  • 4
0
votes
1 answer

gulp-eslint not outputting to file - unable to properly configure writableStream

Issue - User cannot get output to print to file for gulp-lint process Documentation Reference It is observed in the documentation that a writeableStream is a valid configuration, but regrettably it does not denote or provide clarification on how to…
Jason Wolf
  • 36
  • 2
0
votes
1 answer

gulp-eslint not linting .js files inside of a dot directory

I have .js files inside of a dot directory that are not being linted by gulp-eslint. Example: .foo/file1.js I've confirmed that the glob is picking up the files inside of the dot directory. gulp-eslint is passing successfully for the files inside of…
Zach B
  • 534
  • 7
  • 25
0
votes
1 answer

TypeError: Error while loading rule 'react/jsx-key': ruleCreator is not a function

What does this error mean? And how do I resolve it?: /home/jmunsch/PycharmProjects/testing/node_modules/gulp-eslint/node_modules/eslint/lib/eslint.js:706 throw ex; ^ TypeError: Error while loading rule…
jmunsch
  • 22,771
  • 11
  • 93
  • 114
0
votes
1 answer

Gulp-eslint throws errors on dynamically loaded JSs

I have a project structure like There are approx 10 JS files in com. lab1 and lab2 has a config.json file which tells, out of 10 files which files to be concatenated and placed as app-min.js in dist/lab1 or dist/lab2. In the gulp file I've created…
Govinda
  • 1,031
  • 8
  • 11
0
votes
1 answer

JSX Support doesn't work anymore with gulp-eslint 5.0.0

I have upgraded to current gulp-eslint version 5.0.0. When i now try to lint my code i get usual errors at the beginning of my JSX code: 127:26 error Parsing error: Unexpected token = I assumed it's an issue with eslint by itself. So i tried to…
smonkey
  • 195
  • 2
  • 7
1
2