Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin committed Apr 10, 2024
1 parent 4846191 commit 0602546
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches:
- main
repository_dispatch:
types: [ ci ]
types: [ci]
workflow_dispatch:

jobs:
Expand Down
7 changes: 1 addition & 6 deletions docs/diary/2024-03-25.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ Created and loaded store in ./IDFM-gtfs/services.db
Created and loaded store in ./IDFM-gtfs/trips.db
Creating Connection rules...
/Users/vincenthardouin/.npm/_npx/4c8ae9a5fcd59e62/node_modules/gtfs2lc/lib/stoptimes/st2c.js:45
if (arrivalStop['stop_headsign'] && arrivalStop['stop_headsign'] !== '') {
^

TypeError: Cannot read properties of undefined (reading 'stop_headsign')
at StopTimesToConnections._transform (/Users/vincenthardouin/.npm/_npx/4c8ae9a5fcd59e62/node_modules/gtfs2lc/lib/stoptimes/st2c.js:45:20)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
if (arrivalStop['stop_headsign'] && arrivalStop['stop_headsign'] !== '') {
```
Soyons pragmatiques, mes données viennent d'IDFM et je lance le script normalement, ça devrait fonctionner.
Expand Down
3 changes: 2 additions & 1 deletion scripts/PgClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class PgClient {
const instance = new PgClient(databaseUrl);
try {
await instance.client.connect();
} catch (error) {
}
catch (error) {
console.error('Database error', error);
}
return instance;
Expand Down
2 changes: 1 addition & 1 deletion scripts/add-adjacent-stations.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function addAdjacentStations({ linesData, stationsData }) {

stations.forEach((station) => {
if (!station.properties.adjacentStations)
// eslint-disable-next-line no-console

console.log('Station is missing adjacentStations', station.properties.name);

if (station.properties.adjacentStations) {
Expand Down
1 change: 1 addition & 0 deletions scripts/database/empty-database.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ async function main() {
}
catch (error) {
console.error(error);
// eslint-disable-next-line node/prefer-global/process
process.exitCode = 1;
}
finally {
Expand Down

0 comments on commit 0602546

Please sign in to comment.