ESLint & Reformat code

Hi,

I'm porting my work from VSCode to PyCharm and having trouble making it enforce project ESLint style using Reformat Code shortcut.

The project construct from Python & Javascript (React) code. We have a `.eslintrc.js` file that PyCharm is reading charmingly using right-arrow and selecting "Apply ESLint code style rules", but not enforce the styles when I reformat the code using Cmd+Shift+L (shortcut for "Reformat Code" action). It's very annoying.

The project is a large one when there is more than one frontend/backend. 

The funny thing is when I do "Reformat Code" I start getting eslint warnings like: "eslint: insert `.`"

 

I really need help with that. 

anyone?

Thanks!

0

what settings aren't imported namely?

Note that only core ESLint rules (indent, semi, quotes, etc) are applied when importing code style settings from ESLint. In particular, importing rules from eslint-plugin-react is not implemented (https://youtrack.jetbrains.com/issue/WEB-28857), so HTML formatter preferences are not changed when applying ESLint code style rules. You have to configure them manually in Setting | Editor | Code Style | HTML

0

Hi, thanks for the reply!
I managed to solve it by using prettier and eslint (not eslint only) so prettier make code-style changes while the eslint do the rest.

Thanks!

0

请先登录再写评论。