Showing 9 of 916 total issues
File ember.d.ts
has 910 lines of code (exceeds 250 allowed). Consider refactoring. Open
interface DOMElement {}
interface Promise<T> {}
declare class Registry {}
declare class Transition {}
declare namespace Handlebars { class SafeString {} }
Function onClick
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
onClick(options) {
const {min,max,_selected,selectionProperty} = this.getProperties('min','max','_selected','selectionProperty');
const item = options.item;
const itemId = item.get(selectionProperty);
const itemSelected = item.get('selected');
Function _columns
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
_columns: computed('attrs.columns','columns.isFulfilled', function() {
let columns = this.get('columns'); // column definition
const defaultConfig = {
type: 'string',
horizontal: 'left',
Function _value
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_value: computed('value', function() {
const {precision,type,format,empty,_isEmpty} = this.getProperties('precision', 'type', 'format','empty','_isEmpty');
let value = this.get('value');
if(_isEmpty && empty) {
return empty;
- 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 _value
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
_value: computed('value', function() {
const {precision,type,format,empty,_isEmpty} = this.getProperties('precision', 'type', 'format','empty','_isEmpty');
let value = this.get('value');
if(_isEmpty && empty) {
return empty;
Function onClick
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
onClick(options) {
const {min,max,_selected,selectionProperty} = this.getProperties('min','max','_selected','selectionProperty');
const item = options.item;
const itemId = item.get(selectionProperty);
const itemSelected = item.get('selected');
- 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 commit
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
commit() {
let items = this.get('sortedItems');
let groupModel = this.get('_registry').map(item=>item.child);
let itemModels = items.mapBy('data');
let draggedItem = items.findBy('wasDropped', true);
Function _tellAncestors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_tellAncestors(msg, options={}) {
const parent = this._getParent();
const response = this.get('_hasMessagingParent') ? parent._message(msg,options) : false;
options = typeOf(options)==='object' ? merge(options,response) : options;
if(isPresent(options.curriedBy)) {
- 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 _filter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_filter: computed('filter', function() {
const filter = this.get('filter');
switch(typeOf(filter)) {
case 'object':
if(!filter.key || !filter.value) {
- 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"