Prettier-eslint: Prettier-eslint is not paying attention to eslint max-len rule configured per file

Created on 2 Apr 2017  路  5Comments  路  Source: prettier/prettier-eslint

Hi!

Super great work with eslint-prettier! Lovin it!

See screenshot. When i configure the max-len rule like this atom-prettier does not care. It does work when i configure a max-len rule in .eslintrc.

With "work" i mean it respects the max-len rule and format the code accordingly

image

help wanted needs investigation

All 5 comments

I'm unsure of what could cause this. Could you dig a little deeper using the logging capabilities?

If you have the atom plugin, then, you could pop open the developer tools and set process.env.LOG_LEVEL to trace or debug before you do any formatting. That's a pretty easy way to do this.

Let us know what you find.

Hi, same issue here. I'm using the eslint-airbnb rules that comes with a max-len of 100, and prettier-eslint is not respecting the rule. i.e It keeps the line as it is with 102 characters.

screen shot 2017-05-02 at 12 07 19

See attached log from prettier-eslint in trace mode
prettier-eslint_log.txt

Thanks!

That's a pretty big log 馃榾 would probably be easier to try to reproduce it with a single smaller file. Also, I probably won't have time to do any more than review a pull request (which I'm happy to do). I don't have enough time to provide much support! Sorry, and good luck!

The problem is probably that prettier-eslint only reads the eslint config to set options for prettier, which reformats the line to fit the default 80 characters, and eslint can't fix it back.

Ah, yeah, that's a known issue. Sorry, we can't fix that 馃槥

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grit96 picture grit96  路  3Comments

kripod picture kripod  路  5Comments

jingsam picture jingsam  路  5Comments

kentcdodds picture kentcdodds  路  10Comments

sheerun picture sheerun  路  10Comments