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?
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 .
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.
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.
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).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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?
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 .
As discussed in #114, one thing that we need to standardise on when implementing this is a consistent format for module
requirecalls -- 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 ofrequirecalls that include an extension and those that don't.eslint + eslint plugin import can do that.
Prettier is for style only :)
As @robinnorth mentioned here, we should look into implementing a rule for standardizing the order of imports/requires.
@moox Can you link to one of your projects that's using ESLint and Prettier, so I can see how you configured it?
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).
@MoOx You use
lint-stagedandpretty-quicktogether?Also, which one do you run first? ESLint or Prettier?
pretty-quick only if you want just prettier, otherwise, lint-staged + husky + eslint + prettier :)