首页 > 解决方案 > Prettier auto-correct javascript "import" statement into an one line but then eslitnt 'max-len' rule breaks

问题描述

I have eslint setup with Prettier formatter in vscode.

there is this following original line,

import MyCustomComponentsIsThis 
   from 'queries/internal/consumer/MyCustomComponentsIsThis';

Prettier formatter always makes it into a single line as below

import MyCustomComponentsIsThis from 'queries/internal/consumer/MyCustomComponentsIsThis';

But this will break the esLint max-len rule so still shows it as error on vscode. How can i overide prettier to keep this like as above two lines of codes

标签: visual-studio-codeeslintprettier

解决方案


推荐阅读