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

Specify environment in eslint #14860

Open
filipsobol opened this issue Aug 24, 2023 · 1 comment
Open

Specify environment in eslint #14860

filipsobol opened this issue Aug 24, 2023 · 1 comment
Labels
domain:linters This issue touches the "ckeditor/ckeditor5-linters-config" repository. squad:core Issue to be handled by the Core team. squad:devops Issue to be handled by the Devops team. type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@filipsobol
Copy link
Member

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: #14806 and https://github.com/cksource/ckeditor5-commercial/pull/5452.

@filipsobol filipsobol added type:improvement This issue reports a possible enhancement of an existing feature. squad:devops Issue to be handled by the Devops team. squad:core Issue to be handled by the Core team. domain:linters This issue touches the "ckeditor/ckeditor5-linters-config" repository. labels Aug 24, 2023
@filipsobol
Copy link
Member Author

Concern raised by @niegowski in #14173 (comment):

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:linters This issue touches the "ckeditor/ckeditor5-linters-config" repository. squad:core Issue to be handled by the Core team. squad:devops Issue to be handled by the Devops team. type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

No branches or pull requests

1 participant