Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.24 KB

eslint_prettier.md

File metadata and controls

26 lines (18 loc) · 1.24 KB

Using ESLint and Prettier

Comparing ESLint and Prettier

If you format this code using ESLint, it will just give you a warning that it's too wide (depends on your max-len setting). Prettier will automatically format it for you.

foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne(), noWayYouGottaBeKiddingMe());
foo(
  reallyLongArg(),
  omgSoManyParameters(),
  IShouldRefactorThis(),
  isThereSeriouslyAnotherOne(),
  noWayYouGottaBeKiddingMe()
);

Source: prettier/prettier-eslint#101

Integrating ESLint and Prettier

ESLint and Prettier overlap in the code formatting feature but can be easily combined by using other packages like prettier-eslint, eslint-plugin-prettier, and eslint-config-prettier. For more information about their differences, you can view the link here.