Skip to content

Commit cd3cf4b

Browse files
committed
fix: Fixes the linter
1 parent 905952e commit cd3cf4b

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"test:coverage": "jest --coverage",
3232
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
3333
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
34-
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
35-
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
34+
"format": "prettier --write \"{src,scripts}/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
35+
"format:check": "prettier --check \"{src,scripts}/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
3636
"process-data": "tsx scripts/process-butterfly-data.ts",
3737
"fast-process-data": "tsx scripts/process-butterfly-data.ts --skip-regional"
3838
},

scripts/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ npm run process-data
3939

4040
### Statistics Calculated
4141

42-
| Metric | Description | Calculation |
43-
|--------|-------------|-------------|
44-
| Total Species | Number of unique butterfly species | Count distinct "Preferred Species Name" |
45-
| Total Visits | Number of monitoring visits | Count distinct dates |
46-
| Avg Visits/Year | Average visits per year | Total visits ÷ Years active |
47-
| Avg Butterflies/Visit | Average abundance per visit | Sum of all counts ÷ Total visits |
48-
| Years Active | Number of years monitored | Count distinct years in dates |
49-
| First Monitoring Year | Year of first observation | Earliest year from dates |
50-
| Is Active | Current status | From metadata "Estado" === "Ativo" |
42+
| Metric | Description | Calculation |
43+
| --------------------- | ---------------------------------- | --------------------------------------- |
44+
| Total Species | Number of unique butterfly species | Count distinct "Preferred Species Name" |
45+
| Total Visits | Number of monitoring visits | Count distinct dates |
46+
| Avg Visits/Year | Average visits per year | Total visits ÷ Years active |
47+
| Avg Butterflies/Visit | Average abundance per visit | Sum of all counts ÷ Total visits |
48+
| Years Active | Number of years monitored | Count distinct years in dates |
49+
| First Monitoring Year | Year of first observation | Earliest year from dates |
50+
| Is Active | Current status | From metadata "Estado" === "Ativo" |
5151

5252
### Data Quality
5353

scripts/processors/phenology-processor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ export async function calculateRegionalPhenology(
6666

6767
const month = parseInt(parts[1], 10); // 1-indexed month from date string
6868
const year = parseInt(parts[2], 10);
69-
return month >= MONITORING_START_MONTH && month <= MONITORING_END_MONTH && year >= baselineYear;
69+
return (
70+
month >= MONITORING_START_MONTH && month <= MONITORING_END_MONTH && year >= baselineYear
71+
);
7072
})
7173
.map(row => ({
7274
transectId: row["Transect ID"],

0 commit comments

Comments
 (0)