Skip to content
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

Closed
Reinmar opened this issue Nov 28, 2016 · 4 comments
Closed

Switch to ESLint #366

Reinmar opened this issue Nov 28, 2016 · 4 comments
Assignees
Labels
type:task This issue reports a chore (non-production change) and other types of "todos".
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Nov 28, 2016

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.

@Reinmar Reinmar added status:confirmed type:task This issue reports a chore (non-production change) and other types of "todos". labels Nov 28, 2016
@Comandeer
Copy link
Member

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).

@Reinmar
Copy link
Member Author

Reinmar commented Dec 1, 2016

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.

@Reinmar
Copy link
Member Author

Reinmar commented May 16, 2017

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 ;|.

@Reinmar
Copy link
Member Author

Reinmar commented May 17, 2017

ESLint up and running in all packages. Bye bye JSHint and JSCS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

No branches or pull requests

3 participants