Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build/build-manual.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint-env node */
'use strict';

var path = require('path');
Expand Down
1 change: 0 additions & 1 deletion build/configure.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint-env node */
/*eslint max-len: off */
'use strict';

Expand Down
1 change: 0 additions & 1 deletion build/tasks/add-locale.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint-env node */
'use strict';
var clone = require('clone');
var buildManual = require('../build-manual');
Expand Down
1 change: 0 additions & 1 deletion build/tasks/aria-supported.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint-env node */
'use strict';

const { roles, aria: props } = require('aria-query');
Expand Down
1 change: 0 additions & 1 deletion build/tasks/configure.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint-env node */
'use strict';
const buildRules = require('../configure');
const format = require('../shared/format');
Expand Down
1 change: 0 additions & 1 deletion build/tasks/langs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint-env node */
'use strict';
var http = require('http');
module.exports = function (grunt) {
Expand Down
1 change: 0 additions & 1 deletion build/tasks/notify.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { notify } = require('node-notifier');

/*eslint-env node */
('use strict');

module.exports = function (grunt) {
Expand Down
1 change: 0 additions & 1 deletion build/tasks/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const execSync = require('child_process').execSync;
const chalk = require('chalk');

/*eslint-env node */
('use strict');

module.exports = function (grunt) {
Expand Down
1 change: 0 additions & 1 deletion build/tasks/update-help.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint-env node */
'use strict';

module.exports = function (grunt) {
Expand Down
1 change: 0 additions & 1 deletion build/tasks/validate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint-env node */
'use strict';

var revalidator = require('revalidator').validate,
Expand Down
1 change: 0 additions & 1 deletion doc/examples/chrome-debugging-protocol/axe-cdp.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const example = async url => {
// This function is injected into the browser and is responsible for
// running `axe-core`.
const browserCode = () => {
/* eslint-env browser */
return new Promise((resolve, reject) => {
const axe = window.axe;
if (!axe) {
Expand Down
2 changes: 1 addition & 1 deletion lib/checks/color/color-contrast-evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function findPseudoElement(
}

const getPseudoElementArea = memoize(
function getPseudoElementArea(node, pseudo) {
function getPseudoElementAreaMemoized(node, pseudo) {
const style = window.getComputedStyle(node, pseudo);
const matchPseudoStyle = (prop, value) =>
style.getPropertyValue(prop) === value;
Expand Down
2 changes: 1 addition & 1 deletion lib/core/utils/dq-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CACHE_KEY = 'DqElm.RunOptions';
* @param {Object} options Propagated from axe.run/etc
* @param {Object} spec Properties to use in place of the element when instantiated on Elements from other frames
*/
const DqElement = memoize(function DqElement(elm, options, spec) {
const DqElement = memoize(function DqElementMemoized(elm, options, spec) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick clarity question — the *Memoized suffix here (and on getPseudoElementAreaMemoized in lib/checks/color/color-contrast-evaluate.js:204) names the inner raw implementation, but the memoization actually lives on the outer const DqElement = memoize(...). So a stack trace frame labeled DqElementMemoized would be the un-memoized inner call. Was that intentional, or worth swapping to something like _DqElement / DqElementImpl to keep the name aligned with what the function does?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@straker can you look into this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been our naming convention. The inner function is the same name as the outer function but with memoized attached. See https://github.com/search?q=repo%3Adequelabs%2Faxe-core%20memoize(&type=code

options ??= null;
spec ??= {};

Expand Down
Loading
Loading