Skip to content

Commit 721cc75

Browse files
committed
build: try format code
1 parent 213dd40 commit 721cc75

File tree

23 files changed

+322
-319
lines changed

23 files changed

+322
-319
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ todos:
1313
- [ ] [ELK](https://github.com/kieler/elkjs)
1414
- [ ] [cola.js](https://ialab.it.monash.edu/webcola/)
1515
- [ ] Canvas
16-
- [ ] [D3.js](https://github.com/d3/d3)
16+
- [ ] [D3.js](https://github.com/d3/d3)
1717
- [ ] [Konva.js](https://github.com/konvajs/konva), react: [react-konva](https://github.com/konvajs/react-konva)
1818
- [ ] [PixiJS](https://github.com/pixijs/pixijs)
1919
- [ ] [Fabric.js](https://github.com/fabricjs/fabric.js) SVG-to-Canvas (& canvas-to-SVG) Parser
2020
- [ ] Parser
2121
- [ ] [Jison](https://github.com/zaach/jison)
2222
- Diagram analysis
23-
- [ ] draw.io (level 1)
23+
- [ ] draw.io (level 1)
2424
- [ ] excalidraw
2525
- [ ] Mermaid.js
2626
- [ ] Flowchart.js
@@ -31,7 +31,6 @@ jison parser samples: [https://github.com/mermaid-js/mermaid](https://github.com
3131

3232
layout sample refs: [https://js.cytoscape.org/](https://js.cytoscape.org/)
3333

34-
License
35-
---
34+
## License
3635

3736
@2022 This code is distributed under the MPL license. See `LICENSE` in this directory.

docs/samples/gojs.json

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{ "class": "go.GraphLinksModel",
1+
{
2+
"class": "go.GraphLinksModel",
23
"copiesArrays": true,
34
"copiesArrayObjects": true,
45
"nodeDataArray": [
@@ -16,42 +17,55 @@
1617
{ "key": 100, "category": "DesiredEvent", "text": "Ordered!" },
1718
{ "key": 101, "category": "DesiredEvent", "text": "Downloaded!" },
1819

19-
{ "key": 200, "category": "UndesiredEvent",
20+
{
21+
"key": 200,
22+
"category": "UndesiredEvent",
2023
"reasonsList": [
21-
{"text":"Needs redesign?"},
22-
{"text":"Wrong Product?"} ]},
23-
{ "key": 201, "category": "UndesiredEvent",
24+
{ "text": "Needs redesign?" },
25+
{ "text": "Wrong Product?" }
26+
]
27+
},
28+
{
29+
"key": 201,
30+
"category": "UndesiredEvent",
2431
"reasonsList": [
25-
{"text":"Need better samples?"},
26-
{"text":"Bad landing page for Advertising?"} ]},
27-
{ "key": 202, "category": "UndesiredEvent",
32+
{ "text": "Need better samples?" },
33+
{ "text": "Bad landing page for Advertising?" }
34+
]
35+
},
36+
{
37+
"key": 202,
38+
"category": "UndesiredEvent",
2839
"reasonsList": [
29-
{"text":"Reconsider Pricing?"},
30-
{"text":"Confusing Cart?"} ]},
31-
32-
{ "category": "Comment", "text": "Add notes with general comments for the next team meeting" }
40+
{ "text": "Reconsider Pricing?" },
41+
{ "text": "Confusing Cart?" }
42+
]
43+
},
3344

45+
{
46+
"category": "Comment",
47+
"text": "Add notes with general comments for the next team meeting"
48+
}
3449
],
3550
"linkDataArray": [
3651
{ "from": -1, "to": 0 },
3752
{ "from": -2, "to": 0 },
3853
{ "from": -2, "to": 3 },
3954
{ "from": -3, "to": 3 },
40-
{ "from": 0, "to": 1 },
41-
{ "from": 1, "to": 2 },
42-
{ "from": 1, "to": 3 },
43-
{ "from": 0, "to": 5 },
44-
{ "from": 5, "to": 3 },
45-
{ "from": 3, "to": 2 },
46-
55+
{ "from": 0, "to": 1 },
56+
{ "from": 1, "to": 2 },
57+
{ "from": 1, "to": 3 },
58+
{ "from": 0, "to": 5 },
59+
{ "from": 5, "to": 3 },
60+
{ "from": 3, "to": 2 },
4761

48-
{ "from": 3, "to": 6 },
62+
{ "from": 3, "to": 6 },
4963

50-
{ "from": 2, "to": 100 },
51-
{ "from": 6, "to": 101 },
64+
{ "from": 2, "to": 100 },
65+
{ "from": 6, "to": 101 },
5266

53-
{ "from": 0, "to": 200 },
54-
{ "from": 3, "to": 201 },
55-
{ "from": 2, "to": 202 }
67+
{ "from": 0, "to": 200 },
68+
{ "from": 3, "to": 201 },
69+
{ "from": 2, "to": 202 }
5670
]
5771
}

nx.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,14 @@
1515
"default": {
1616
"runner": "@nrwl/nx-cloud",
1717
"options": {
18-
"cacheableOperations": [
19-
"build",
20-
"lint",
21-
"test",
22-
"e2e"
23-
],
18+
"cacheableOperations": ["build", "lint", "test", "e2e"],
2419
"accessToken": "NTMwMjY0MmItNGY0Ni00NzIxLTlmYzAtOTQwNmQ1ZjE1NWJkfHJlYWQtd3JpdGU="
2520
}
2621
}
2722
},
2823
"targetDefaults": {
2924
"build": {
30-
"dependsOn": [
31-
"^build"
32-
]
25+
"dependsOn": ["^build"]
3326
}
3427
},
3528
"workspaceLayout": {

others/parser-rust/.travis.yml

Lines changed: 59 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,65 +5,64 @@ cache: cargo
55

66
matrix:
77
include:
8+
# Builds with wasm-pack.
9+
- rust: beta
10+
env: RUST_BACKTRACE=1
11+
addons:
12+
firefox: latest
13+
chrome: stable
14+
before_script:
15+
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
16+
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
17+
- cargo install-update -a
18+
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
19+
script:
20+
- cargo generate --git . --name testing
21+
# Having a broken Cargo.toml (in that it has curlies in fields) anywhere
22+
# in any of our parent dirs is problematic.
23+
- mv Cargo.toml Cargo.toml.tmpl
24+
- cd testing
25+
- wasm-pack build
26+
- wasm-pack test --chrome --firefox --headless
827

9-
# Builds with wasm-pack.
10-
- rust: beta
11-
env: RUST_BACKTRACE=1
12-
addons:
13-
firefox: latest
14-
chrome: stable
15-
before_script:
16-
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
17-
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
18-
- cargo install-update -a
19-
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
20-
script:
21-
- cargo generate --git . --name testing
22-
# Having a broken Cargo.toml (in that it has curlies in fields) anywhere
23-
# in any of our parent dirs is problematic.
24-
- mv Cargo.toml Cargo.toml.tmpl
25-
- cd testing
26-
- wasm-pack build
27-
- wasm-pack test --chrome --firefox --headless
28+
# Builds on nightly.
29+
- rust: nightly
30+
env: RUST_BACKTRACE=1
31+
before_script:
32+
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
33+
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
34+
- cargo install-update -a
35+
- rustup target add wasm32-unknown-unknown
36+
script:
37+
- cargo generate --git . --name testing
38+
- mv Cargo.toml Cargo.toml.tmpl
39+
- cd testing
40+
- cargo check
41+
- cargo check --target wasm32-unknown-unknown
42+
- cargo check --no-default-features
43+
- cargo check --target wasm32-unknown-unknown --no-default-features
44+
- cargo check --no-default-features --features console_error_panic_hook
45+
- cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
46+
- cargo check --no-default-features --features "console_error_panic_hook wee_alloc"
47+
- cargo check --target wasm32-unknown-unknown --no-default-features --features "console_error_panic_hook wee_alloc"
2848

29-
# Builds on nightly.
30-
- rust: nightly
31-
env: RUST_BACKTRACE=1
32-
before_script:
33-
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
34-
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
35-
- cargo install-update -a
36-
- rustup target add wasm32-unknown-unknown
37-
script:
38-
- cargo generate --git . --name testing
39-
- mv Cargo.toml Cargo.toml.tmpl
40-
- cd testing
41-
- cargo check
42-
- cargo check --target wasm32-unknown-unknown
43-
- cargo check --no-default-features
44-
- cargo check --target wasm32-unknown-unknown --no-default-features
45-
- cargo check --no-default-features --features console_error_panic_hook
46-
- cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
47-
- cargo check --no-default-features --features "console_error_panic_hook wee_alloc"
48-
- cargo check --target wasm32-unknown-unknown --no-default-features --features "console_error_panic_hook wee_alloc"
49-
50-
# Builds on beta.
51-
- rust: beta
52-
env: RUST_BACKTRACE=1
53-
before_script:
54-
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
55-
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
56-
- cargo install-update -a
57-
- rustup target add wasm32-unknown-unknown
58-
script:
59-
- cargo generate --git . --name testing
60-
- mv Cargo.toml Cargo.toml.tmpl
61-
- cd testing
62-
- cargo check
63-
- cargo check --target wasm32-unknown-unknown
64-
- cargo check --no-default-features
65-
- cargo check --target wasm32-unknown-unknown --no-default-features
66-
- cargo check --no-default-features --features console_error_panic_hook
67-
- cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
68-
# Note: no enabling the `wee_alloc` feature here because it requires
69-
# nightly for now.
49+
# Builds on beta.
50+
- rust: beta
51+
env: RUST_BACKTRACE=1
52+
before_script:
53+
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
54+
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
55+
- cargo install-update -a
56+
- rustup target add wasm32-unknown-unknown
57+
script:
58+
- cargo generate --git . --name testing
59+
- mv Cargo.toml Cargo.toml.tmpl
60+
- cd testing
61+
- cargo check
62+
- cargo check --target wasm32-unknown-unknown
63+
- cargo check --no-default-features
64+
- cargo check --target wasm32-unknown-unknown --no-default-features
65+
- cargo check --no-default-features --features console_error_panic_hook
66+
- cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
67+
# Note: no enabling the `wee_alloc` feature here because it requires
68+
# nightly for now.

others/parser-rust/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<h1><code>wasm-pack-template</code></h1>
44

5-
<strong>A template for kick starting a Rust and WebAssembly project using <a href="https://github.com/rustwasm/wasm-pack">wasm-pack</a>.</strong>
5+
<strong>A template for kick starting a Rust and WebAssembly project using <a href="https://github.com/rustwasm/wasm-pack">wasm-pack</a>.</strong>
66

77
<p>
88
<a href="https://travis-ci.org/rustwasm/wasm-pack-template"><img src="https://img.shields.io/travis/rustwasm/wasm-pack-template.svg?style=flat-square" alt="Build Status" /></a>
@@ -14,7 +14,8 @@
1414
<a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a>
1515
</h3>
1616

17-
<sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub>
17+
<sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub>
18+
1819
</div>
1920

2021
## About
@@ -61,9 +62,9 @@ wasm-pack publish
6162

6263
## 🔋 Batteries Included
6364

64-
* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
65+
- [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
6566
between WebAssembly and JavaScript.
66-
* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
67+
- [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
6768
for logging panic messages to the developer console.
68-
* [`wee_alloc`](https://github.com/rustwasm/wee_alloc), an allocator optimized
69+
- [`wee_alloc`](https://github.com/rustwasm/wee_alloc), an allocator optimized
6970
for small code size.

packages/feakin-converter/.webpack/webpack.config.base.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import path from 'path';
22

3-
export const resolveRoot = (...relativePath) => path.resolve(__dirname, '..', ...relativePath);
3+
export const resolveRoot = (...relativePath) =>
4+
path.resolve(__dirname, '..', ...relativePath);
45

56
export default {
67
amd: false, // https://github.com/lodash/lodash/issues/3052
@@ -29,7 +30,10 @@ export default {
2930
rules: [
3031
{
3132
test: /\.js$/,
32-
include: [resolveRoot('./src'), resolveRoot('./node_modules/dagre-d3-renderer/lib')],
33+
include: [
34+
resolveRoot('./src'),
35+
resolveRoot('./node_modules/dagre-d3-renderer/lib'),
36+
],
3337
use: {
3438
loader: 'babel-loader',
3539
},
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import flowParser from './parser/mermaid/flow';
22

33
export const Parser = {
4-
flowParser
4+
flowParser,
55
};
6-

packages/feakin-converter/src/jison/transformer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const { Generator } = require('jison');
22

33
module.exports = {
44
process(sourceText, sourcePath, options) {
5-
return { code: new Generator(sourceText, options.transformerConfig).generate() };
5+
return {
6+
code: new Generator(sourceText, options.transformerConfig).generate(),
7+
};
68
},
79
};
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
import { FeakinExporter } from "./exporter";
1+
import { FeakinExporter } from './exporter';
22

33
export class DrawioExporter implements FeakinExporter {
44
export(x: string): string {
5-
return "";
5+
return '';
66
}
77

88
footer(): string {
9-
return "";
9+
return '';
1010
}
1111

1212
header(): string {
13-
return "";
13+
return '';
1414
}
15-
1615
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
import { FeakinExporter } from "./exporter";
1+
import { FeakinExporter } from './exporter';
22

33
export class ExcalidrawExporter implements FeakinExporter {
44
export(x: string): string {
5-
return "";
5+
return '';
66
}
77

88
footer(): string {
9-
return "";
9+
return '';
1010
}
1111

1212
header(): string {
13-
return "";
13+
return '';
1414
}
15-
1615
}

0 commit comments

Comments
 (0)