question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eslint hangs after linting is complete

See original GitHub issue

Running on Windows 7

  • ESLint Version: 4.19.1
  • Node Version: 6.11.2
  • npm Version: 3.10.10

What parser (default, Babel-ESLint, etc.) are you using? Babel-ESLint,

Please show your full configuration:

Configuration
{
  "extends": [
    "eslint:recommended",
    "airbnb",
    "plugin:react/recommended",
    "plugin:jsx-a11y/recommended",
    "plugin:import/errors",
    "plugin:import/warnings",
    "prettier",
    "prettier/react"
  ],
  "plugins": ["react", "jsx-a11y", "import", "prettier"],
  "parser": "babel-eslint",
  "env": {
    "es6": true,
    "node": true,
    "browser": true
  },
  "rules": {
    "prettier/prettier": [
      "error",
      {
        "singleQuote": true,
        "printWidth": 120
      }
    ],
    // This is just a ridiculous rule
    "no-console": 0,    
    // Don't enforce .jsx extension
    "react/jsx-filename-extension": 0,
    // These rules make if statements less logical
    "no-lonely-if": 0,
    "no-else-return": 0,
    // Allow imports from dev dependencies
    "import/no-extraneous-dependencies": [
      "error",
      {
        "devDependencies": true
      }
    ],
    // Allow importing with full file extension
    "import/extensions": 0,
    // At least allow properties of function arguments to be set:
    "no-param-reassign": [2, { "props": false }],    
    "consistent-return": 0,
    "linebreak-style": 0
  },
  "settings": {
    "import/ignore": ["node_modules"],
    "import/resolver": {
      "webpack": {
        "config": "webpack/dev.conf.js"
      }
    }
  }
}

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

node_modules/.bin/eslint --debug src 

What did you expect to happen? Eslint would evenutally finish linting and present a summary of linting issues,

What actually happened? Please include the actual, raw output from ESLint. Debug output shows eslint finding each file. Final line it prints is:

eslint:cli-engine Linting complete in: 100222ms

And then the command hangs and I need to crtl-c to exit. There are no warnings or errors in the rest of the debug output.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

20reactions
golineycommented, May 15, 2018

Once I deleted coverage folder that was created with jest --coverage, eslint has bounced back to normal.

4reactions
platinumazurecommented, May 15, 2018

@goliney Maybe in your case, ESLint is trying to glob through the coverage folder to find files to lint. Try adding coverage to an .eslintignore file to avoid this in the future? (This assumes you haven’t run with --debug to confirm that ESLint gets as far as linting before hanging-- if you know for sure it’s post-linting, ignore this.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint hangs after linting complete · Issue #13310 - GitHub
I observed this issue again when building in a CI environment (linux). It took about 30 minutes to complete, but the issue originated...
Read more >
Eslint hanging for at least 10 seconds after linting the first file
js files. The issue is that whatever the amount of files i have to lint, it always takes at least 10 seconds, even...
Read more >
eslint/eslint - Gitter
it's working fine with vscode it seems, but when i try to run eslint . it hangs, i think it's trying to lint...
Read more >
Eslint freeze : WEB-52952 - YouTrack
Run eslint on saving 2. It stack and closes after 20 seconds. Error appears that eslint works too long. What is the expected...
Read more >
Find and fix problems in your JavaScript code - ESLint ...
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found