Showing 9 of 20 total issues
Function exports
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = async (src, dest, opts) => {
// Load user defined config or fall back to default file locations
const result = await joycon.load(opts.config ? [opts.config] : undefined);
if (!result.path && !opts.quiet) {
File config.js
has 322 lines of code (exceeds 250 allowed). Consider refactoring. Open
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck 😢
/* eslint "@typescript-eslint/no-unsafe-argument": "warn" */
/* eslint "@typescript-eslint/no-unsafe-call": "warn" */
/* eslint "@typescript-eslint/no-unsafe-member-access": "warn" */
Function exports
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
module.exports = async (src, dest, opts) => {
// Load user defined config or fall back to default file locations
const result = await joycon.load(opts.config ? [opts.config] : undefined);
if (!result.path && !opts.quiet) {
- 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 accessorsProxy
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function accessorsProxy<
T extends Record<string, unknown> | UndefinedProperty,
>(obj: T, parentPath: string): T {
for (const key in obj) {
if (has.call(obj, key)) {
- 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 xcss
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function xcss(
template: TemplateStringsArray,
...expressions: XCSSExpression[]
): string {
const strings = template.raw;
- 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 accessorsProxy
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function accessorsProxy<
T extends Record<string, unknown> | UndefinedProperty,
>(obj: T, parentPath: string): T {
for (const key in obj) {
if (has.call(obj, key)) {
Function xcss
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function xcss(
template: TemplateStringsArray,
...expressions: XCSSExpression[]
): string {
const strings = template.raw;
Function compile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function compile(
code: string,
{
from,
to,
- 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 resolveGlobals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function resolveGlobals(obj) {
/** @type {ResolvedExpressionOrNested} */
const resolved = {};
for (const [key, value] of Object.entries(obj)) {
- 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"