Showing 47 of 459 total issues
File __mdnData.js
has 5370 lines of code (exceeds 250 allowed). Consider refactoring. Open
export default {
'-ms-overflow-style': {
syntax: 'auto | none | scrollbar | -ms-autohiding-scrollbar',
media: 'interactive',
inherited: true,
File valueKeywords.js
has 1118 lines of code (exceeds 250 allowed). Consider refactoring. Open
export default {
MozAppearance: [
'none',
'button',
'button-arrow-down',
validators
has 93 functions (exceeds 20 allowed). Consider refactoring. Open
const validators = {
MozBinding: isURL,
MozBorderBottomColors: (node, isMultiValue) =>
validateNodeList(isColor)(normalizeNodeList(node, isMultiValue)),
MozBorderLeftColors: (node, isMultiValue) =>
File propertyValidators.js
has 715 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
isInteger,
isStringLiteral,
isURL,
isIdentifier,
File Parser.js
has 430 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* @flow */
import tokenize from 'tokenize-sync'
import {
assignment,
dimension,
Function parseIdentifier
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
parseIdentifier(partial: string = ''): SimpleNode | FunctionNode {
if (this.currentToken.type === 'identifier') {
let nextToken = this.getNextToken(1)
let ident = partial + this.currentToken.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"
Further reading
File properties.js
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
export default {
MozAppearance: true,
MozBackgroundClip: true,
MozBinding: true,
MozBorderBottomColors: true,
Consider simplifying this complex logical expression. Open
if (isMultiValue) {
return (
(node.length === 2 &&
(((isLengthPercentage(node[0]) ||
matchesIdentifier(['left', 'center', 'right'])(node[0])) &&
File valueInitials.js
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
export default {
msOverflowStyle: 'auto',
MozBinding: 'none',
MozBorderBottomColors: 'none',
MozBorderLeftColors: 'none',
File valueInitials.js
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
export default {
msOverflowStyle: 'auto',
MozBinding: 'none',
MozBorderBottomColors: 'none',
MozBorderLeftColors: 'none',
Function isValidProperty
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function isValidProperty(
property: string,
ast: any,
isList?: boolean = false
): boolean {
- 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 parseOperator
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
parseOperator(): SimpleNode {
if (this.currentToken.type === 'operator') {
if (this.scope === 'expression') {
return operator(this.currentToken.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"
Further reading
Function parseIdentifier
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseIdentifier(partial: string = ''): SimpleNode | FunctionNode {
if (this.currentToken.type === 'identifier') {
let nextToken = this.getNextToken(1)
let ident = partial + this.currentToken.value
Function parseFloat
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
parseFloat(integerPart?: number, isNegative?: boolean = false): FloatNode {
// floats can also start with a floating point
// if the integer part is 0
if (this.currentToken.type === 'floating_point') {
const nextToken = this.getNextToken(1)
- 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 isValidProperty
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function isValidProperty(
property: string,
ast: any,
isList?: boolean = false
): boolean {
Function generate
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
generate(node: ASTNode): string {
const generateValue = this.generate.bind(this)
const customGenerator = this.generators[node.type]
if (customGenerator) {
Function walkTokens
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
walkTokens(): Node {
this.updateCurrentToken()
// the following token do not return a node
// but rather add some flags
Consider simplifying this complex logical expression. Open
if (isMultiValue) {
return (
(node.length === 2 &&
validateUnorderedNodeList([
node =>
Consider simplifying this complex logical expression. Open
if (isMultiValue) {
return (
(node.length === 2 &&
validateUnorderedNodeList([
validators.flexGrow,
Function isPosition
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export default function isPosition(node, isMultiValue) {
if (isMultiValue) {
return (
(node.length === 2 &&
(((isLengthPercentage(node[0]) ||
- 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"