dsifford/academic-bloggers-toolkit

View on GitHub

Showing 43 of 1,811 total issues

Function ReferenceFormManual has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function ReferenceFormManual(props: Props) {
const [errorMessage, setErrorMessage] = useState('');
const [data, setData] = useState<CSL.Data>({
id: '',
type: 'webpage',
Severity: Minor
Found in src/js/gutenberg/components/reference-form-manual/index.tsx - About 35 mins to fix

Function parseCSL has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

async function parseCSL(
filepath: string,
isIndependent: boolean,
): Promise<Style[]> {
const xml = await readfile(filepath, { encoding: 'utf-8' });
Severity: Minor
Found in scripts/update-styles.ts - About 35 mins to fix

Function StyleSearch has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export default function StyleSearch(props: Props) {
const [inputValue, setInputValue] = useState(props.value.label);
const [suggestions, setSuggestions] = useState<Style[]>([]);
const [isLoading, setIsLoading] = useState(false);
 
 
Severity: Minor
Found in src/js/components/style-search/index.tsx - About 25 mins to fix
Severity
Category
Status
Source
Language