Skip to content

Commit

Permalink
Merge branch 'master' into fix-ellipse-harversine
Browse files Browse the repository at this point in the history
  • Loading branch information
hadbn authored Dec 17, 2024
2 parents 3a28f7b + 8f5c407 commit 8d0c5fa
Show file tree
Hide file tree
Showing 159 changed files with 153,536 additions and 3,468 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

62 changes: 0 additions & 62 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/turf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x, 22.x]

steps:
- name: Checkout
Expand Down
18 changes: 5 additions & 13 deletions .monorepolint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ export default {
devDependencies: {
benchmark: "^2.1.4",
"npm-run-all": "^4.1.5",
tape: "^5.7.2",
tsx: "^4.6.2",
tape: "^5.9.0",
tsup: "^8.3.5",
tsx: "^4.19.2",
},
},
includePackages: [...TS_PACKAGES, ...JS_PACKAGES],
Expand All @@ -231,26 +232,17 @@ export default {
requireDependency({
options: {
dependencies: {
tslib: "^2.6.2",
tslib: "^2.8.1",
},
devDependencies: {
"@types/benchmark": "^2.1.5",
"@types/tape": "^4.2.32",
"@types/tape": "^4.13.4",
typescript: "^5.5.4",
},
},
includePackages: TS_PACKAGES,
}),

requireDependency({
options: {
devDependencies: {
rollup: "^3.29.5",
},
},
includePackages: [MAIN_PACKAGE],
}),

requireDependency({
options: {
dependencies: {
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ You can also include it directly from a CDN:

### TypeScript

TypeScript definitions are packaged with each module. No DefinitelyTyped packages required.
Turf modules ship with type definitions packaged in each module. No DefinitelyTyped packages required.

The types defined in the GeoJSON specification are maintained separately (Geometry, Polygon, etc). To refer to these in your own code, install `@types/geojson` and import from there:

```typescript
import { type Polygon } from "geojson";
```

### Other languages

Expand Down
1 change: 1 addition & 0 deletions documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ toc:
- pointOnFeature
- polygonTangents
- pointToLineDistance
- pointToPolygonDistance
- rhumbBearing
- rhumbDestination
- rhumbDistance
Expand Down
89 changes: 89 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import js from "@eslint/js";
import tsEslint from "typescript-eslint";
import prettierRecommended from "eslint-plugin-prettier/recommended";

export default tsEslint.config(
js.configs.recommended,
tsEslint.configs.recommended,
{
ignores: [
"**/dist/**/*",
"**/node_modules",
"packages/turf/turf.js",
"packages/turf/turf.min.js",
"packages/turf/test.example.js",
],
},
{
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 6,
sourceType: "module",
},

rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
},
],

"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-var-requires": "off",
"no-constant-condition": "off",
"no-redeclare": "off",
"no-var": "off",
"prefer-const": "off",
},
},
{
files: ["packages/*/types.ts", "packages/*/test.ts"],

rules: {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-expressions": "off",
},
},
{
files: [
"**/.eslintrc.js",
"packages/*/bench.js",
"packages/*/test.js",
"packages/turf/rollup.config.js",
"scripts/check-dependencies.js",
],

languageOptions: {
globals: {
...globals.node,
},
},
},
{
files: [
"packages/turf-isobands/lib/marchingsquares-isobands.js",
"packages/turf-isolines/lib/marchingsquares-isocontours.js",
],

languageOptions: {
globals: {
...globals.browser,
},
},
},
prettierRecommended
);
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,39 @@
},
"packageManager": "pnpm@8.15.8+sha512.d1a029e1a447ad90bc96cd58b0fad486d2993d531856396f7babf2d83eb1823bb83c5a3d0fc18f675b2d10321d49eb161fece36fe8134aa5823ecd215feed392",
"devDependencies": {
"@monorepolint/cli": "0.5.0-alpha.132",
"@monorepolint/config": "0.5.0-alpha.132",
"@monorepolint/core": "0.5.0-alpha.132",
"@monorepolint/rules": "0.5.0-alpha.132",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.16.0",
"@monorepolint/cli": "0.5.0",
"@monorepolint/config": "0.5.0",
"@monorepolint/core": "0.5.0",
"@monorepolint/rules": "0.5.0",
"@types/node": "18.11.9",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"acorn": "^7.4.1",
"camelcase": "^8.0.0",
"d3-queue": "*",
"decamelize": "^6.0.0",
"dependency-tree": "^11.0.0",
"documentation": "^14.0.3",
"es-check": "^7.1.1",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"esm": "^3.2.25",
"fs-extra": "^11.1.1",
"glob": "^10.3.10",
"globals": "^15.13.0",
"husky": "^9.0.0",
"lerna": "^8.1.7",
"lerna": "^8.1.9",
"lint-staged": "^15.2.8",
"load-json-file": "^7.0.1",
"meow": "^12.1.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3",
"progress": "^2.0.3",
"ts-node": "^9.0.0",
"tsup": "^8.0.1",
"tsx": "^4.6.2",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.5.4",
"typescript-eslint": "^8.17.0",
"yamljs": "^0.3.0"
}
}
10 changes: 5 additions & 5 deletions packages/turf-along/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
},
"devDependencies": {
"@types/benchmark": "^2.1.5",
"@types/tape": "^4.2.32",
"@types/tape": "^4.13.4",
"benchmark": "^2.1.4",
"load-json-file": "^7.0.1",
"npm-run-all": "^4.1.5",
"tape": "^5.7.2",
"tsup": "^8.0.1",
"tsx": "^4.6.2",
"tape": "^5.9.0",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.5.4"
},
"dependencies": {
Expand All @@ -69,6 +69,6 @@
"@turf/helpers": "workspace:^",
"@turf/invariant": "workspace:^",
"@types/geojson": "^7946.0.10",
"tslib": "^2.6.2"
"tslib": "^2.8.1"
}
}
10 changes: 5 additions & 5 deletions packages/turf-angle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
"@turf/sector": "workspace:^",
"@turf/truncate": "workspace:^",
"@types/benchmark": "^2.1.5",
"@types/tape": "^4.2.32",
"@types/tape": "^4.13.4",
"benchmark": "^2.1.4",
"glob": "^10.3.10",
"load-json-file": "^7.0.1",
"npm-run-all": "^4.1.5",
"tape": "^5.7.2",
"tsup": "^8.0.1",
"tsx": "^4.6.2",
"tape": "^5.9.0",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.5.4",
"write-json-file": "^5.0.0"
},
Expand All @@ -73,6 +73,6 @@
"@turf/invariant": "workspace:^",
"@turf/rhumb-bearing": "workspace:^",
"@types/geojson": "^7946.0.10",
"tslib": "^2.6.2"
"tslib": "^2.8.1"
}
}
10 changes: 5 additions & 5 deletions packages/turf-area/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@
},
"devDependencies": {
"@types/benchmark": "^2.1.5",
"@types/tape": "^4.2.32",
"@types/tape": "^4.13.4",
"benchmark": "^2.1.4",
"load-json-file": "^7.0.1",
"npm-run-all": "^4.1.5",
"tape": "^5.7.2",
"tsup": "^8.0.1",
"tsx": "^4.6.2",
"tape": "^5.9.0",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.5.4",
"write-json-file": "^5.0.0"
},
"dependencies": {
"@turf/helpers": "workspace:^",
"@turf/meta": "workspace:^",
"@types/geojson": "^7946.0.10",
"tslib": "^2.6.2"
"tslib": "^2.8.1"
}
}
10 changes: 5 additions & 5 deletions packages/turf-bbox-clip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@
"devDependencies": {
"@turf/bbox": "workspace:^",
"@types/benchmark": "^2.1.5",
"@types/tape": "^4.2.32",
"@types/tape": "^4.13.4",
"benchmark": "^2.1.4",
"load-json-file": "^7.0.1",
"npm-run-all": "^4.1.5",
"tape": "^5.7.2",
"tsup": "^8.0.1",
"tsx": "^4.6.2",
"tape": "^5.9.0",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.5.4",
"write-json-file": "^5.0.0"
},
"dependencies": {
"@turf/helpers": "workspace:^",
"@turf/invariant": "workspace:^",
"@types/geojson": "^7946.0.10",
"tslib": "^2.6.2"
"tslib": "^2.8.1"
}
}
Loading

0 comments on commit 8d0c5fa

Please sign in to comment.