Skip to content

Commit e93e3c3

Browse files
authored
Merge pull request #185 from neaps/prettier-defaults
Revert to prettier defaults
2 parents eee01d9 + 6840d2d commit e93e3c3

41 files changed

Lines changed: 1855 additions & 2047 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: 2
22
updates:
3-
- package-ecosystem: 'npm'
4-
directory: '/'
3+
- package-ecosystem: "npm"
4+
directory: "/"
55
schedule:
6-
interval: 'weekly'
6+
interval: "weekly"
77
open-pull-requests-limit: 100
8-
- package-ecosystem: 'github-actions'
9-
directory: '/'
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
1010
schedule:
11-
interval: 'weekly'
11+
interval: "weekly"
1212
open-pull-requests-limit: 100

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
- uses: actions/setup-node@v6
1212
with:
13-
node-version: '22'
13+
node-version: "22"
1414

1515
- name: Install modules
1616
run: npm install
@@ -25,7 +25,7 @@ jobs:
2525

2626
- uses: actions/setup-node@v6
2727
with:
28-
node-version: '22'
28+
node-version: "22"
2929

3030
- name: Install modules
3131
run: npm install
@@ -49,7 +49,7 @@ jobs:
4949

5050
- uses: actions/setup-node@v6
5151
with:
52-
node-version: '22'
52+
node-version: "22"
5353

5454
- name: Install modules
5555
run: npm install
@@ -80,7 +80,7 @@ jobs:
8080

8181
- uses: actions/setup-node@v6
8282
with:
83-
node-version: '22'
83+
node-version: "22"
8484

8585
- name: Install modules
8686
run: npm install

.prettierrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"semi": false,
3-
"singleQuote": true,
4-
"trailingComma": "none"
2+
"printWidth": 100
53
}

.prettierrc.json

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

README.md

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ npm install neaps
2020
### Tide Extremes Prediction
2121

2222
```typescript
23-
import { getExtremesPrediction } from 'neaps'
23+
import { getExtremesPrediction } from "neaps";
2424

2525
const prediction = getExtremesPrediction({
2626
latitude: 26.7, // or `lat`
2727
longitude: -80.05, // or `lng` or `lon`
28-
start: new Date('2025-12-17'),
29-
end: new Date('2025-12-18'),
30-
datum: 'MLLW', // optional, defaults to MLLW if available
31-
units: 'meters' // optional, defaults to 'meters', can also be 'feet'
32-
})
28+
start: new Date("2025-12-17"),
29+
end: new Date("2025-12-18"),
30+
datum: "MLLW", // optional, defaults to MLLW if available
31+
units: "meters", // optional, defaults to 'meters', can also be 'feet'
32+
});
3333

34-
console.log(prediction)
34+
console.log(prediction);
3535
// {
3636
// datum: 'MLLW',
3737
// units: 'meters',
@@ -51,18 +51,18 @@ console.log(prediction)
5151
### Get Timeline Prediction
5252

5353
```typescript
54-
import { getTimelinePrediction } from 'neaps'
54+
import { getTimelinePrediction } from "neaps";
5555

5656
const timeline = getTimelinePrediction({
5757
lat: 26.77,
5858
lon: -80.05,
59-
start: new Date('2025-12-19T00:00:00-05:00'),
60-
end: new Date('2025-12-19T01:00:00-05:00'),
59+
start: new Date("2025-12-19T00:00:00-05:00"),
60+
end: new Date("2025-12-19T01:00:00-05:00"),
6161
timeFidelity: 5 * 60, // seconds, defaults to `10 * 60`
62-
units: 'meters' // optional, defaults to 'meters', can also be 'feet'
63-
})
62+
units: "meters", // optional, defaults to 'meters', can also be 'feet'
63+
});
6464

65-
console.log(timeline)
65+
console.log(timeline);
6666
// {
6767
// datum: 'MLLW',
6868
// units: 'meters',
@@ -84,17 +84,17 @@ console.log(timeline)
8484
### Get Water Level at Specific Time
8585

