Skip to content

Commit 0383adc

Browse files
committed
feat: Add prettier and misc files
1 parent 3779fba commit 0383adc

File tree

8 files changed

+2380
-22
lines changed

8 files changed

+2380
-22
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ end_of_line = lf
44
indent_size = 2
55
indent_style = space
66
insert_final_newline = true
7+
max_line_length = 80
78
trim_trailing_whitespace = true

.github/workflows/npm-build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,11 @@ jobs:
3030
- name: Install dependencies
3131
run: npm ci
3232

33+
- name: Run linting
34+
run: npm run lint
35+
36+
- name: Run formatting
37+
run: npm run format
38+
3339
- name: Run tests
3440
run: npm test

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Dependency directories
2+
node_modules/

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
FROM node:24-alpine
22

3-
WORKDIR /app
4-
53
# Copy package files and install dependencies
64
COPY package*.json ./
75
RUN npm install
86

97
# Mount src/ directory as a volume
10-
VOLUME ["src/", "tests/"]
8+
VOLUME ["src/", "test/"]
119

1210
# Default command (can be overridden)
13-
CMD ["node", "tests/main.js"]
11+
CMD ["node", "test/main.js"]

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Tsinghua Single Source Shortest Paths algorithm
22

3-
This is a repository containing implementation varieties based on the paper written by Duan Ran et. al. from Tsinghua University.
3+
This is a repository containing a simple community driven implementation in Javascript based on the paper written by Duan Ran et. al. from Tsinghua University.
44
"Breaking the Sorting Barrier for Directed Single-Source Shortest Paths".
55

66
https://dl.acm.org/doi/10.1145/3717823.3718179
@@ -13,18 +13,9 @@ We give a deterministic O(mlog2/3n)-time algorithm for single-source shortest pa
1313

1414
## Development Details
1515

16-
This project is mainly focused in Javascript (in order to be published to npmjs.com via github Actions).
16+
This project is mainly focused in Javascript in order to be published to npmjs.com as a JS module (esmodule).
1717

18-
### Other Implementations
18+
### Other Implementations in GitHub
1919

2020
https://github.com/search?q=bmssp&type=repositories
2121

22-
Rust:
23-
- https://github.com/lucas-montes/bmssp - Available as a crate to pull.
24-
25-
Java:
26-
- https://github.com/PatrickDiallo23/BMSSP-Java
27-
28-
Python:
29-
- https://github.com/sidharthpunathil/fastest-shortest-path-algo-poc
30-
- https://github.com/simpsonresearch/tsinghua_benchmarks/tree/main

eslint.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import js from "@eslint/js";
2+
import prettier from "eslint-plugin-prettier";
3+
import globals from "globals";
4+
import json from "@eslint/json";
5+
import markdown from "@eslint/markdown";
6+
import { defineConfig } from "eslint/config";
7+
8+
export default defineConfig([
9+
{ files: ["**/*.{js,mjs,cjs}"], plugins: { js, prettier }, extends: ["js/recommended", "plugin:prettier/recommended"], languageOptions: { globals: globals.node } },
10+
{ files: ["**/*.json"], plugins: { json }, language: "json/json", extends: ["json/recommended"] },
11+
{ files: ["**/*.md"], plugins: { markdown }, language: "markdown/gfm", extends: ["markdown/recommended"] },
12+
]);

0 commit comments

Comments
 (0)