webpack-contrib / eslint-loader

[DEPRECATED] A ESlint loader for webpack
MIT License
1.06k stars 121 forks source link

Parsing error: Unexpected token .. #330

Closed akvaliya closed 4 years ago

akvaliya commented 4 years ago

Expected Behavior

It should be able to parse

Actual Behavior

Parsing error: Unexpected token ..

Code

// webpack.config.js
{
    test: /\.js$/,
    exclude: /node_modules/,
    loader: 'eslint-loader',
    include: path.resolve(__dirname, 'app'),
    options: {
        failOnError: true,
    },
},
Object.entries(data).flatMap(([key,v])=>v.map(x=>({key, ...x})))

How Do We Reproduce?

Object.entries(data).flatMap(([key,v])=>v.map(x=>({key, ...x})))

... syntax works with array but not like above. What am i missing here?

ricardogobbosouza commented 4 years ago

Hi @akvaliya I couldn't reproduce

Please use eslint-webpack-plugin. eslint-loader will be deprecated.