Diamond sponsors

Code with style! Prettier + ESLint

Profile picture for user davidc
David
Corbacho
Senior Developer
Wunder
Type
Talk
Experience level
Beginner
Duration
20 minutes
Room
0.04 dynamicum
Starts at
Ends at
Industry track
Summary

Prettier is a great ally for the developer. It makes your code formatting uniform and consistent.

While ESlint detects and enforces certain rules, educating the developer about what's wrong with their code, Prettier takes a different approach, by parsing all your code and formatting it with its own opinionated style, so you don't need to worry about it anymore.

Prettier and ESLint are good partners for developers especially in teams where many developers work in the same code base, so it's perfect for Open Source projects. 

Description

After a brief introduction, we will discuss different workflows and setups, and how to make them work together, including the Drupal Core setup, now that they just included Prettier.

This session is recommended for developers who are interested in maximising the productivity of their teams.
 

Main technologies covered:

  • ESLint, ESLint fix, with special mention of Airbnb ESLint configuration
  • Prettier, abstract syntax tree (AST)
     

And a small mention of:

  • Stylelint
  • Prettier PHP Plugin
  • Setup of VSCode, Webstorm + PHPstorm editors. After all, this will be a 20 min session, so this material could be given as a followup.

Platinum sponsors