Showing 105 of 412 total issues
Function validateKeyframeObject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
style,
logInvalid,
deleteInvalid,
useCSSLint,
cssRules
Function createSnapshotFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
createElement,
renderToMarkup,
defaultRenderer,
defaultRendererProvider,
defaultThemeProvider
Function generateDeclarationReference
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
property,
value,
pseudo = '',
media = '',
support = ''
Function createComponentFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
createElement,
RendererContext,
FelaTheme,
withProxy = false,
alwaysPassThroughProps = []
Function rehydrateRules
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
css,
media = '',
support = '',
cache = {},
specificityPrefix = ''
Function createSnapshotFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
createElement,
renderHandler,
defaultRenderer,
defaultRendererProvider,
defaultThemeProvider
Function RendererProviderFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
BaseComponent,
RendererContext,
createElement,
renderChildren,
statics
Function validateStyleObject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
style,
logInvalid,
deleteInvalid,
useCSSLint,
cssRules
Function processStyleWithPlugins
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
renderer,
style,
type,
props = {},
plugins = renderer.plugins
Function typescript
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function typescript(style) {
for (const property in style) {
const value = style[property]
if (property === 'nested' && isPlainObject(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 nativeMediaQueryPlugin
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function nativeMediaQueryPlugin(style) {
const { width, height } = Dimensions.get('window')
for (const property in style) {
const value = style[property]
- 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 render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { components, x, y, depth, renderCount } = this.props;
let { s } = this.props;
const { Dot } = components;
- 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 setFontSize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const setFontSize = width => {
const fontSize = width > medium ? (width > large ? '18px' : '17px') : '16px';
if (htmlElement) {
htmlElement.style.fontSize = fontSize;
}
- 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 sortMediaQuery
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function sortMediaQuery(mediaQueryOrder = []) {
return function sort(a, b) {
if (mediaQueryOrder.indexOf(b) === -1) {
if (mediaQueryOrder.indexOf(a) === -1) {
return 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"
Further reading
Function Heading
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function Heading({ level, children }) {
const { theme } = useFela()
const [text, fixedId] = getFixedId(children)
const id = getId(children, level, fixedId)
- 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 Content
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function Content({ docsPath, children }) {
const router = useRouter()
const { theme } = useFela()
return (
- 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
Avoid too many return
statements within this function. Open
return undefined
Function getRules
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getRules(cssRules, rules = {}) {
for (let i = 0; i < cssRules.length; ++i) {
const rule = cssRules[i]
const { selectorText, conditionText, style } = rule
- 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 fallbackValuePlugin
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function fallbackValuePlugin(style) {
for (const property in style) {
const value = style[property]
if (Array.isArray(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 deprecate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function deprecate(condition, message, effect) {
if (condition) {
if (!isProd && !cache[message]) {
console.warn(message)
cache[message] = true
- 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"