Slate: add Prettier for code formatting

Created on 1 Feb 2018  路  4Comments  路  Source: ianstormtaylor/slate

I haven't done this yet purely because I haven't had the time, but if we were to switch to Prettier for code formatting I think it would make accepting PRs easier, and probably result in it being easier for people to contribute too.

Ideally it would be done in the most automated way, so that we never need to really think about when it runs or not. I'm not familiar with it though, so I'm not sure.

debt improvement

Most helpful comment

At GitBook, we use prettier integration in ESLint (https://github.com/GitbookIO/eslint-config-gitbook/blob/master/index.js).

I think it'll work great for Slate: ESLint is already setup in the CI tests and contributors probably all have an editor with an ESLint integration (Atom, etc).

All 4 comments

At GitBook, we use prettier integration in ESLint (https://github.com/GitbookIO/eslint-config-gitbook/blob/master/index.js).

I think it'll work great for Slate: ESLint is already setup in the CI tests and contributors probably all have an editor with an ESLint integration (Atom, etc).

I would recommend switch to prettier one dir by one dir. Switching to prettier would cause a 100% line changes, somehow a bit unfriendly for PR in the review process.

I can do prettier for dirs under packages/slate/src. packages/slate/tests/, because I am only familiar with these two dirs.

I have a similar setup with the ESLint integration and it is very nice to use.

I will submit an initial PR implementing this, I just need to go through the current eslint config and ensure there is no conflict between the two.

Resolved by #1589

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianstormtaylor picture ianstormtaylor  路  3Comments

adrianclay picture adrianclay  路  3Comments

bunterWolf picture bunterWolf  路  3Comments

chriserickson picture chriserickson  路  3Comments

chrpeter picture chrpeter  路  3Comments