diff --git a/.eslintrc.json b/.eslintrc.json index c8740de119e38e394988609bade687307a8c8269..34232f64f5623a56bb067ec6d1f047450ecc109d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -54,7 +54,8 @@ "no-multi-spaces": "error", "block-spacing": "error", "keyword-spacing": "off", - "space-before-blocks": "error" + "space-before-blocks": "error", + "semi-spacing": "error" }, "overrides": [ { diff --git a/src/mol-math/linear-algebra/tensor.ts b/src/mol-math/linear-algebra/tensor.ts index 94a6df386d7d1fb1ae28582efb1f240e942e29a2..f28143270888831464486009c7a7ba5ade3b892e 100644 --- a/src/mol-math/linear-algebra/tensor.ts +++ b/src/mol-math/linear-algebra/tensor.ts @@ -109,7 +109,10 @@ export namespace Tensor { set: (t, d, x) => t[d] = x, add: (t, d, x) => t[d] += x, dataOffset: (d) => d, - getCoords: (o, c) => { c[0] = o; return c as number[]; } + getCoords: (o, c) => { + c[0] = o; + return c as number[]; + } }; case 2: { // column major @@ -120,7 +123,11 @@ export namespace Tensor { set: (t, i, j, x) => t[j * rows + i] = x, add: (t, i, j, x) => t[j * rows + i] += x, dataOffset: (i, j) => j * rows + i, - getCoords: (o, c) => { c[0] = o % rows; c[1] = Math.floor(o / rows) ; return c as number[]; } + getCoords: (o, c) => { + c[0] = o % rows; + c[1] = Math.floor(o / rows); + return c as number[]; + } }; } if (ao[0] === 1 && ao[1] === 0) { @@ -130,7 +137,11 @@ export namespace Tensor { set: (t, i, j, x) => t[i * cols + j] = x, add: (t, i, j, x) => t[i * cols + j] += x, dataOffset: (i, j) => i * cols + j, - getCoords: (o, c) => { c[0] = Math.floor(o / cols); c[1] = o % cols; return c as number[]; } + getCoords: (o, c) => { + c[0] = Math.floor(o / cols); + c[1] = o % cols; + return c as number[]; + } }; } throw new Error('bad axis order'); diff --git a/src/mol-model-formats/structure/pdb/secondary-structure.ts b/src/mol-model-formats/structure/pdb/secondary-structure.ts index d6c6e60e11caf9f8d2a2985e563ee76d3c467aa9..626a201bd917ee58939eedd26e49efce69fc9fa9 100644 --- a/src/mol-model-formats/structure/pdb/secondary-structure.ts +++ b/src/mol-model-formats/structure/pdb/secondary-structure.ts @@ -102,7 +102,7 @@ export function parseHelix(lines: Tokens, lineStart: number, lineEnd: number): C const beg_auth_comp_id = CifField.ofStrings(helices.map(h => h.initResName)); const end_auth_asym_id = CifField.ofStrings(helices.map(h => h.endChainID)); - const end_auth_comp_id = CifField.ofStrings(helices.map(h => h.endResName));; + const end_auth_comp_id = CifField.ofStrings(helices.map(h => h.endResName)); const struct_conf: CifCategory.Fields<mmCIF_Schema['struct_conf']> = { beg_label_asym_id: beg_auth_asym_id, diff --git a/src/mol-model-props/computed/helix-orientation/helix-orientation.ts b/src/mol-model-props/computed/helix-orientation/helix-orientation.ts index 5f83a2ce64f7244a7495596b329458270a68946e..512531204bc7ff861993f0bc10f6e6dcafa31a0a 100644 --- a/src/mol-model-props/computed/helix-orientation/helix-orientation.ts +++ b/src/mol-model-props/computed/helix-orientation/helix-orientation.ts @@ -127,7 +127,8 @@ export function calcHelixOrientation(model: Model): HelixOrientation { Vec3.fromArray(v2, centers, e3 - 6); Vec3.normalize(axis, Vec3.sub(axis, v1, v2)); const eI = traceElementIndex[e]; - Vec3.set(a1, x[eI], y[eI], z[eI]);Vec3.copy(vt, a1); + Vec3.set(a1, x[eI], y[eI], z[eI]); + Vec3.copy(vt, a1); Vec3.projectPointOnVector(vt, vt, axis, v1); Vec3.toArray(vt, centers, e3); } diff --git a/src/mol-model/structure/structure/unit.ts b/src/mol-model/structure/structure/unit.ts index c68322ec210bc4674c196888f0596ebdff4780f1..62a2ec7cf35d25612abaf47062cb22832d68bca5 100644 --- a/src/mol-model/structure/structure/unit.ts +++ b/src/mol-model/structure/structure/unit.ts @@ -369,7 +369,7 @@ namespace Unit { readonly props: CoarseProperties; getChild(elements: StructureElement.Set): Unit { - if (elements.length === this.elements.length) return this as any as Unit /** lets call this an ugly temporary hack */; + if (elements.length === this.elements.length) return this as any as Unit; // lets call this an ugly temporary hack return createCoarse(this.id, this.invariantId, this.chainGroupId, this.traits, this.model, this.kind, elements, this.conformation, CoarseProperties()); } @@ -465,7 +465,7 @@ namespace Unit { export class Gaussians extends Coarse<Kind.Gaussians, CoarseGaussianConformation> { } function createCoarse<K extends Kind.Gaussians | Kind.Spheres>(id: number, invariantId: number, chainGroupId: number, traits: Traits, model: Model, kind: K, elements: StructureElement.Set, conformation: SymmetryOperator.ArrayMapping<ElementIndex>, props: CoarseProperties): K extends Kind.Spheres ? Spheres : Gaussians { - return new Coarse(id, invariantId, chainGroupId, traits, model, kind, elements, conformation, props) as any /** lets call this an ugly temporary hack */; + return new Coarse(id, invariantId, chainGroupId, traits, model, kind, elements, conformation, props) as any; // lets call this an ugly temporary hack } export function areSameChainOperatorGroup(a: Unit, b: Unit) { diff --git a/src/mol-plugin-ui/controls/line-graph/line-graph-component.tsx b/src/mol-plugin-ui/controls/line-graph/line-graph-component.tsx index 46e7e8788322fb17a7903ad29893ed3c3014bfea..968068d2b19af01f43c727df22a60a8c180729b6 100644 --- a/src/mol-plugin-ui/controls/line-graph/line-graph-component.tsx +++ b/src/mol-plugin-ui/controls/line-graph/line-graph-component.tsx @@ -207,7 +207,7 @@ export class LineGraphComponent extends React.Component<any, LineGraphComponentS const updatedPoint = this.unNormalizePoint(Vec2.create(this.updatedX, this.updatedY)); const points = this.state.points.filter((_, i) => i !== selected[0]); - points.push(updatedPoint);; + points.push(updatedPoint); points.sort((a, b) => { if (a[0] === b[0]) { if (a[0] === 0) { @@ -372,7 +372,7 @@ export class LineGraphComponent extends React.Component<any, LineGraphComponentS const data = points; const size = data.length; - for (let i = 0; i < size - 1;i++) { + for (let i = 0; i < size - 1; i++) { const x1 = data[i][0]; const y1 = data[i][1]; const x2 = data[i + 1][0]; diff --git a/src/mol-plugin-ui/sequence/sequence.tsx b/src/mol-plugin-ui/sequence/sequence.tsx index c7bda2a661b723364c886d4c331bb4213055f9c2..bea9c49754924dc736f196a689dc6834f5fe8767 100644 --- a/src/mol-plugin-ui/sequence/sequence.tsx +++ b/src/mol-plugin-ui/sequence/sequence.tsx @@ -153,7 +153,11 @@ export class Sequence<P extends SequenceProps> extends PluginUIComponent<P> { private getBackgroundColor(marker: number) { // TODO: make marker color configurable if (typeof marker === 'undefined') console.error('unexpected marker value'); - return marker === 0 ? '' : marker % 2 === 0 ? 'rgb(51, 255, 25)' /* selected */ : 'rgb(255, 102, 153)' /* highlighted */; + return marker === 0 + ? '' + : marker % 2 === 0 + ? 'rgb(51, 255, 25)' // selected + : 'rgb(255, 102, 153)'; // highlighted } private getResidueClass(seqIdx: number, label: string) { diff --git a/src/mol-util/zip/bin.ts b/src/mol-util/zip/bin.ts index 1b3d2a1a4feffe2be4fa128fc7342ff184691f06..fae13877ad1b1226aea461d673e90d2ae4f335fe 100644 --- a/src/mol-util/zip/bin.ts +++ b/src/mol-util/zip/bin.ts @@ -92,7 +92,7 @@ export function sizeUTF8(str: string) { for (let ci = 0; ci < strl; ci++) { const code = str.charCodeAt(ci); if ((code & (0xffffffff - (1 << 7) + 1)) === 0) { - i++ ; + i++; } else if ((code & (0xffffffff - (1 << 11) + 1)) === 0) { i += 2; } else if ((code & (0xffffffff - (1 << 16) + 1)) === 0) { diff --git a/src/servers/volume/config.ts b/src/servers/volume/config.ts index 53d247d7205284c441f20ba1eef93fa728c6f69c..e896bf1b80e1401780583554a40e7826fabbc74d 100644 --- a/src/servers/volume/config.ts +++ b/src/servers/volume/config.ts @@ -197,7 +197,7 @@ export function configureLocal() { description: VOLUME_SERVER_HEADER }); parser.add_argument('--jobs', { help: `Path to a JSON file with job specification.`, required: false }); - parser.add_argument('--jobsTemplate', { help: 'Print example template for jobs.json and exit.', required: false, nargs: 0 });; + parser.add_argument('--jobsTemplate', { help: 'Print example template for jobs.json and exit.', required: false, nargs: 0 }); addJsonConfigArgs(parser); addLimitsArgs(parser);