Skip to content

Commit 3e2e380

Browse files
Merge pull request #1671 from forcedotcom/sc/W-17216768
FIX(eslint): @W-17216768@: Add global variables support for aura global value providers to eslint engine
2 parents c1f0035 + f85d83f commit 3e2e380

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/lib/eslint/JavascriptEslintStrategy.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ const ES_CONFIG: ESLint.Options = {
1010
"baseConfig": {},
1111
"overrideConfig": {
1212
"globals": {
13-
"$A": "readonly", // For Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_jsapi_dollarA.htm
13+
"$A": "readonly", // For Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_jsapi_dollarA.htm
14+
"$Browser": "readonly", // For Lightning Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/expr_source.htm
15+
"$ContentAsset": "readonly", // For Lightning Aura: ^
16+
"$Label": "readonly", // For Lightning Aura: ^
17+
"$Locale": "readonly", // For Lightning Aura: ^
18+
"$Resource": "readonly" // For Lightning Aura: ^
1419
},
1520
"parser": "@babel/eslint-parser",
1621
"parserOptions": {

src/lib/eslint/LWCEslintStrategy.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ const ES_CONFIG: ESLint.Options = {
1313
"baseConfig": {},
1414
"overrideConfig": {
1515
"globals": {
16-
"$A": "readonly", // For Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_jsapi_dollarA.htm
16+
"$A": "readonly", // For Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_jsapi_dollarA.htm
17+
"$Browser": "readonly", // For Lightning Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/expr_source.htm
18+
"$ContentAsset": "readonly", // For Lightning Aura: ^
19+
"$Label": "readonly", // For Lightning Aura: ^
20+
"$Locale": "readonly", // For Lightning Aura: ^
21+
"$Resource": "readonly" // For Lightning Aura: ^
1722
},
1823
"parser": "@babel/eslint-parser",
1924
"parserOptions": {

0 commit comments

Comments
 (0)