Stick with JSCS or switch to another linting tool #97
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 :)