mkungla/atom-aframe

View on GitHub

Showing 13 of 13 total issues

File provider.js has 359 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use babel'
 
import APRIMITIVES from '../../data/primitives.json'
import AATTRIBUTES from '../../data/attributes.json'
import ACOMPONENTS from '../../data/components.json'
Severity: Minor
Found in src/autocomplete/provider.js - About 4 hrs to fix

    Function buildMappingAttributeCompletion has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    buildMappingAttributeCompletion (attribute, tag, options, v) {
    let description, value, url, cp
    if (this.attributeDefaults) {
    value = v != null && typeof v !== 'undefined' ? v.value : null
    if (value == null && options != null && options.mapping != null) {
    Severity: Minor
    Found in src/autocomplete/provider.js - About 2 hrs to fix

    AutocompleteProvider has 22 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export class AutocompleteProvider {
    constructor () {
    // selector (required): Defines the scope selector(s) (can be comma-separated)
    // for which your provider should receive suggestion requests
    this.selector = '.text.html, .source.js'
    Severity: Minor
    Found in src/autocomplete/provider.js - About 2 hrs to fix

      Function listen has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      listen (cp) {
      if (!this.subscriptions) {
      this.subscriptions = new CompositeDisposable()
      } else {
      this.subscriptions.dispose()
      Severity: Minor
      Found in src/pjw.js - About 1 hr to fix

        Function buildMappingAttributeCompletion has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        buildMappingAttributeCompletion (attribute, tag, options, v) {
        let description, value, url, cp
        if (this.attributeDefaults) {
        value = v != null && typeof v !== 'undefined' ? v.value : null
        if (value == null && options != null && options.mapping != null) {
        Severity: Minor
        Found in src/autocomplete/provider.js - About 1 hr to fix

          Function getComponentOrAttributeNameCompletions has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

          getComponentOrAttributeNameCompletions ({ prefix, editor, bufferPosition }) {
          const completions = []
          const tag = this.getPreviousTag(editor, bufferPosition)
          const tagAttributes = this.getTagAttributes(tag)
           
           
          Severity: Minor
          Found in src/autocomplete/provider.js - About 1 hr to fix

          Function check has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          check () {
          this.clear()
          return new Promise((resolve, reject) => {
          let c
          if (this.pkgj.existsSync()) {
          Severity: Minor
          Found in src/pjw.js - About 1 hr to fix

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

            static openWebsite () {
            return atom.commands.add(
            'atom-workspace',
            'atom-aframe:open-website',
            () => {
            Severity: Major
            Found in src/commands.js and 1 other location - About 1 hr to fix
            src/commands.js on lines 38..49

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

            static openGithub () {
            return atom.commands.add(
            'atom-workspace',
            'atom-aframe:open-github',
            () => {
            Severity: Major
            Found in src/commands.js and 1 other location - About 1 hr to fix
            src/commands.js on lines 26..36

            Function getComponentOrAttributeNameCompletions has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            getComponentOrAttributeNameCompletions ({ prefix, editor, bufferPosition }) {
            const completions = []
            const tag = this.getPreviousTag(editor, bufferPosition)
            const tagAttributes = this.getTagAttributes(tag)
             
             
            Severity: Minor
            Found in src/autocomplete/provider.js - About 1 hr to fix

              Function isComponentOrAttributeStart has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              isComponentOrAttributeStart ({
              prefix,
              scopeDescriptor,
              bufferPosition,
              editor
              Severity: Minor
              Found in src/autocomplete/provider.js - About 1 hr to fix

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

                getComponentValue (component) {
                if (component.value != null) {
                return component.value
                }
                if (this.componentDefaults) {
                Severity: Minor
                Found in src/autocomplete/provider.js - About 35 mins to fix

                Function updateVersions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                async function updateVersions (npmData) {
                console.info('updating versions...')
                const versions = {}
                let docsVer = 'master'
                 
                 
                Severity: Minor
                Found in scripts/update.js - About 25 mins to fix
                Severity
                Category
                Status
                Source
                Language