8686
```typescript
87-
import { getWaterLevelAtTime } from 'neaps'
87+
import { getWaterLevelAtTime } from "neaps";
8888

8989
const prediction = getWaterLevelAtTime({
9090
lat: 26.77,
9191
lon: -80.05,
92-
time: new Date('2025-12-19T00:30:00-05:00'),
93-
datum: 'MSL',
94-
units: 'meters' // optional, defaults to 'meters', can also be 'feet'
95-
})
92+
time: new Date("2025-12-19T00:30:00-05:00"),
93+
datum: "MSL",
94+
units: "meters", // optional, defaults to 'meters', can also be 'feet'
95+
});
9696

97-
console.log(prediction)
97+
console.log(prediction);
9898
// {
9999
// datum: 'MSL',
100100
// units: 'meters',
@@ -116,41 +116,39 @@ Neaps uses [@neaps/tide-database](https://github.com/neaps/tide-database) to fin
116116
#### Nearest Station
117117

118118
```typescript
119-
import { nearestStation } from 'neaps'
119+
import { nearestStation } from "neaps";
120120

121-
const station = nearestStation({ lat: 26.7, lon: -80.05 })
122-
console.log(`${station.name} (${station.source.id})`) // Fort Lauderdale, FL (8722588)
121+
const station = nearestStation({ lat: 26.7, lon: -80.05 });
122+
console.log(`${station.name} (${station.source.id})`); // Fort Lauderdale, FL (8722588)
123123
```
124124

125125
Once you've found a station, you can get predictions, timeline, or water level at a specific time for that station:
126126

127127
```typescript
128128
// Get extremes prediction for the nearest station
129129
station.getExtremesPrediction({
130-
start: new Date('2025-12-17'),
131-
end: new Date('2025-12-18')
132-
})
130+
start: new Date("2025-12-17"),
131+
end: new Date("2025-12-18"),
132+
});
133133

134134
// Get timeline prediction for the nearest station
135135
station.getTimelinePrediction({
136-
start: new Date('2025-12-19'),
137-
end: new Date('2025-12-20')
138-
})
136+
start: new Date("2025-12-19"),
137+
end: new Date("2025-12-20"),
138+
});
139139

140140
// Get timeline prediction for the nearest station
141-
station.getWaterLevelAt({ time: new Date('2025-12-19T00:30:00-00:00') })
141+
station.getWaterLevelAt({ time: new Date("2025-12-19T00:30:00-00:00") });
142142
```
143143

144144
#### List Nearby Stations
145145

146146
```typescript
147-
import { stationsNear } from 'neaps'
147+
import { stationsNear } from "neaps";
148148

149149
stationsNear({ latitude: 45.6, longitude: -122.7 }, 5).forEach((s) => {
150-
console.log(
151-
`${s.name} (${s.source.id}) - ${(s.distance / 1000).toFixed(2)} km away`
152-
)
153-
})
150+
console.log(`${s.name} (${s.source.id}) - ${(s.distance / 1000).toFixed(2)} km away`);
151+
});
154152
// Vancouver (9440083) - 3.49 km away
155153
// Portland Morrison Street Bridge (9439221) - 10.24 km away
156154
// KNAPP(THORNES)LNDG, WILLOW BAR (9440171) - 16.34 km away
@@ -161,13 +159,13 @@ stationsNear({ latitude: 45.6, longitude: -122.7 }, 5).forEach((s) => {
161159
#### Find station by ID
162160

163161
```typescript
164-
import { findStation } from 'neaps'
162+
import { findStation } from "neaps";
165163

166164
// Find station by Neaps ID
167-
findStation('us-wa-seattle') // Seattle
165+
findStation("us-wa-seattle"); // Seattle
168166

169167
// Find station by source ID (e.g. NOAA)
170-
findStation('9440083') // Vancouver
168+
findStation("9440083"); // Vancouver
171169
```
172170

173171
## Accuracy & Validation

0 commit comments

Comments
 (0)