Skip to content

Commit

Permalink
ESLint: enable block-scoped-var rule (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Jan 8, 2021
1 parent 7509d08 commit b072df8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
"globals": { "Set": true, "Symbol": true },
"rules": {
"array-callback-return": [
"error",
2,
{
"allowImplicit": true
}
],
"block-scoped-var": 2,
"eqeqeq": [
"error",
2,
"always",
{
"null": "ignore"
Expand Down
2 changes: 1 addition & 1 deletion lib/api/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ function readData(el, name) {
var readAll = arguments.length === 1;
var domNames;
var jsNames;
var value;

if (readAll) {
domNames = Object.keys(el.attribs).filter(function (attrName) {
Expand All @@ -282,7 +283,6 @@ function readData(el, name) {
for (var idx = 0; idx < domNames.length; ++idx) {
var domName = domNames[idx];
var jsName = jsNames[idx];
var value;
if (hasOwn.call(el.attribs, domName) && !hasOwn.call(el.data, jsName)) {
value = el.attribs[domName];

Expand Down

0 comments on commit b072df8

Please sign in to comment.