Showing 38 of 79 total issues
Function default
has 205 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = [
"webpack",
"webpack-cli",
Function default
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = [
"webpack",
"webpack-cli",
Function default
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = [
"webpack",
"webpack-cli",
Function default
has 177 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = ["webpack", "webpack-cli"];
await plop.load("../../utils/pkgInstallAction.js", {}, true);
Function default
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = [
"webpack",
"webpack-cli",
- 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 apply
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
async apply(cli: IWebpackCLI): Promise<void> {
await cli.makeCommand(
{
name: "init [generation-path]",
alias: ["create", "new", "c", "n"],
Function actions
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
actions: function (answers: Answers) {
// setting some default values based on the answers
const actions: ActionType[] = [];
answers.htmlWebpackPlugin = true;
answers.devServer = true;
Function actions
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
actions: function (answers: Answers) {
// setting some default values based on the answers
const actions: ActionType[] = [];
answers.htmlWebpackPlugin = true;
answers.devServer = true;
Function checkAndPrepareContent
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
async function checkAndPrepareContent(config: AddConfig, isTemplate: boolean): Promise<Result> {
const fileExists = await doesFileExists(config.path);
let existingFileContent: Content = "";
let newContent: Content = "";
- 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 default
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = ["webpack", "webpack-cli"];
await plop.load("../../utils/pkgInstallAction.js", {}, true);
- 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 default
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = [
"webpack",
"webpack-cli",
- 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 actions
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
actions: function (answers: Answers) {
// setting some default values based on the answers
const actions: ActionType[] = [];
answers.htmlWebpackPlugin = true;
answers.devServer = true;
Function checkAndPrepareContent
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function checkAndPrepareContent(config: AddConfig, isTemplate: boolean): Promise<Result> {
const fileExists = await doesFileExists(config.path);
let existingFileContent: Content = "";
let newContent: Content = "";
Function default
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = [
"webpack",
"webpack-cli",
- 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 actions
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
actions: function (answers: Answers) {
const actions: ActionType[] = [];
switch (answers.langType) {
case "ES6":
Function default
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = ["webpack-defaults"];
await plop.load("../../utils/pkgInstallAction.js", {}, true);
Function addonGenerator
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addonGenerator = <
T extends BaseCustomGeneratorOptions = BaseCustomGeneratorOptions,
Z extends CustomGeneratorOptions<T> = CustomGeneratorOptions<T>,
>(
prompts: Generator.Questions,
Function default
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
// dependencies to be installed
const devDependencies: Array<string> = ["webpack-defaults"];
await plop.load("../../utils/pkgInstallAction.js", {}, true);
Function questions
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export async function questions(
self: CustomGenerator,
Question: typeof QuestionAPI,
config: Record<string, { skip?: boolean; required?: boolean }> = {
langType: {},
- 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 default
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default async function (plop: NodePlopAPI) {
plop.setPlopfilePath(resolve(__dirname, "../plopfile.js"));
plop.setDefaultInclude({ actions: true });
plop.setActionType("pkgInstall", (answers, config) => {
const options: SpawnOptionsWithStdioTuple<