Showing 16 of 50 total issues
Function exports
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = async function () {
return {
useYarn: true,
scenarios: [
{
Consider simplifying this complex logical expression. Open
if (
event.key === 'ArrowUp' ||
event.key === 'ArrowDown' ||
event.key === 'ArrowLeft' ||
event.key === 'ArrowRight' ||
Function modify
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
modify(
element: Element,
_: PositionalArgs<ListboxSignature<T>>,
options: NamedArgs<ListboxSignature<T>>
) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function testMenuKeyboardNavigation
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function testMenuKeyboardNavigation(
assert: Assert,
selectors: Partial<Selectors> = DEFAULT_SELECTORS
): Promise<void> {
const { elements, selectors: allSelectors } = setupMenuTest(assert, selectors);
Function modify
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
modify(
element: Element,
_: PositionalArgs<ListboxSignature<T>>,
options: NamedArgs<ListboxSignature<T>>
) {
Function testMenuPointerNavigation
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function testMenuPointerNavigation(
assert: Assert,
selectors: Partial<Selectors> = DEFAULT_SELECTORS
): Promise<void> {
const { elements, selectors: allSelectors } = setupMenuTest(assert, selectors);
Function testListboxForKeyboardMultiSelection
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function testListboxForKeyboardMultiSelection(
assert: Assert,
elements: {
target: HTMLElement;
list: HTMLElement;
Function navigateWithPointer
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
navigateWithPointer(event: PointerEvent) {
// hover ...
if (event.type === 'pointerover') {
// close sibling menus
this.control.items
Function testListboxForPointerMultiSelection
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function testListboxForPointerMultiSelection(
assert: Assert,
elements: {
target: HTMLElement;
list: HTMLElement;
Function select
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export async function select(
target: Target,
options: string | string[],
{
keepPreviouslySelected = false,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (environment) {
let ENV = {
modulePrefix: 'ember-aria-voyager-test-app',
environment,
rootURL: '/',
Function createIndexEmitter
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function createIndexEmitter<T>(listbox: Listbox, options: NamedArgs<ListboxSignature<T>>) {
const findByIndex = (index: number) => {
return (options as WithItems<T>).items[index] ?? undefined;
};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function navigateWithPointer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
navigateWithPointer(event: PointerEvent) {
// hover ...
if (event.type === 'pointerover') {
// close sibling menus
this.control.items
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function modify
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
modify(
element: Element,
_: PositionalArgs<MenuSignature<T>>,
options: NamedArgs<MenuSignature<T>>
) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
handle(bag: NavigationParameterBag): NavigationParameterBag {
const { event } = bag;
// navigation handlers
if (event.type === 'keydown') {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function closeRootMenu
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
closeRootMenu() {
const getRootMenu = (menu: MenuElement): HTMLElement | undefined => {
const menus = [];
let elem: HTMLElement | null = menu;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"