Stick with JSCS or switch to another linting tool #97

Closed
opened 2018-01-09 00:51:33 -05:00 by BehindTheMath · 8 comments
BehindTheMath commented 2018-01-09 00:51:33 -05:00 (Migrated from github.com)

JSCS has been merged with ESLint, and development on JSCS has stopped.

@MoOx I thought I remembered seeing somewhere that you said you wanted to switch to Prettier, but I can't find it now.

Should we switch to ESLint or Prettier? Or, since for now JSCS works fine, should we stick with that?

JSCS has been merged with ESLint, and development on JSCS has stopped. @MoOx I thought I remembered seeing somewhere that you said you wanted to switch to Prettier, but I can't find it now. Should we switch to ESLint or Prettier? Or, since for now JSCS works fine, should we stick with that?
MoOx commented 2018-01-09 03:03:42 -05:00 (Migrated from github.com)

prettier for styles and eslint for the rest. see https://prettier.io/docs/en/comparison.html
For example I have my eslint shareable config that does not contains any styles rules .

prettier for styles and eslint for the rest. see https://prettier.io/docs/en/comparison.html For example I have [my eslint shareable config](https://github.com/MoOx/eslint-config-i-am-meticulous) that does not contains any styles rules .
robinnorth commented 2018-01-25 04:06:32 -05:00 (Migrated from github.com)

As discussed in #114, one thing that we need to standardise on when implementing this is a consistent format for module require calls -- specifically whether to keep or drop the file extension. Prettier doesn't have an opinion on this, so we can decide either way. It seems like currently there's roughly a 50:50 split of require calls that include an extension and those that don't.

As discussed in #114, one thing that we need to standardise on when implementing this is a consistent format for module `require` calls -- specifically whether to keep or drop the file extension. Prettier doesn't have an opinion on this, so we can decide either way. It seems like currently there's roughly a 50:50 split of `require` calls that include an extension and those that don't.
MoOx commented 2018-01-25 04:08:57 -05:00 (Migrated from github.com)

eslint + eslint plugin import can do that.
Prettier is for style only :)

eslint + eslint plugin import can do that. Prettier is for style only :)
BehindTheMath commented 2018-01-25 19:15:56 -05:00 (Migrated from github.com)

As @robinnorth mentioned here, we should look into implementing a rule for standardizing the order of imports/requires.

As @robinnorth mentioned [here](https://github.com/MoOx/pjax/pull/116#discussion_r163795662), we should look into implementing a rule for standardizing the order of imports/requires.
BehindTheMath commented 2018-10-22 17:59:12 -05:00 (Migrated from github.com)

@moox Can you link to one of your projects that's using ESLint and Prettier, so I can see how you configured it?

@moox Can you link to one of your projects that's using ESLint and Prettier, so I can see how you configured it?
MoOx commented 2018-10-23 02:41:11 -05:00 (Migrated from github.com)

For prettier, the easiest thing is to setup https://github.com/azz/pretty-quick with husky (and optionally a plugin for your editor). This should take a minute or 2. Then forget about it and on each commit, boom code is formatted.
For ESLint, I use this config https://github.com/MoOx/eslint-config-i-am-meticulous (you can try
https://github.com/MoOx/eslint-config-i-am-meticulous#meticulous-modern-es and see if that's not too strict depending on your taste) but that will be more up to you. Eslint is nice if setup with
https://github.com/okonet/lint-staged (and husky too).

For prettier, the easiest thing is to setup https://github.com/azz/pretty-quick with husky (and optionally a plugin for your editor). This should take a minute or 2. Then forget about it and on each commit, boom code is formatted. For ESLint, I use this config https://github.com/MoOx/eslint-config-i-am-meticulous (you can try https://github.com/MoOx/eslint-config-i-am-meticulous#meticulous-modern-es and see if that's not too strict depending on your taste) but that will be more up to you. Eslint is nice if setup with https://github.com/okonet/lint-staged (and husky too).
BehindTheMath commented 2018-11-26 22:00:32 -05:00 (Migrated from github.com)

@MoOx You use lint-staged and pretty-quick together?

Also, which one do you run first? ESLint or Prettier?

@MoOx You use `lint-staged` and `pretty-quick` together? Also, which one do you run first? ESLint or Prettier?
MoOx commented 2018-11-29 14:51:34 -05:00 (Migrated from github.com)

pretty-quick only if you want just prettier, otherwise, lint-staged + husky + eslint + prettier :)

pretty-quick only if you want just prettier, otherwise, lint-staged + husky + eslint + prettier :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#97