Skip to content

Commit

Permalink
Merge pull request #1671 from forcedotcom/sc/W-17216768
Browse files Browse the repository at this point in the history
FIX(eslint): @W-17216768@: Add global variables support for aura global value providers to eslint engine
  • Loading branch information
stephen-carter-at-sf authored Nov 12, 2024
2 parents c1f0035 + f85d83f commit 3e2e380
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/lib/eslint/JavascriptEslintStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ const ES_CONFIG: ESLint.Options = {
"baseConfig": {},
"overrideConfig": {
"globals": {
"$A": "readonly", // For Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_jsapi_dollarA.htm
"$A": "readonly", // For Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_jsapi_dollarA.htm
"$Browser": "readonly", // For Lightning Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/expr_source.htm
"$ContentAsset": "readonly", // For Lightning Aura: ^
"$Label": "readonly", // For Lightning Aura: ^
"$Locale": "readonly", // For Lightning Aura: ^
"$Resource": "readonly" // For Lightning Aura: ^
},
"parser": "@babel/eslint-parser",
"parserOptions": {
Expand Down
7 changes: 6 additions & 1 deletion src/lib/eslint/LWCEslintStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ const ES_CONFIG: ESLint.Options = {
"baseConfig": {},
"overrideConfig": {
"globals": {
"$A": "readonly", // For Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_jsapi_dollarA.htm
"$A": "readonly", // For Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_jsapi_dollarA.htm
"$Browser": "readonly", // For Lightning Aura: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/expr_source.htm
"$ContentAsset": "readonly", // For Lightning Aura: ^
"$Label": "readonly", // For Lightning Aura: ^
"$Locale": "readonly", // For Lightning Aura: ^
"$Resource": "readonly" // For Lightning Aura: ^
},
"parser": "@babel/eslint-parser",
"parserOptions": {
Expand Down

0 comments on commit 3e2e380

Please sign in to comment.