royriojas / eslint-friendly-formatter

A simple formatter/reporter for ESLint that's friendly with Sublime Text and iterm2 "click to open file" functionality
MIT License
198 stars 28 forks source link

Pass parameter to use absolute paths #26

Open klimashkin opened 7 years ago

klimashkin commented 7 years ago

Hi! I'm using eslint-friendly-formatter with gulp like that

    .pipe(eslint({rulePaths: [path.resolve('./eslint-custom-rules')]}))
    .pipe(eslint.formatEach(friendlyFormatter))

Version 3.0.0 bring relative format by default, but I still need absolute. How can I specify EFF_ABSOLUTE_PATHS parameter in gulp, not using environment variables?

royriojas commented 7 years ago

Hi @klimashkin,

It might be possible to pass the parameters to the function directly and return the formatter configured for usages like this one.

In the meantime the best workaround for you is to to use 2.x version. The only difference between 2.x and 3.x is that now 3x gives the paths as relative. In the long run I will enable passing parameters to this function so you can use the newer version without issues.