aureooms/rejuvenate

View on GitHub

Showing 178 of 178 total issues

Similar blocks of code found in 5 locations. Consider refactoring.
Open

export async function apply({readPkg, writePkg}) {
    await update({
        read: readPkg,
        write: writePkg,
        edit(pkgjson) {
Severity: Major
Found in src/transforms/package.json:ensure-babel-env-production.js and 4 other locations - About 2 hrs to fix
src/transforms/package.json:ensure-babel-env-cover.js on lines 20..29
src/transforms/package.json:ensure-babel-env-debug.js on lines 20..29
src/transforms/package.json:ensure-babel-env-development.js on lines 20..29
src/transforms/package.json:ensure-babel-env-test.js on lines 20..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 79.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export async function apply({readPkg, writePkg, fixConfig}) {
    await update({
        read: readPkg,
        write: writePkg,
        edit(pkgjson) {
Severity: Major
Found in src/transforms/prettier:config.js and 1 other location - About 2 hrs to fix
src/transforms/xo:config.js on lines 20..30

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 79.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

export async function apply({readPkg, writePkg}) {
    await update({
        read: readPkg,
        write: writePkg,
        edit(pkgjson) {
Severity: Major
Found in src/transforms/package.json:ensure-babel-env-development.js and 4 other locations - About 2 hrs to fix
src/transforms/package.json:ensure-babel-env-cover.js on lines 20..29
src/transforms/package.json:ensure-babel-env-debug.js on lines 20..29
src/transforms/package.json:ensure-babel-env-production.js on lines 20..29
src/transforms/package.json:ensure-babel-env-test.js on lines 20..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 79.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export async function postcondition({readJSON, assert}) {
    const {plugins} = await readJSON(filename);
    assert.deepStrictEqual(
        // eslint-disable-next-line unicorn/no-array-callback-reference
        plugins.map(key).slice(0, expected.length),
Severity: Major
Found in src/transforms/esdoc:config-sort-plugins.js and 1 other location - About 2 hrs to fix
src/transforms/esdoc:config-sort-plugins.js on lines 31..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 77.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export async function precondition({readJSON, assert}) {
    const {plugins} = await readJSON(filename);
    assert.notDeepStrictEqual(
        // eslint-disable-next-line unicorn/no-array-callback-reference
        plugins.map(key).slice(0, expected.length),
Severity: Major
Found in src/transforms/esdoc:config-sort-plugins.js and 1 other location - About 2 hrs to fix
src/transforms/esdoc:config-sort-plugins.js on lines 22..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 77.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function fixedOrder has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    (sortToTop, key = (x) => x) =>
    (a, b) => {
        const ka = key(a);
        const kb = key(b);
        if (ka === kb) return 0;
Severity: Minor
Found in src/lib/order.js - About 1 hr to fix

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 main has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

export default function main(argv) {
    const {command, options, isDefault} = parse(argv.slice(2));

    const globals = {
        tasks: undefined,
Severity: Minor
Found in src/main.js - About 1 hr to fix

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 filter has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    (resolveFromFile, resolveRequire) =>
    (node, {is, n}) => {
        if (is(node, n.ImportDeclaration) || is(node, n.ExportAllDeclaration)) {
            if (!is(node.source, n.Literal)) return false;
            const source = node.source.value;
Severity: Minor
Found in src/transforms/ava:test-build.js - About 1 hr to fix

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 filter has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    (resolveRequire) =>
    (node, {is, n}) => {
        if (is(node, n.ImportDeclaration) || is(node, n.ExportAllDeclaration)) {
            if (!is(node.source, n.Literal)) return false;
            const source = node.source.value;
Severity: Minor
Found in src/transforms/codemod:use-esm-import-syntax.js - About 1 hr to fix

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

Similar blocks of code found in 7 locations. Consider refactoring.
Open

export async function postcondition({readPkg, assert}) {
    const {devDependencies} = await readPkg();
    assert(devDependencies.ava !== undefined);
    assert(rangeSubset(devDependencies.ava, '>=4.0.0'));
}
Severity: Major
Found in src/transforms/ava:upgrade-from-3-to-4.js and 6 other locations - About 1 hr to fix
src/transforms/ava:upgrade-from-3-to-4.js on lines 18..22
src/transforms/ava:upgrade-from-4-to-5.js on lines 12..16
src/transforms/ava:upgrade-from-4-to-5.js on lines 18..22
src/transforms/ava:use-node-loader-babel.js on lines 22..26
src/transforms/husky:ensure-v9-or-later.js on lines 12..16
src/transforms/husky:ensure-v9-or-later.js on lines 18..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

export async function postcondition({readPkg, assert}) {
    const {devDependencies} = await readPkg();
    assert(devDependencies.husky !== undefined);
    assert(rangeSubset(devDependencies.husky, '>=9.0.0'));
}
Severity: Major
Found in src/transforms/husky:ensure-v9-or-later.js and 6 other locations - About 1 hr to fix
src/transforms/ava:upgrade-from-3-to-4.js on lines 12..16
src/transforms/ava:upgrade-from-3-to-4.js on lines 18..22
src/transforms/ava:upgrade-from-4-to-5.js on lines 12..16
src/transforms/ava:upgrade-from-4-to-5.js on lines 18..22
src/transforms/ava:use-node-loader-babel.js on lines 22..26
src/transforms/husky:ensure-v9-or-later.js on lines 18..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

export async function precondition({readPkg, assert}) {
    const {devDependencies} = await readPkg();
    assert(devDependencies.ava !== undefined);
    assert(rangeSubset(devDependencies.ava, '3.x'));
}
Severity: Major
Found in src/transforms/ava:upgrade-from-3-to-4.js and 6 other locations - About 1 hr to fix
src/transforms/ava:upgrade-from-3-to-4.js on lines 12..16
src/transforms/ava:upgrade-from-4-to-5.js on lines 12..16
src/transforms/ava:upgrade-from-4-to-5.js on lines 18..22
src/transforms/ava:use-node-loader-babel.js on lines 22..26
src/transforms/husky:ensure-v9-or-later.js on lines 12..16
src/transforms/husky:ensure-v9-or-later.js on lines 18..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

export async function precondition({readPkg, assert}) {
    const {devDependencies} = await readPkg();
    assert(devDependencies.ava !== undefined);
    assert(rangeSubset(devDependencies.ava, '>=4.0.0'));
}
Severity: Major
Found in src/transforms/ava:use-node-loader-babel.js and 6 other locations - About 1 hr to fix
src/transforms/ava:upgrade-from-3-to-4.js on lines 12..16
src/transforms/ava:upgrade-from-3-to-4.js on lines 18..22
src/transforms/ava:upgrade-from-4-to-5.js on lines 12..16
src/transforms/ava:upgrade-from-4-to-5.js on lines 18..22
src/transforms/husky:ensure-v9-or-later.js on lines 12..16
src/transforms/husky:ensure-v9-or-later.js on lines 18..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

export async function apply({read, write}) {
    await update({
        read: () => read(filename),
        write: (text) => write(filename, text),
        edit: (text) => format(text),
Severity: Major
Found in src/transforms/codeclimate:format-config-file.js and 1 other location - About 1 hr to fix
src/transforms/esdoc:format-config-file.js on lines 25..31

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

export async function postcondition({readPkg, assert}) {
    const {devDependencies} = await readPkg();
    assert(devDependencies.ava !== undefined);
    assert(rangeSubset(devDependencies.ava, '>=5.0.0'));
}
Severity: Major
Found in src/transforms/ava:upgrade-from-4-to-5.js and 6 other locations - About 1 hr to fix
src/transforms/ava:upgrade-from-3-to-4.js on lines 12..16
src/transforms/ava:upgrade-from-3-to-4.js on lines 18..22
src/transforms/ava:upgrade-from-4-to-5.js on lines 18..22
src/transforms/ava:use-node-loader-babel.js on lines 22..26
src/transforms/husky:ensure-v9-or-later.js on lines 12..16
src/transforms/husky:ensure-v9-or-later.js on lines 18..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

export async function precondition({readPkg, assert}) {
    const {devDependencies} = await readPkg();
    assert(devDependencies.ava !== undefined);
    assert(rangeSubset(devDependencies.ava, '4.x'));
}
Severity: Major
Found in src/transforms/ava:upgrade-from-4-to-5.js and 6 other locations - About 1 hr to fix
src/transforms/ava:upgrade-from-3-to-4.js on lines 12..16
src/transforms/ava:upgrade-from-3-to-4.js on lines 18..22
src/transforms/ava:upgrade-from-4-to-5.js on lines 12..16
src/transforms/ava:use-node-loader-babel.js on lines 22..26
src/transforms/husky:ensure-v9-or-later.js on lines 12..16
src/transforms/husky:ensure-v9-or-later.js on lines 18..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

export async function apply({read, write}) {
    await update({
        read: () => read(filename),
        write: (text) => write(filename, text),
        edit: (text) => format(text),
Severity: Major
Found in src/transforms/esdoc:format-config-file.js and 1 other location - About 1 hr to fix
src/transforms/codeclimate:format-config-file.js on lines 24..30

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

export async function precondition({readPkg, assert}) {
    const {devDependencies} = await readPkg();
    assert(devDependencies.husky !== undefined);
    assert(rangeSubset(devDependencies.husky, '>=9.0.0'));
}
Severity: Major
Found in src/transforms/husky:ensure-v9-or-later.js and 6 other locations - About 1 hr to fix
src/transforms/ava:upgrade-from-3-to-4.js on lines 12..16
src/transforms/ava:upgrade-from-3-to-4.js on lines 18..22
src/transforms/ava:upgrade-from-4-to-5.js on lines 12..16
src/transforms/ava:upgrade-from-4-to-5.js on lines 18..22
src/transforms/ava:use-node-loader-babel.js on lines 22..26
src/transforms/husky:ensure-v9-or-later.js on lines 12..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

export async function postcondition({read, glob, assert}) {
    const found = await find(patterns, glob(manual), {
        read,
        method: find.exact,
    });
src/transforms/docs:replace-scoped-babel-polyfill-with-regenerator-runtime.js on lines 18..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

export async function postcondition({read, glob, assert}) {
    const found = await find(patterns, glob(manual), {
        read,
        method: find.exact,
    });
src/transforms/docs:replace-unscoped-babel-packages-with-scoped-babel-packages.js on lines 21..27

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language