Skip to content

Commit 655adb8

Browse files
authored
feat: Add prettier and misc files (#13)
2 parents 3779fba + 1f94b18 commit 655adb8

File tree

10 files changed

+2373
-27
lines changed

10 files changed

+2373
-27
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ jobs:
3030
- name: Install dependencies
3131
run: npm ci
3232

33+
- name: Run linting
34+
run: npm run lint
35+
3336
- name: Run tests
3437
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ COPY package*.json ./
77
RUN npm install
88

99
# Mount src/ directory as a volume
10-
VOLUME ["src/", "tests/"]
10+
VOLUME ["src/", "test/"]
1111

1212
# Default command (can be overridden)
13-
CMD ["node", "tests/main.js"]
13+
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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import js from "@eslint/js";
2+
import markdown from "@eslint/markdown";
3+
import prettier from "eslint-plugin-prettier";
4+
import prettierConfig from "eslint-config-prettier";
5+
import globals from "globals";
6+
7+
export default [
8+
{
9+
files: ["**/*.md"],
10+
plugins: {
11+
markdown,
12+
},
13+
processor: "markdown/markdown",
14+
},
15+
js.configs.recommended,
16+
{
17+
files: ["**/*.{js,mjs,cjs}"],
18+
plugins: {
19+
prettier,
20+
},
21+
rules: {
22+
"prettier/prettier": "error",
23+
},
24+
languageOptions: {
25+
globals: globals.node,
26+
},
27+
},
28+
prettierConfig,
29+
];

0 commit comments

Comments
 (0)