Skip to content

Commit

Permalink
lint lint lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm committed Sep 26, 2023
1 parent 449a6db commit e25fab1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* @module main
*/

import { param } from 'jquery';
import { Arrow, CustomShape, Ellipsoid, Sphere } from './structure/shapes';
import { ShapeParameters } from './structure/shapes';

Expand Down
2 changes: 1 addition & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ export class HTMLOption<T extends OptionsType> {
};
// also initializes the state of the option list
const values = (this._value as string).split(',');
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
for (const option of (element as any).options) {

Check failure on line 201 in src/options.ts

View workflow job for this annotation

GitHub Actions / npm-test (16.x)

Unsafe member access .options on an `any` value

Check warning on line 201 in src/options.ts

View workflow job for this annotation

GitHub Actions / npm-test (16.x)

Unexpected any. Specify a different type

Check failure on line 201 in src/options.ts

View workflow job for this annotation

GitHub Actions / npm-test (18.x)

Unsafe member access .options on an `any` value

Check warning on line 201 in src/options.ts

View workflow job for this annotation

GitHub Actions / npm-test (18.x)

Unexpected any. Specify a different type
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
option.selected = values.includes(option.value);

Check failure on line 203 in src/options.ts

View workflow job for this annotation

GitHub Actions / npm-test (16.x)

Unsafe argument of type `any` assigned to a parameter of type `string`

Check failure on line 203 in src/options.ts

View workflow job for this annotation

GitHub Actions / npm-test (18.x)

Unsafe argument of type `any` assigned to a parameter of type `string`
}
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/structure/shapes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ function triangulateArrow(

// Generate an arbitrary vector not collinear with n
let vx: XYZ;
if (n_vec.x != 0 || n_vec.y != 0) {
if (n_vec.x !== 0.0 || n_vec.y !== 0.0) {
vx = { x: 0, y: 0, z: 1 };
} else {
vx = { x: 0, y: 1, z: 0 };
Expand All @@ -418,10 +418,10 @@ function triangulateArrow(
// generate orthogonal vectors in the plane defined by nvec
let u: XYZ = addXYZ(vx, multXYZ(n_vec, -dotXYZ(vx, n_vec)));
u = multXYZ(u, 1.0 / Math.sqrt(dotXYZ(u, u)));
let v: XYZ = crossXYZ(u, n_vec);
const v: XYZ = crossXYZ(u, n_vec);

// generate n_points in the plane defined by nvec, centered at vec
let circle_points: XYZ[] = [];
const circle_points: XYZ[] = [];
for (let i = 0; i < resolution; i++) {
circle_points.push(
addXYZ(
Expand Down
11 changes: 1 addition & 10 deletions src/structure/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,7 @@ import { getElement, unreachable } from '../utils';
import { PositioningCallback } from '../utils';
import { Environment, Settings, Structure } from '../dataset';

import {
Arrow,
CustomShape,
CustomShapeData,
Ellipsoid,
EllipsoidData,
ShapeData,
Sphere,
SphereData,
} from './shapes';
import { Arrow, CustomShape, Ellipsoid, ShapeData, Sphere } from './shapes';

import { StructureOptions } from './options';

Expand Down

0 comments on commit e25fab1

Please sign in to comment.