-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: feature/add-env-config
Are you sure you want to change the base?
Conversation
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Checklist
Issue Resolved / Feature Added
In order to provide the global variable of the
browser
,node
, andjest
, environments must be added to theenv
setting in the config file.An environment provides predefined global variables.
env
: https://eslint.org/docs/latest/use/configure/language-options#specifying-environmentsenv
browser
: https://github.com/sindresorhus/globals/blob/9b903064b5842a3231549d3767dbfddb463c1c0d/globals.json#L363-L1127node
: https://github.com/sindresorhus/globals/blob/9b903064b5842a3231549d3767dbfddb463c1c0d/globals.json#L1231-L1302jest
: https://github.com/sindresorhus/globals/blob/9b903064b5842a3231549d3767dbfddb463c1c0d/globals.json#L1425-L1441Resolution
Adding
browser
,node
, andjest
environment inenv
Additional Considerations
es6
->es2015
(reason: sindresorhus/globals@baccc2a)no-shadow
rule for enact samples & samplerno-shadow
rule for enact frameworksLinks
WRQ-242
Comments
Enact-DCO-1.0-Signed-off-by: Taeyoung Hong ([email protected])