Skip to content

Commit 26c4ea2

Browse files
committed
fix eslint issues
1 parent e439e43 commit 26c4ea2

File tree

24 files changed

+29
-516
lines changed

24 files changed

+29
-516
lines changed

.eslintrc.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
"CSG" : true,
1515
"PNLTRI" : true,
1616
"__DEBUG__": true,
17+
"__CAD_APP": true,
18+
"Module": true,
19+
"_free": true,
20+
"_malloc": true,
21+
"writeAsciiToMemory": true,
22+
"__E0_ENGINE_EXCHANGE_VAL": true,
23+
"verb": true,
1724
"$": true
1825
},
1926
"rules": {
@@ -22,5 +29,9 @@
2229
"max-len": "off",
2330
"no-console": "off",
2431
"no-extra-boolean-cast": "off"
25-
}
32+
},
33+
"ignorePatterns": [
34+
"/modules/math/optim/*.js",
35+
"/modules/math/qr.js"
36+
]
2637
}

build/.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

modules/brep/operations/boolean-mesh.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

modules/brep/operations/boolean.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ function detectLoops(surface, graph) {
182182
BREP_DEBUG.startBooleanLoopDetection(graph);
183183
const loops = [];
184184
const seen = new Set();
185-
while (true) {
185+
for (;;) {
186186
let edge = graph.graphEdges.pop();
187187
if (!edge) {
188188
break;

modules/brep/operations/polyhedronify.js

Lines changed: 0 additions & 87 deletions
This file was deleted.

modules/geom/curves/closestPoint.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ function distanceSqToSegment(a, b, pt) {
4646

4747
export function solveClosestToCurveParamExactly(curve, pt, intMin, intMax, tol) {
4848

49-
function boundParam(u) {
50-
return Math.min(max, Math.max(min, u));
51-
}
52-
5349
//solving minimization problem of squared distance
5450

5551
//f(u) = (fx(u) - x)^2 + (fy(u) - y)^2 + (fz(u) - z)^2 = fx^2 - 2*fx*x + x^2 ...

modules/geom/intersection/surfaceSurfaceStablePoints.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {newtonIterationsOnInterval} from '../curves/newtonIterations';
22

33
export function surfaceSurfaceStablePoints(surfaceA, surfaceB) {
44

5-
function impl(surfaceA, surfaceB) {
5+
function impl(curve) {
66

77
//solving minimization problem of squared distance
88

@@ -16,16 +16,18 @@ export function surfaceSurfaceStablePoints(surfaceA, surfaceB) {
1616

1717
let [f, d1, d2] = curve.eval(u, 2);
1818

19-
let r1Comp = i => 2 * f[i] * d1[i] - 2 * pt[i] * d1[i];
20-
let r2Comp = i => 2 * f[i] * d2[i] + 2 * d1[i] * d1[i] - 2 * pt[i] * d2[i];
19+
let r1Comp = i => 2 * f[i] * d1[i] - 2 * f[i] * d1[i];
20+
let r2Comp = i => 2 * f[i] * d2[i] + 2 * d1[i] * d1[i] - 2 * f[i] * d2[i];
2121

2222
let r1 = r1Comp(X) + r1Comp(Y) + r1Comp(Z);
2323
let r2 = r2Comp(X) + r2Comp(Y) + r2Comp(Z);
2424

2525
return [r1, r2];
2626
}
2727

28-
return newtonIterationsOnInterval(squareDistanceFn, intMin, intMax, tol);
28+
let intMin = 0;
29+
let intMax = 0;
30+
return newtonIterationsOnInterval(squareDistanceFn, intMin, intMax, 1e-5);
2931

3032
}
3133

modules/scene/utils/calcFaceNormal.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"pack": "node ./node_modules/webpack/bin/webpack.js --config webpack.config.js --progress --profile --colors",
88
"start-with-docs": "concurrently --kill-others 'npm start' './node_modules/grunt/bin/grunt docs-start'",
99
"build": "grunt",
10-
"lint": "./node_modules/eslint/bin/eslint web/app web/modules",
10+
"lint": "./node_modules/eslint/bin/eslint.js web/app modules",
1111
"check-code": "./node_modules/typescript/bin/tsc --noEmit",
1212
"before-mainline-merging": "npm run lint && npm run check-code",
1313
"cypress": "npx cypress open"

web/app/cad/actions/actionSystemBundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function activate(context: ApplicationContext) {
2323

2424
let showAnonymousActionHint = enableAnonymousActionHint(context);
2525

26-
function run(id: string, data: any): void {
26+
function run(id: string, data?: any): void {
2727
let state = streams.action.state[id].value;
2828
let runner = runners[id];
2929
if (!state||!runner) {

0 commit comments

Comments
 (0)