Skip to content

Commit 0638c09

Browse files
committed
fixup! Build: ESLint setup improvements
1 parent 2b75cb4 commit 0638c09

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.eslintrc-browser.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
"ecmaVersion": 3
1111
},
1212

13+
// The browser env is not enabled on purpose so that code takes
14+
// all browser-only globals from window instead of assuming
15+
// they're available as globals. This makes it possible to use
16+
// jQuery with tools like jsdom which provide a custom window
17+
// implementation.
18+
"env": {},
19+
1320
"globals": {
1421
"window": true,
1522
"jQuery": true,

test/.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"extends": "../.eslintrc-browser.json",
55

66
"env": {
7+
8+
// In source the browser env is not enabled but unit tests rely on them
9+
// too much and we don't run them in non-browser environments anyway.
710
"browser": true
811
},
912

0 commit comments

Comments
 (0)