fbredius/storybook

View on GitHub
lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx

Summary

Maintainability
F
3 wks
Test Coverage

File JsonNodes.tsx has 1395 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable react/sort-comp */
/* eslint-disable react/no-array-index-key */

/* eslint-disable no-undef */
Severity: Major
Found in lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx - About 3 days to fix

    Function render has 280 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render() {
        const { data, name, keyPath, deep } = this.state;
        const {
          isCollapsed,
          handleRemove,
    Severity: Major
    Found in lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx - About 1 day to fix

      Function renderNotCollapsed has 93 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        renderNotCollapsed() {
          const { name, data, keyPath, deep, nextDeep, addFormVisible } = this.state;
          const {
            isCollapsed,
            handleRemove,
      Severity: Major
      Found in lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx - About 3 hrs to fix

        Function renderNotCollapsed has 93 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          renderNotCollapsed() {
            const { name, data, keyPath, deep, addFormVisible, nextDeep } = this.state;
            const {
              isCollapsed,
              handleRemove,
        Severity: Major
        Found in lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx - About 3 hrs to fix

          Function render has 69 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render() {
              const { name, value, editEnabled, keyPath, deep } = this.state;
              const {
                handleRemove,
                originalValue,
          Severity: Major
          Found in lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx - About 2 hrs to fix

            Function render has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render() {
                const { name, value, editEnabled, keyPath, deep } = this.state;
                const {
                  handleRemove,
                  originalValue,
            Severity: Major
            Found in lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx - About 2 hrs to fix

              Function render has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render() {
                  const {
                    handleCancel,
                    onlyValue,
                    addButtonElement,
              Severity: Minor
              Found in lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx - About 1 hr to fix

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

                  render() {
                    const { name, value, editEnabled, keyPath, deep } = this.state;
                    const {
                      handleRemove,
                      originalValue,
                Severity: Minor
                Found in lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx - About 35 mins 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 2 locations. Consider refactoring.
                Open

                  constructor(props: JsonFunctionValueProps) {
                    super(props);
                    const keyPath = [...props.keyPath, props.name];
                    this.state = {
                      value: props.value,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1407..1425

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

                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

                  constructor(props: JsonValueProps) {
                    super(props);
                    const keyPath = [...props.keyPath, props.name];
                    this.state = {
                      value: props.value,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 506..524

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

                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

                interface JsonValueProps {
                  name: string;
                  value: any;
                  originalValue?: any;
                  keyPath?: string[];
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 678..695

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

                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

                interface JsonFunctionValueProps {
                  name: string;
                  value: any;
                  originalValue?: any;
                  keyPath?: string[];
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1570..1587

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

                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

                  render() {
                    const { name, collapsed, data, keyPath, deep } = this.state;
                    const { getStyle, dataType } = this.props;
                    const value = collapsed ? this.renderCollapsed() : this.renderNotCollapsed();
                    const style = getStyle(name, data, keyPath, deep, dataType);
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 443..459

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

                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

                  render() {
                    const { name, collapsed, data, keyPath, deep } = this.state;
                    const { dataType, getStyle } = this.props;
                    const value = collapsed ? this.renderCollapsed() : this.renderNotCollapsed();
                    const style = getStyle(name, data, keyPath, deep, dataType);
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1344..1360

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

                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

                  handleEdit() {
                    const { handleUpdateValue, originalValue, logger, onSubmitValueParser, keyPath } = this.props;
                    const { inputRef, name, deep } = this.state;
                    if (!inputRef) return;
                
                
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 560..581

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

                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 3 locations. Consider refactoring.
                Open

                      case dataTypes.ERROR:
                        return (
                          <JsonObject
                            data={data}
                            name={name}
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 784..811
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 812..839

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

                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 3 locations. Consider refactoring.
                Open

                      case dataTypes.ARRAY:
                        return (
                          <JsonArray
                            data={data}
                            name={name}
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 756..783
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 784..811

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

                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

                  handleEdit() {
                    const { handleUpdateValue, originalValue, logger, onSubmitValueParser, keyPath } = this.props;
                    const { inputRef, name, deep } = this.state;
                    if (!inputRef) return;
                
                
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1461..1482

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

                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 3 locations. Consider refactoring.
                Open

                      case dataTypes.OBJECT:
                        return (
                          <JsonObject
                            data={data}
                            name={name}
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 756..783
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 812..839

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

                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

                  onKeydown(event: KeyboardEvent) {
                    if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey || event.repeat) return;
                    if (event.code === 'Enter' || event.key === 'Enter') {
                      event.preventDefault();
                      this.handleEdit();
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1449..1459

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

                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

                  onKeydown(event: KeyboardEvent) {
                    if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey || event.repeat) return;
                    if (event.code === 'Enter' || event.key === 'Enter') {
                      event.preventDefault();
                      this.handleEdit();
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 548..558

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

                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 3 locations. Consider refactoring.
                Open

                      case dataTypes.SYMBOL:
                        return (
                          <JsonValue
                            name={name}
                            value={data.toString()}
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 903..923
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 966..986

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

                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 3 locations. Consider refactoring.
                Open

                      case dataTypes.FUNCTION:
                        return (
                          <JsonFunctionValue
                            name={name}
                            value={data.toString()}
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 903..923
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 987..1007

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

                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 3 locations. Consider refactoring.
                Open

                      case dataTypes.DATE:
                        return (
                          <JsonValue
                            name={name}
                            value={data.toISOString()}
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 966..986
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 987..1007

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

                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

                  onChildUpdate(childKey: string, childData: any) {
                    const { data, keyPath } = this.state;
                    // Update data
                    // @ts-ignore
                    data[childKey] = childData;
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 194..207

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

                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

                  onChildUpdate(childKey: string, childData: any) {
                    const { data, keyPath } = this.state;
                    // Update data
                    // @ts-ignore
                    data[childKey] = childData;
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1086..1099

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

                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

                      case dataTypes.UNDEFINED:
                        return (
                          <JsonValue
                            name={name}
                            value="undefined"
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 924..944

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

                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

                      case dataTypes.NULL:
                        return (
                          <JsonValue
                            name={name}
                            value="null"
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 945..965

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

                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

                  componentDidUpdate() {
                    const { editEnabled, inputRef, name, value, keyPath, deep } = this.state;
                    const { readOnly, dataType } = this.props;
                    const isReadOnly = readOnly(name, value, keyPath, deep, dataType);
                
                
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 530..538

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

                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

                  componentDidUpdate() {
                    const { editEnabled, inputRef, name, value, keyPath, deep } = this.state;
                    const { readOnly, dataType } = this.props;
                    const readOnlyResult = readOnly(name, value, keyPath, deep, dataType);
                
                
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1431..1439

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

                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

                    const {
                      isCollapsed,
                      handleRemove,
                      onDeltaUpdate,
                      readOnly,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 346..365

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

                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

                    const {
                      isCollapsed,
                      handleRemove,
                      onDeltaUpdate,
                      readOnly,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1244..1263

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

                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

                    this.state = {
                      name: props.name,
                      data: props.data,
                      keyPath,
                      deep: props.deep,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 168..176

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

                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

                    this.state = {
                      data: props.data,
                      name: props.name,
                      keyPath,
                      deep: props.deep,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1060..1068

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

                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

                interface JsonValueState {
                  value: JsonValueProps['value'];
                  name: JsonValueProps['name'];
                  keyPath: string[];
                  deep: JsonValueProps['deep'];
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 496..503

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

                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

                interface JsonFunctionValueState {
                  value: JsonFunctionValueProps['value'];
                  name: JsonFunctionValueProps['name'];
                  keyPath: string[];
                  deep: JsonFunctionValueProps['deep'];
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1397..1404

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

                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

                    const {
                      handleRemove,
                      originalValue,
                      readOnly,
                      dataType,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 602..613

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

                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

                    const {
                      handleRemove,
                      originalValue,
                      readOnly,
                      dataType,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1503..1514

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

                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

                JsonArray.defaultProps = {
                  keyPath: [],
                  deep: 0,
                  minusMenuElement: <span> - </span>,
                  plusMenuElement: <span> + </span>,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1390..1395

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

                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

                JsonObject.defaultProps = {
                  keyPath: [],
                  deep: 0,
                  minusMenuElement: <span> - </span>,
                  plusMenuElement: <span> + </span>,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 489..494

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

                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

                  static getDerivedStateFromProps(props: JsonObjectProps, state: JsonObjectState) {
                    return props.data !== state.data ? { data: props.data } : null;
                  }
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 190..192
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 526..528
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 725..727
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1427..1429

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

                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

                  static getDerivedStateFromProps(props: JsonFunctionValueProps, state: JsonFunctionValueState) {
                    return props.value !== state.value ? { value: props.value } : null;
                  }
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 190..192
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 725..727
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1082..1084
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1427..1429

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

                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

                  static getDerivedStateFromProps(props: JsonNodeProps, state: JsonNodeState) {
                    return props.data !== state.data ? { data: props.data } : null;
                  }
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 190..192
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 526..528
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1082..1084
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1427..1429

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

                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

                  static getDerivedStateFromProps(props: JsonValueProps, state: JsonValueState) {
                    return props.value !== state.value ? { value: props.value } : null;
                  }
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 190..192
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 526..528
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 725..727
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1082..1084

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

                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

                  static getDerivedStateFromProps(props: JsonArrayProps, state: JsonArrayState) {
                    return props.data !== state.data ? { data: props.data } : null;
                  }
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 526..528
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 725..727
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1082..1084
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1427..1429

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

                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

                    const {
                      handleCancel,
                      onlyValue,
                      addButtonElement,
                      cancelButtonElement,
                lib/ui/src/components/layout/container.tsx on lines 494..494

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

                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

                          onDeltaUpdate({
                            type: deltaTypes.UPDATE_DELTA_TYPE,
                            keyPath,
                            deep,
                            key,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 1202..1209

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

                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

                          onDeltaUpdate({
                            type: deltaTypes.UPDATE_DELTA_TYPE,
                            keyPath,
                            deep,
                            key,
                lib/components/src/controls/react-editable-json-tree/JsonNodes.tsx on lines 306..313

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

                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

                " should be '
                Open

                        <span className="rejt-collapsed-text" style={collapsed} onClick={this.handleCollapseMode}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <span className="rejt-name" style={style.name}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <span className="rejt-collapsed-text" style={collapsed} onClick={this.handleCollapseMode}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                      <li className="rejt-value-node" style={style.li}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                            className="rejt-value"

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                            originalValue="undefined"

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                block is empty
                Open

                  handleUpdateValue: () => {},

                Rule: no-empty

                Disallows empty blocks.

                Blocks with a comment inside are not considered empty.

                Rationale

                Empty blocks are often indicators of missing code.

                Config

                If allow-empty-catch is specified, then catch blocks are allowed to be empty. If allow-empty-functions is specified, then function definitions are allowed to be empty.

                Examples
                "no-empty": true
                "no-empty": true,allow-empty-catch
                "no-empty": true,allow-empty-functions
                "no-empty": true,allow-empty-catch,allow-empty-functions
                Schema
                {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "allow-empty-catch"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "allow-empty-functions"
                        ]
                      }
                    ]
                  }
                }

                For more information see this page.

                " should be '
                Open

                      <span className="rejt-not-collapsed">

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                            value="undefined"

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                      <span className="rejt-collapsed">

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                          <div className="rejt-add-form" style={addForm}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                      <span className="rejt-collapsed">

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <span className="rejt-edit-form" style={style.editForm}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <span className="rejt-name" style={style.name}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                      <span className="rejt-add-value-node">

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                      <span className="rejt-not-collapsed">

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <ul className="rejt-not-collapsed-list" style={ul}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                          className="rejt-value"

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <span className="rejt-not-collapsed-delimiter" style={delimiter}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <span className="rejt-not-collapsed-delimiter" style={delimiter}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                      <div className="rejt-array-node">

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                          <span className="rejt-name" style={style.name}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <span className="rejt-not-collapsed-delimiter" style={delimiter}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                          <span className="rejt-edit-form" style={style.editForm}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <ul className="rejt-not-collapsed-list" style={ul}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                          <div className="rejt-add-form" style={addForm}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                            value="null"

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                      <div className="rejt-object-node">

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                            originalValue="null"

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                        <span className="rejt-not-collapsed-delimiter" style={delimiter}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                          <span className="rejt-name" style={style.name}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                " should be '
                Open

                      <li className="rejt-function-value-node" style={style.li}>

                Rule: quotemark

                Enforces quote character for string literals.

                Notes
                • Has Fix

                Config

                Five arguments may be optionally provided:

                • "single" enforces single quotes.
                • "double" enforces double quotes.
                • "backtick" enforces backticks.
                • "jsx-single" enforces single quotes for JSX attributes.
                • "jsx-double" enforces double quotes for JSX attributes.
                • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
                • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
                Examples
                "quotemark": true,single,avoid-escape,avoid-template
                "quotemark": true,single,jsx-double
                Schema
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "single",
                      "double",
                      "backtick",
                      "jsx-single",
                      "jsx-double",
                      "avoid-escape",
                      "avoid-template"
                    ]
                  },
                  "minLength": 0,
                  "maxLength": 5
                }

                For more information see this page.

                There are no issues that match your filters.

                Category
                Status