Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 0 additions & 215 deletions .eslintrc

This file was deleted.

5 changes: 5 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

</head>
<body>
<!-- Load the new built library -->
<script type="module">
import * as martinez from '../dist/martinez.js';
window.martinez = martinez;
</script>
<script src="js/bundle.js"></script>
</body>
</html>
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Martinez Clipping - Development</title>
<script>
// Simple redirect to demo for development
window.location.href = './demo/index.html';
</script>
</head>
<body>
<p>Redirecting to demo...</p>
<a href="./demo/index.html">Click here if not redirected</a>
</body>
</html>
9 changes: 5 additions & 4 deletions index.js → index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ import {
UNION,
XOR
} from './src/operation';
import { Geometry } from './src/types';

export function union (subject, clipping) {
export function union(subject: Geometry, clipping: Geometry): Geometry | null {
return boolean(subject, clipping, UNION);
}

export function diff (subject, clipping) {
export function diff(subject: Geometry, clipping: Geometry): Geometry | null {
return boolean(subject, clipping, DIFFERENCE);
}

export function xor (subject, clipping) {
export function xor(subject: Geometry, clipping: Geometry): Geometry | null {
return boolean(subject, clipping, XOR);
}

export function intersection (subject, clipping) {
export function intersection(subject: Geometry, clipping: Geometry): Geometry | null {
return boolean(subject, clipping, INTERSECTION);
}

Expand Down
13 changes: 13 additions & 0 deletions oxlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"rules": {
"typescript": "warn",
"correctness": "error",
"suspicious": "warn",
"perf": "warn"
},
"allow": [
"no-unused-vars",
"prefer-const"
]
}
Loading