ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Specify environment in eslint

Open filipsobol opened this issue 2 years ago • 2 comments

Currently, we do not specify in which environment we are running our code, so eslint does not know which globals we have to access. This forces us to use magic /* global XXX */ comments in our code whenever we want to use browser-specific globals like window, document, setTimeout, etc.

This is cumbersome and adds unnecessary bloat to our codebase.

I prepared two pull requests that add proper eslint configuration and remove unnecessary comments: https://github.com/ckeditor/ckeditor5/pull/14806 and https://github.com/cksource/ckeditor5-commercial/pull/5452.

filipsobol avatar Aug 24 '23 11:08 filipsobol

Concern raised by @niegowski in https://github.com/ckeditor/ckeditor5/issues/14173#issuecomment-1686800844:

Those comments could indicate where we use DOM APIs if we ever want to support headless editor mode (running without DOM on the node server). If we remove those, then it could be harder to spot. OTOH we could then switch to node env and check what is failing, but this would need to scan much more errors and could be overwhelming.

filipsobol avatar Aug 24 '23 11:08 filipsobol

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Aug 24 '24 01:08 CKEditorBot

We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

CKEditorBot avatar Oct 01 '24 23:10 CKEditorBot