Showing 199 of 9,537 total issues
Function kindOf
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function kindOf(val) {
// eslint-disable-next-line no-void
if (val === void 0) return 'undefined';
if (val === null) return 'null';
Function parse
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
parse({ args, input, location, operatorPrefix = '_' }) {
if (type.isUndefined(input)) {
return { output: input, errors: [] };
}
if (args && !type.isArray(args)) {
- 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 PageSiderMenu
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Confirmed
const PageSiderMenu = ({
basePath,
blockId,
components: { Icon, Link },
events,
- 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 DateTimeSelector
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
const DateTimeSelector = ({
blockId,
components: { Icon },
events,
loading,
- 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 AgGrid
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Confirmed
const AgGrid = ({ properties, methods, loading, events }) => {
const {
quickFilterValue,
columnDefs,
defaultColDef,
- 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 kindOf
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function kindOf(val) {
// eslint-disable-next-line no-void
if (val === void 0) return 'undefined';
if (val === null) return 'null';
- 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 enforceType
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function enforceType(typeName, value) {
switch (typeName) {
case 'string':
return type.isString(value) && value !== '' ? value : null;
case 'number':
- 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 parse
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Confirmed
parse({ actions, args, arrayIndices, event, input, location, operatorPrefix = '_' }) {
if (type.isUndefined(input)) {
return { output: input, errors: [] };
}
if (event && !type.isObject(event)) {
Function buildEvents
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Confirmed
function buildEvents(block, pageContext) {
if (block.events) {
Object.keys(block.events).map((key) => {
if (
(!type.isArray(block.events[key]) && !type.isObject(block.events[key])) ||
Function labelLogic
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const labelLogic = ({
blockId,
content,
methods,
properties = {},
- 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 parse
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
parse({ args, input, location, operatorPrefix = '_' }) {
if (type.isUndefined(input)) {
return { output: input, errors: [] };
}
if (args && !type.isArray(args)) {
- 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 stubBlockProps
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const stubBlockProps = ({ block, meta, logger = () => null, initialValue, schema }) => {
const [value, setState] = useState(type.enforceType(meta.valueType, block.value || initialValue));
const setValue = (val) => {
setState(type.enforceType(meta.valueType, val));
};
- 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 getter
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getter(target, path, options) {
if (typeTest.isNone(path) || !isValidObject(target)) {
return typeof options.default !== 'undefined' ? options.default : undefined;
}
Function stableStringify
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function stableStringify(obj, opts) {
if (!opts) opts = {};
if (typeof opts === 'function') opts = { cmp: opts };
let space = opts.space || '';
if (typeof space === 'number') space = Array(space + 1).join(' ');
Function createIcon
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Confirmed
const createIcon = (Icons) => {
const AiOutlineLoading3Quarters = Icons['AiOutlineLoading3Quarters'];
const AiOutlineExclamationCircle = Icons['AiOutlineExclamationCircle'];
const IconBlock = ({ blockId, events, methods, onClick, properties, ...props }) => {
Function setupLink
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Confirmed
function setupLink(lowdefy) {
const { router } = lowdefy._internal;
const { window } = lowdefy._internal.globals;
const backLink = () => router.back();
const disabledLink = () => {};
- 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 parse
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Confirmed
parse({ actions, args, arrayIndices, event, input, location, operatorPrefix = '_' }) {
if (type.isUndefined(input)) {
return { output: input, errors: [] };
}
if (event && !type.isObject(event)) {
- 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 makeReplacer
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const makeReplacer = (customReplacer, isoStringDates) => (key, value) => {
let dateReplacer = (date) => ({ '~d': date.valueOf() });
if (isoStringDates) {
dateReplacer = (date) => ({ '~d': date.toISOString() });
}
- 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 getFromArray
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Confirmed
function getFromArray({ params, array, key, operator, location }) {
if (params === true) return array;
if (type.isString(params)) {
return array.find((item) => item[key] === params);
}
- 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 refReviver
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Confirmed
function refReviver(key, value) {
if (type.isObject(value)) {
if (!type.isUndefined(value._ref)) {
return this.parsedFiles[value._ref.id];
}
- 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"