Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The following is a curated list of changes in the Enact eslint config:

## unreleased

* Added `worker` environment.
* Added `browser`, `jest`, `node`, and `worker` environment.

## [4.2.0] (January 3, 2024)

Expand Down
21 changes: 17 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ module.exports = {
ENACT_PACK_NO_ANIMATION: true
},
env: {
browser: true,
commonjs: true,
es2015: true, // Enables ES6 globals
jest: true,
node: true,
worker: true,
es6: true, // Enables ES6 globals
'shared-node-browser': true, // restrict to common globals to preserve isomorphic support
commonjs: true
'shared-node-browser': true // restrict to common globals to preserve isomorphic support
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended'],
ignorePatterns: [
Expand Down Expand Up @@ -97,7 +100,17 @@ module.exports = {
builtinGlobals: true,
hoist: 'all',
allow: [
'context'
'context',
'focus',
'Image',
'length',
'name',
'Notification',
'open',
'Option',
'scrollTo',
'Text',
'top'
]
}],
'no-throw-literal': 'error',
Expand Down
23 changes: 22 additions & 1 deletion strict.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,31 @@ module.exports = {
builtinGlobals: true,
hoist: 'all',
allow: [
'alert',
'blur',
'context',
'event',
'focus',
'Image',
'innerHeight',
'innerWidth',
'IntersectionObserver',
'length',
'location',
'moveTo',
'name',
'Notification'
'Notification',
'open',
'Option',
'parent',
'screen',
'scroll',
'scrollTo',
'status',
'stop',
'Text',
'Touch',
'top'
]
}],
'no-undefined': 'error',
Expand Down