Skip to content

Commit 5e4013e

Browse files
committed
fix(typescript): Extend no-shadow allow list to accommodate common patterns
1 parent 1d9438a commit 5e4013e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/eslint-config-zillow-typescript/rules/all-remaining.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,12 @@ module.exports = {
245245
// eslint core
246246
builtinGlobals: true,
247247
hoist: 'functions',
248-
allow: [],
248+
allow: [
249+
// ponyfills
250+
'fetch',
251+
// namespace declaration merging
252+
'global',
253+
],
249254
// this plugin
250255
ignoreTypeValueShadow: true,
251256
ignoreFunctionTypeParameterNameValueShadow: true,

packages/eslint-plugin-zillow/test/__snapshots__/eslint-plugin-zillow.test.js.snap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3339,7 +3339,10 @@ Object {
33393339
"zillow/@typescript-eslint/no-shadow": Array [
33403340
"error",
33413341
Object {
3342-
"allow": Array [],
3342+
"allow": Array [
3343+
"fetch",
3344+
"global",
3345+
],
33433346
"builtinGlobals": true,
33443347
"hoist": "functions",
33453348
"ignoreFunctionTypeParameterNameValueShadow": true,

0 commit comments

Comments
 (0)