TrySound / rollup-plugin-eslint

This plugin in migrated https://github.com/rollup/plugins/tree/master/packages/eslint
MIT License
61 stars 17 forks source link

Different experience when using `eslint` directly, or via the Rollup plugin #10

Closed akauppi closed 8 years ago

akauppi commented 8 years ago

http://stackoverflow.com/questions/39317999/getting-wrong-line-numbers-with-eslint-and-rollup

Do I need to have a certain version of eslint installed, for the plugin?

Currently have:

$ node_modules/.bin/eslint --version
v3.4.0

rollup-plugin-eslint 2.0.2

Symptoms:

TrySound commented 8 years ago

@akauppi Can you show your rollup config?

miroli commented 7 years ago

I have the exact same error. Here is my rollup config.

import babel from 'rollup-plugin-babel';
import eslint from 'rollup-plugin-eslint';
import nodeResolve from 'rollup-plugin-node-resolve';

export default {
  entry: 'src/js/index.js',
  format: 'iife',
  dest: 'dist/bundle.js',
  plugins: [
    nodeResolve({
      jsnext: true
    }),
    babel({
      exclude: 'node_modules/**'
    }),
    eslint({
      exclude: 'node_modules/**'
    })
  ],
  sourceMap: 'inline'
};
TrySound commented 7 years ago

@miroli Of course you have wrong positions. You are trying to lint babeled code. Order of plugins is important.

miroli commented 7 years ago

Wow. Thank you!