Skip to content

Linting

Kevin Do edited this page Sep 11, 2018 · 1 revision

A linter is a small program that checks code for stylistic or programming errors.

ESLint

Differences between popular eslint styles

We are using the eslint-config-airbnb-base. If you'd like to configure the eslint, please ping us and let everyone know why.

Semicolon: Required
Trailing Commas: Required
Template strings: Prefer
Import Extensions: None
Space before function parentheses: None
Object Curly Spacing: Yes
Array Bracket Spacing: None
Underscored functions: None
Object Destructuring: Prefer
React Ordering: Opinionated
React Prop Validation: Required
Arrow Functions Return Assignment: No
Object Property Shorthand: Prefer

Prettier

Prettier Repo

What is Prettier? Prettier is an opinionated code formatter with support for:

  • JavaScript, including ES2017
  • JSX
  • CSS, Less, and SCSS
  • JSON
  • Markdown, including GFM

It removes all original styling* and ensures that all outputted code conforms to a consistent style. (See this blog post)

Prettier takes your code and reprints it from scratch by taking the line length into account.

For future reference in case of conflict

Clone this wiki locally