-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to ESLint #366
Comments
Maybe preset from BEMQuery could be used as a starting point for preset? It should be similar to the codestyle used in CKE5, with minor changes only (e.g. BEMQuery always requires curly braces for arrow functions and CKE5 AFAIK not). |
Thanks, it'll speed up the setup. And we have to standardise our use of arrow functions as well. This will be a good moment. |
We introduced our own config: https://www.npmjs.com/package/eslint-config-ckeditor5 I'm quite happy with ESLint because it throws on many issues which JSCS and JSHint missed. However, many of its rule are too pedantic and lack flexibility. I needed to disable a couple of interesting ones because they made us write worse code ;|. |
ESLint up and running in all packages. Bye bye JSHint and JSCS. |
JSCS was merged into ESLint and this makes ESLint the new standard.
We need to define our ESLint preset and publish it on npm.
Most importantly, it seems that moving to ESLint will render ckeditor5-dev-lint useless – it'll be better to use npm script for that. The problematic part may be replacing
guppy-pre-commit
with something else that would run this npm task. This should stay automated, so if there's no package which by default calls ESLint, then we'd need to keep ckeditor5-dev-lint.Also, please mind that ckeditor5-dev-lint has the ability to lint only the changed files which are added to the git index. I wouldn't like to drop this optimisation, cause linting the engine takes quite a lot of time. But perhaps ESLint has similar optimisations by default. E.g. I heard about its cache mechanism.
The text was updated successfully, but these errors were encountered: