react-scheduler/react-big-schedule

View on GitHub

Fix build lib
#182

ansulagrawal wants to merge fix-build-lib into master
Failed
5 issues to fix.

File sample1.js has 351 lines of code (exceeds 250 allowed). Consider refactoring.
New

const DemoData = {
  resources: [
    { id: 'r0', name: 'Resource0', title: 'Resource 0', groupOnly: true },
    { id: 'r1', name: 'Resource1', title: 'Resource 1', parentId: 'r0' },
    { id: 'r2', name: 'Resource2', parentId: 'r3' },
Severity: Minor
Found in src/sample-data/sample1.js - About 4 hrs to fix

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

    export {
      AddMorePopover,
      CellUnit,
      DATETIME_FORMAT,
      DATE_FORMAT,
    Severity: Major
    Found in src/index.js and 1 other location - About 1 hr to fix
    src/components/index.jsx on lines 452..452

    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 61.

    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.
    New

    export { AddMorePopover, CellUnit, DATETIME_FORMAT, DATE_FORMAT, DemoData, DnDContext, DnDSource, Scheduler, SchedulerData, SummaryPos, ViewType, wrapperFun };
    Severity: Major
    Found in src/components/index.jsx and 1 other location - About 1 hr to fix
    src/index.js on lines 1..14

    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 61.

    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.
    New

                  <div
                    style={resourceContentStyle}
                    ref={this.schedulerResourceRef}
                    onMouseOver={this.onSchedulerResourceMouseOver}
                    onFocus={this.onSchedulerResourceMouseOver}
    Severity: Major
    Found in src/components/index.jsx and 1 other location - About 2 hrs to fix
    src/components/index.jsx on lines 255..276

    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 78.

    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.
    New

                  <div
                    style={schedulerContentStyle}
                    ref={this.schedulerContentRef}
                    onMouseOver={this.onSchedulerContentMouseOver}
                    onFocus={this.onSchedulerContentMouseOver}
    Severity: Major
    Found in src/components/index.jsx and 1 other location - About 2 hrs to fix
    src/components/index.jsx on lines 223..233

    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 78.

    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.
    Fixed

    Severity: Major
    Found in src/index.js and 1 other location - About 1 hr to fix
    src/components/index.jsx on lines 448..448

    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 61.

    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.
    Fixed

    Severity: Major
    Found in src/components/index.jsx and 1 other location - About 1 hr to fix
    src/index.js on lines 1..14

    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 61.

    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.
    Fixed

    Severity: Major
    Found in src/components/index.jsx and 1 other location - About 1 hr to fix
    src/components/index.jsx on lines 252..271

    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 56.

    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.
    Fixed

    Severity: Major
    Found in src/components/index.jsx and 1 other location - About 1 hr to fix
    src/components/index.jsx on lines 224..232

    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 56.

    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

    Unexpected template string expression.
    Fixed

    Severity: Minor
    Found in release.config.js by eslint

    title: no-template-curly-in-string

    rule_type: problem

    ECMAScript 6 allows programmers to create strings containing variable or expressions using template literals, instead of string concatenation, by writing expressions like ${variable} between two backtick quotes (`). It can be easy to use the wrong quotes when wanting to use template literals, by writing "${variable}", and end up with the literal value "${variable}" instead of a string containing the value of the injected expressions.

    Rule Details

    This rule aims to warn when a regular string contains what looks like a template literal placeholder. It will warn when it finds a string containing the template literal placeholder (${something}) that uses either " or ' for the quotes.

    Examples

    Examples of incorrect code for this rule:

    ::: incorrect

    /*eslint no-template-curly-in-string: "error"*/
    "Hello ${name}!";
    'Hello ${name}!';
    "Time: ${12 * 60 * 60 * 1000}";

    :::

    Examples of correct code for this rule:

    ::: correct

    /*eslint no-template-curly-in-string: "error"*/
    `Hello ${name}!`;
    `Time: ${12 * 60 * 60 * 1000}`;
    
    templateFunction`Hello ${name}`;

    :::

    When Not To Use It

    This rule should not be used in ES3/5 environments. Source: http://eslint.org/docs/rules/

    Unexpected template string expression.
    Fixed

    Severity: Minor
    Found in release.config.js by eslint

    title: no-template-curly-in-string

    rule_type: problem

    ECMAScript 6 allows programmers to create strings containing variable or expressions using template literals, instead of string concatenation, by writing expressions like ${variable} between two backtick quotes (`). It can be easy to use the wrong quotes when wanting to use template literals, by writing "${variable}", and end up with the literal value "${variable}" instead of a string containing the value of the injected expressions.

    Rule Details

    This rule aims to warn when a regular string contains what looks like a template literal placeholder. It will warn when it finds a string containing the template literal placeholder (${something}) that uses either " or ' for the quotes.

    Examples

    Examples of incorrect code for this rule:

    ::: incorrect

    /*eslint no-template-curly-in-string: "error"*/
    "Hello ${name}!";
    'Hello ${name}!';
    "Time: ${12 * 60 * 60 * 1000}";

    :::

    Examples of correct code for this rule:

    ::: correct

    /*eslint no-template-curly-in-string: "error"*/
    `Hello ${name}!`;
    `Time: ${12 * 60 * 60 * 1000}`;
    
    templateFunction`Hello ${name}`;

    :::

    When Not To Use It

    This rule should not be used in ES3/5 environments. Source: http://eslint.org/docs/rules/

    There are no issues that match your filters.

    Category
    Status
    FileMaintainability
    webpack.config.js
    A
    0 mins
    src/sample-data/sample1.js
    A
    B
    +4 hrs
    vite.config.js
    A
    release.config.js
    A