Skip to content

Commit

Permalink
style(lib/rules): var -> const & let (#4493)
Browse files Browse the repository at this point in the history
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 <WilcoFiers@users.noreply.github.com>
  • Loading branch information
gaiety-deque and WilcoFiers authored Jun 13, 2024
1 parent 2481379 commit 23b43dc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/rules/data-table-large-matches.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { isDataTable, toArray } from '../commons/table';

function dataTableLargeMatches(node) {
if (isDataTable(node)) {
var tableArray = toArray(node);
const tableArray = toArray(node);
return (
tableArray.length >= 3 &&
tableArray[0].length >= 3 &&
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/frame-title-has-text-matches.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sanitize } from '../commons/text';

function frameTitleHasTextMatches(node) {
var title = node.getAttribute('title');
const title = node.getAttribute('title');
return !!sanitize(title);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/label-matches.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function labelMatches(node, virtualNode) {
return true;
}

var type = virtualNode.attr('type').toLowerCase();
const type = virtualNode.attr('type').toLowerCase();
return (
['hidden', 'image', 'button', 'submit', 'reset'].includes(type) === false
);
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/link-in-text-block-matches.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { sanitize } from '../commons/text';
import { isVisibleOnScreen, isInTextBlock } from '../commons/dom';

function linkInTextBlockMatches(node) {
var text = sanitize(node.innerText);
var role = node.getAttribute('role');
const text = sanitize(node.innerText);
const role = node.getAttribute('role');

if (role && role !== 'link') {
return false;
Expand Down

0 comments on commit 23b43dc

Please sign in to comment.