Skip to content

Commit

Permalink
fix: fix unexpected global name usage apache#13983.
Browse files Browse the repository at this point in the history
add no-restricted-globals rule
  • Loading branch information
pissang committed Jan 8, 2021
1 parent 68b7fab commit 6d4fe65
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .eslintrc-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,14 @@ rules:
-
vars: "local"
args: "none"
"@typescript-eslint/no-redeclare": 2
# Avoid dangerous usage of globals.
"no-restricted-globals":
- 2
- "event"
- "name"
- "length"
- "orientation"
- "top"
- "parent"
- "location"
- "closed"
2 changes: 1 addition & 1 deletion src/data/Source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ function normalizeDimensionsOption(dimensionsDefine: DimensionDefinitionLoose[])
// User can set null in dimensions.
// We dont auto specify name, othewise a given name may
// cause it be refered unexpectedly.
if (name == null) {
if (item.name == null) {
return item;
}

Expand Down

0 comments on commit 6d4fe65

Please sign in to comment.