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 falls into infinite loop if used with css-loader in webpack

See original GitHub issue

What version of ESLint are you using?


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


Please show your full configuration:

It is a React project, built with webpack, configured with following loaders


We use eslint-config-airbnb default settings, which will enable the no-multi-spaces check bu default.

// disallow use of multiple spaces
   'no-multi-spaces': 2,

webpack module settings

  module: {
    preLoaders: [
        test: /\.(js|es6|jsx)$/,
        loader: 'eslint-loader',
        exclude: /node_modules/
    loaders: [
        test: /\.(jsx|es6)$/,
        loader: 'babel'
        test: /\.less$/,
        loader: 'style!css!less'
        test: /\.css$/,
        loader: 'style!css'

What did you do? Please include the actual source code causing the issue.

I use the eslint-loader in my webpack development mode to check a file which has one space line in it

'user strict'

function foo(){
  // bar

What did you expect to happen?

I was expecting eslint to check it quickly.

What actually happened? Please include the actual, raw output from ESLint.

The build actually hangs there.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

gyandeepscommented, Aug 25, 2016

I am personally not in favor of introducing such changes because some code has polyfilled some core functionality in a non-standard (not according to the specs) way. By doing this we will say, we are open to changes on ESlint just because your code uses non-standard JavaScript function implementations.

This is my thought, I will wait to see what the team has to say on this.

ilyavolodincommented, Aug 25, 2016

I also agree. JavaScript is a very flexible language. Anything can be overwritten by the user at any given point. There’s no way to predict and protect against such actions. Thank you for suggestions, but there seems to be a strong agreement between the members of the team, that this is not something we should try to protect against.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating to v6.0.0 causes Webpack to go into a loop ... - GitHub
After updating to v6.0.0 of fork-ts-checker-webpack-plugin Webpack goes into an infinite loop where it rebuilds over and over.
Read more >
Webpack dynamic require causes endless compilations
When I have a dynamic require and run webpack in watch mode it turns out that webpack is constantly trying to compile in...
Read more >
Javascript loop through files in a folder - Caritas Castellaneta
786 Birchmount Dr. Looping through files in a folder Node. The continue statement can be used to restart a while, do-while, for, or...
Read more >
How to solve the React useEffect Hook's infinite loop patterns
Solve the issue of infinite loops when using the useEffect Hook in React to more smoothly utilize the Hook for your app's side...
Read more >
eslint-plugin-react-hooks | Yarn - Package Manager
React is a JavaScript library for building user interfaces. Declarative: React makes it painless to create interactive UIs. Design simple views for each ......
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 Post

No results found

github_iconTop Related Hashnode Post

No results found