Showing 502 of 700 total issues
Function JSXElement
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
JSXElement(node) {
const elementName = node.openingElement.name.name;
if (!isVoidDOMElement(elementName)) {
// e.g. <div />
Function reportUnusedPropType
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function reportUnusedPropType(component, props) {
// Skip props that check instances
if (props === true) {
return;
}
Function create
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create(context) {
const option = context.options[0] || 'always';
return {
'ClassProperty, PropertyDefinition'(node) {
if (
Function create
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create(context) {
const configuration = context.options[0] || {};
const forbid = new Map((configuration.forbid || DEFAULTS).map((value) => {
const propName = typeof value === 'string' ? value : value.propName;
return [propName, {
Function handleClosingElement
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleClosingElement(node) {
if (!node.parent) {
return;
}
Function refersToReactFragment
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function refersToReactFragment(node, name) {
const variableInit = variableUtil.findVariableByName(context, node, name);
if (!variableInit) {
return false;
}
Function MemberExpression
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MemberExpression(node) {
const isDefaultProp = propsUtil.isDefaultPropsDeclaration(node);
if (!isDefaultProp) {
return;
Function getPropertyName
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getPropertyName(context, node, utils, checkAsyncSafeLifeCycles) {
const property = node.property;
if (property) {
switch (property.type) {
case 'Identifier':
Function CallExpression
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
CallExpression(node) {
const callee = node.callee;
const parent = node.parent;
if (callee.type !== 'MemberExpression') {
return;
Function findAllTypeAnnotations
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findAllTypeAnnotations(identifier, node) {
if (node.type === 'TSTypeLiteral' || node.type === 'ObjectTypeAnnotation' || node.type === 'TSInterfaceBody') {
const currentNode = [].concat(
objectTypeAnnotations.get(identifier.name) || [],
node
Function create
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create(context) {
const configuration = context.options[0] || {};
const ignoreCase = configuration.ignoreCase || false;
return {
Function handleOpeningElement
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleOpeningElement(node) {
const sourceCode = getSourceCode(context);
let prevToken = sourceCode.getTokenBefore(node);
if (!prevToken) {
return;
Function reportErrorIfLifecycleMethodCasingTypo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function reportErrorIfLifecycleMethodCasingTypo(node) {
const key = node.key;
let nodeKeyName = key.name;
if (key.type === 'Literal') {
nodeKeyName = key.value;
Function Program:exit
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
'Program:exit'() {
const list = components.list();
values(list).filter((component) => {
if (functions === 'ignore' && astUtil.isFunctionLike(component.node)) {
Consider simplifying this complex logical expression. Open
Open
if (
(ancestor.type !== 'Property' && ancestor.type !== 'MethodDefinition' && ancestor.type !== 'ClassProperty' && ancestor.type !== 'PropertyDefinition')
|| !nameMatches(ancestor.key.name)
|| (mode !== 'disallow-in-func' && depth > 1)
) {
Consider simplifying this complex logical expression. Open
Open
if (
value
&& value.type === 'CallExpression'
&& value.callee
&& value.callee.property
Function fixPropTypesSort
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
context,
fixer,
declarations,
ignoreCase,
requiredFirst,
Consider simplifying this complex logical expression. Open
Open
if (
!node.value
|| !node.value.expression
|| (!checkInlineFunction && isInlineHandler(node))
|| (
Consider simplifying this complex logical expression. Open
Open
if (
parent.type && parent.type === 'JSXAttribute'
&& (node.expression && node.expression.type
&& node.expression.type !== 'Literal'
&& node.expression.type !== 'StringLiteral'
Consider simplifying this complex logical expression. Open
Open
if (node.type === 'CallExpression'
&& node.callee
&& node.callee.type === 'Identifier'
&& node.callee.name === 'String'
&& Array.isArray(node.arguments)