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

WRQ-242: Adding 'browser', 'node', and 'jest' environment in 'env' #81

Open
wants to merge 6 commits into
base: feature/add-env-config
Choose a base branch
from

Conversation

hong6316
Copy link
Contributor

@hong6316 hong6316 commented Feb 15, 2024

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • I have run automated CLI testing and it is passed
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

In order to provide the global variable of the browser, node, and jest, environments must be added to the env setting in the config file.
An environment provides predefined global variables.

Resolution

Adding browser, node, and jest environment in env

Additional Considerations

  • Change es6 -> es2015 (reason: sindresorhus/globals@baccc2a)
  • index.js: Allowing some var names in no-shadow rule for enact samples & sampler
  • strict.js: Allowing some var names in no-shadow rule for enact frameworks

Links

WRQ-242

Comments

Enact-DCO-1.0-Signed-off-by: Taeyoung Hong (taeyoung.hong@lge.com)

strict.js Outdated Show resolved Hide resolved
CHANGELOG.md Outdated
@@ -4,6 +4,7 @@ The following is a curated list of changes in the Enact eslint config:

## unreleased

* Added `browser`, `node`, and `jest` environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to release including worker and the new environments altogether, changelogs need to be merged in a single line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

index.js Outdated
commonjs: true,
browser: true,
jest: true,
node: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the ordering rule inside env block?

Copy link
Contributor Author

@hong6316 hong6316 Feb 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were no ordering rules(and simply in the order of the added date), but if needs, alphabetical order seems appropriate.
Should I? Either is fine to me.

@hong6316 hong6316 changed the base branch from develop to feature/add-env-config February 27, 2024 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants