Showing 62 of 113 total issues
Function rangeInputMixin
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
export const rangeInputMixin = base => // eslint-disable-line max-lines-per-function
/**
* @polymer
* @mixinClass
*/
- 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 template
has 220 lines of code (exceeds 25 allowed). Consider refactoring. Open
static get template() {
return html`
<style>
:host {
display: block;
File cosmoz-omnitable-styles.js
has 465 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable max-lines */
import { tagged as css } from '@neovici/cosmoz-utils';
const checkbox = css`
.checkbox {
box-sizing: border-box;
Function dateInputMixin
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
export const dateInputMixin = base => // eslint-disable-line max-lines-per-function
/**
* @polymer
* @mixinClass
*/
- 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 useProcessedItems
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
export const useProcessedItems = ({
data,
columns,
hashParam,
sortAndGroupOptions,
- 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
File cosmoz-omnitable-range-input-mixin.js
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable max-lines */
import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js';
import { timeOut } from '@polymer/polymer/lib/utils/async.js';
import { enqueueDebouncer } from '@polymer/polymer/lib/utils/flush.js';
Function useResizableColumns
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export const useResizableColumns = ({
host,
canvasWidth,
layout,
setSettings,
- 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
File x-page.js
has 309 lines of code (exceeds 250 allowed). Consider refactoring. Open
import '@polymer/paper-dropdown-menu/paper-dropdown-menu-light';
import '@polymer/iron-icons/editor-icons';
import '@polymer/iron-icons/iron-icons';
import '@polymer/paper-button/paper-button';
import '@polymer/paper-toggle-button/paper-toggle-button';
Function useOmnitable
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useOmnitable = (host) => {
const {
hashParam,
settingsId,
data,
Function SettingsUI
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
SettingsUI = (host) => {
const {
settings,
settingsId,
onSave,
Function processedItems
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
processedItems = useMemo(() => {
if (
!noLocalSort &&
!groupOnColumn &&
sortOnColumn != null &&
Function render
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const onOpenedChanged = (event) => {
this.headerFocused = event.detail.value;
this._onDropdownOpenedChanged(event);
};
Function properties
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
static get properties() { // eslint-disable-line max-lines-per-function
return {
filter: {
type: Object,
notify: true
Function useSortAndGroupOptions
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useSortAndGroupOptions = (
columns,
hashParam,
settings,
setSettings,
Function render
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const onOpenedChanged = (event) => {
this.headerFocused = event.detail.value;
this._onDropdownOpenedChanged(event);
};
Function generateTableDemoData
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const generateTableDemoData = (min, max, maxRandomString) => {
const groupsCount = getRandomInt(min, max),
data = [],
descriptions = [
'Lorem ipsum dolor sit amet',
Function mkNapi
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
const mkNapi = (host) => {
const /**
* Helper method to remove an item from `data`.
* @param {Object} item Item to remove
* @return {Object} item removed
Function render
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return html`
<style>
paper-dropdown-menu {
--iron-icon-width: 0;
Function render
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return html`
<style>
paper-dropdown-menu {
--iron-icon-width: 0;
File cosmoz-omnitable-amount-range-input.js
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { _ } from '@neovici/cosmoz-i18next';
import { PolymerElement } from '@polymer/polymer';
import { html } from 'lit-html';
import { ifDefined } from 'lit-html/directives/if-defined.js';
import '@neovici/cosmoz-input';