Showing 6 of 29 total issues
Function cli
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const cli = async (): Promise<void> => {
clear();
const program = commander
.name(packageData.name)
.version(packageData.version)
- 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 data
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
data(sao) {
/**
* Package Manager
*/
Function Badges
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Badges() {
return (
<div className={styles.topBadges}>
<a href="https://www.producthunt.com/posts/superplate?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-superplate" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=293252&theme=light" alt="Superplate - The frontend boilerplate with superpowers | Product Hunt" style={{ width: 250, height: 54 }} width="250" height="54" /></a>
<br />
Function prompts
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
prompts(sao) {
const {
appName,
extras: { paths, presetAnswers },
} = sao.opts;
- 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 { error: repoStatus.error };
Function postInstall
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const postInstall: PostInstallFn = ({ name, dir, pm }) => {
console.log("");
console.log(
`${chalk.green.bold("Success!")} Created ${chalk.greenBright.bold(
- 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"