Skip to content

Commit 23b43dc

Browse files
style(lib/rules): var -> const & let (#4493)
Just like #4451 but for `lib/rules`. This is the last of `lib/*` Smaller part of the full vision: #4444 --------- Co-authored-by: Wilco Fiers <[email protected]>
1 parent 2481379 commit 23b43dc

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/rules/data-table-large-matches.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { isDataTable, toArray } from '../commons/table';
22

33
function dataTableLargeMatches(node) {
44
if (isDataTable(node)) {
5-
var tableArray = toArray(node);
5+
const tableArray = toArray(node);
66
return (
77
tableArray.length >= 3 &&
88
tableArray[0].length >= 3 &&

lib/rules/frame-title-has-text-matches.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { sanitize } from '../commons/text';
22

33
function frameTitleHasTextMatches(node) {
4-
var title = node.getAttribute('title');
4+
const title = node.getAttribute('title');
55
return !!sanitize(title);
66
}
77

lib/rules/label-matches.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function labelMatches(node, virtualNode) {
66
return true;
77
}
88

9-
var type = virtualNode.attr('type').toLowerCase();
9+
const type = virtualNode.attr('type').toLowerCase();
1010
return (
1111
['hidden', 'image', 'button', 'submit', 'reset'].includes(type) === false
1212
);

lib/rules/link-in-text-block-matches.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { sanitize } from '../commons/text';
22
import { isVisibleOnScreen, isInTextBlock } from '../commons/dom';
33

44
function linkInTextBlockMatches(node) {
5-
var text = sanitize(node.innerText);
6-
var role = node.getAttribute('role');
5+
const text = sanitize(node.innerText);
6+
const role = node.getAttribute('role');
77

88
if (role && role !== 'link') {
99
return false;

0 commit comments

Comments
 (0)