CIDARLAB / 3DuF

Use shorthand property syntax for object literals JS-0240
Anti-pattern
Minor
4 occurrences in this check
Expected method shorthand
65                spec: this.computedSpecForMINT(mint)
66            };
67        },
68        computedSpec: function(threeduftype) {69            // Get the corresponding the definitions object from the componentAPI, convert to a spec object and return70            let definition = ComponentAPI.getDefinition(threeduftype);71            let spec = [];72            for (let key in definition.heritable) {73                // const unittext = definition.units[key] !== "" ? he.htmlDecode(definition.units[key]) : "";74                let item = {75                    mint: key,76                    min: definition.minimum[key],77                    max: definition.maximum[key],78                    value: definition.defaults[key],79                    units: definition.units[key],80                    steps: (definition.maximum[key] - definition.minimum[key]) / 10,81                    name: key82                };83                spec.push(item);84            }85            return spec;86        }87    }
88};
89</script>
Expected property shorthand
61        },
62        getEntry: function(mint) {
63            return {
64                mint: mint,65                spec: this.computedSpecForMINT(mint)
66            };
67        },
Expected method shorthand
59            console.log(tool);
60            Registry.viewManager.activateTool(tool);
61        },
62        getEntry: function(mint) {63            return {64                mint: mint,65                spec: this.computedSpecForMINT(mint)66            };67        },68        computedSpec: function(threeduftype) {
69            // Get the corresponding the definitions object from the componentAPI, convert to a spec object and return
70            let definition = ComponentAPI.getDefinition(threeduftype);
Expected method shorthand
55        };
56    },
57    methods: {
58        activateTool: function(tool) {59            console.log(tool);60            Registry.viewManager.activateTool(tool);61        },62        getEntry: function(mint) {
63            return {
64                mint: mint,