Showing 11 of 20 total issues
Function render
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { file } = this.props;
const footer = file.footer === undefined ? true : file.footer;
if (!file.title) {
`` has 28 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export default {
/**
* REMINDER:
* ******************
* order is important
Function plugin
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const plugin = postcss.plugin("postcss-cssnext", options => {
options = {
console: console,
warnForDuplicates: true,
warnForDeprecations: true,
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<header className="cssnext-Header js-Headroom">
<div style={{ background: "#000", color: "#fff", textAlign: "center" }}>
<a href="https://moox.io/blog/deprecating-cssnext/">
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<footer className="cssnext-Footer">
<p>
<SVGIcon
Function playground
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function playground(opts) {
opts.options = opts.options || {};
if (!opts.from || !opts.to || !opts.console) {
throw new Error(
Function transformCSS
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function transformCSS() {
const css = opts.from.value;
opts.console.innerHTML = "";
opts.messages.textContent = "";
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { file } = this.props;
const footer = file.footer === undefined ? true : file.footer;
if (!file.title) {
Function testFeature
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
const testFeature = function(t, feature, source, input, expected, slug) {
Consider simplifying this complex logical expression. Open
Open
if (
// feature is not disabled
features[key] !== false &&
// feature is enabled
(features[key] === true ||
Function playground
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
function playground(opts) {
opts.options = opts.options || {};
if (!opts.from || !opts.to || !opts.console) {
throw new Error(
- 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"