Showing 91 of 91 total issues
Function setup
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
autoplay: true,
geocode: 'Colorado1234',
tabs: [{
Function setup
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
_editable: '<!--#storyblok#{"name": "Form", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
content: [{
_editable: '<!--#storyblok#{"name": "FormGrid", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
Function setup
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
_editable: '<!--#storyblok#{"name": "Card", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
content: [{
_editable: '<!--#storyblok#{"name": "CardActions", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
Function setup
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
tabs: [{
component: 'Tab',
label: 'First Tab option',
Function setup
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
dialog: [{
component: 'Dialog',
content: [{
Function setup
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
menuName: [{
component: 'Typography',
content: [{
Function setup
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup(isButton = false, redirectRoute = undefined, href = undefined) {
const props = {
_editable: '<!--#storyblok#{"name": "ListItemButton", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
listItemAvatar: [{
Function setMetadata
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const setMetadata = (res) => {
if (res.data.story.content.seo) {
const metadataTag = checkForMetaTag('metadataTitle');
const metaOgTitle = checkForMetaTag('metaOgTitle', 'og:title');
const metaOgImage = checkForMetaTag('metaOgImage', 'og:image');
Function setup
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
_editable: '<!--#storyblok#{"name": "ButtonDrawer", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
anchor: 'left',
elevation: 16,
Function setup
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
_editable: '<!--#storyblok#{"name": "IconButtonDrawer", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
anchor: 'left',
elevation: 16,
Function setup
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
cellHeight: '180',
cols: '3',
spacing: '4',
Function setup
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
_editable: '<!--#storyblok#{"name": "ReviewCard", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
overline: 'overline',
heading: 'heading',
Function setup
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
_editable: '<!--#storyblok#{"name": "PostCard", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
overline: 'overline',
heading: 'heading',
Function setup
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
height: '100px',
width: '100px',
header: [{
Function setup
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup(open = false) {
const props = {
open,
toggleDialog: jest.fn(),
content: [{
Function setup
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup(open = false) {
const props = {
open,
toggleDrawer: jest.fn(),
_editable: '<!--#storyblok#{"name": "Drawer", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
Function setup
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup() {
const props = {
_editable: '<!--#storyblok#{"name": "ButtonDialog", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
button: [{
_editable: '<!--#storyblok#{"name": "Button", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
Function dimensionProp
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Confirmed
Confirmed
export const dimensionProp = (props, propName, componentName) => {
// use 'px', 'em', '%' 'vh', 'vw', as unit of measurement for height and width prop
let error;
if (propName === 'height' || propName === 'width') {
- 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 Grid
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
const Grid = ({
alignContent,
alignItems,
rootClass,
direction,
- 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
'style' is missing in props validation Open
Open
style,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/