Skip to content

Commit a1572f5

Browse files
committed
Initial commit
1 parent ae02dae commit a1572f5

32 files changed

+3465
-1
lines changed

.eslintrc.cjs

Lines changed: 310 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,310 @@
1+
// eslint-disable-next-line no-undef
2+
module.exports = {
3+
"plugins": ["eslint-plugin-kuma"],
4+
"env": {
5+
"browser": true,
6+
"node": true,
7+
"es6": true
8+
},
9+
"extends": "eslint:recommended",
10+
"parserOptions": {
11+
"sourceType": "module",
12+
"ecmaVersion": "latest"
13+
},
14+
"rules": {
15+
"kuma/no-boolean-member": "error",
16+
"kuma/no-boolean-in": "error",
17+
"kuma/no-eq-boolean": "error",
18+
"accessor-pairs": "error",
19+
"array-bracket-newline": "error",
20+
"array-bracket-spacing": "error",
21+
"array-callback-return": "error",
22+
"array-element-newline": "off",
23+
"arrow-body-style": "error",
24+
"arrow-parens": ["error"],
25+
"arrow-spacing": [
26+
"error",
27+
{
28+
"after": true,
29+
"before": true
30+
}
31+
],
32+
"block-scoped-var": "error",
33+
"block-spacing": "off",
34+
"brace-style": [
35+
"error",
36+
"1tbs",
37+
{
38+
"allowSingleLine": true
39+
}
40+
],
41+
"callback-return": "off",
42+
"camelcase": "off",
43+
"capitalized-comments": "off",
44+
"class-methods-use-this": ["error", { "exceptMethods": ["apply"] }],
45+
"comma-dangle": "error",
46+
"comma-spacing": [
47+
"error",
48+
{
49+
"after": true,
50+
"before": false
51+
}
52+
],
53+
"comma-style": [
54+
"error",
55+
"last"
56+
],
57+
"complexity": "off",
58+
"computed-property-spacing": [
59+
"error",
60+
"never"
61+
],
62+
"consistent-return": "off",
63+
"consistent-this": "error",
64+
"curly": "error",
65+
"default-case": "error",
66+
"dot-location": "error",
67+
"dot-notation": "error",
68+
"eol-last": "error",
69+
"eqeqeq": "off",
70+
"func-call-spacing": "error",
71+
"func-name-matching": "error",
72+
"func-names": "off",
73+
"func-style": "off",
74+
"function-paren-newline": "off",
75+
"generator-star-spacing": "off",
76+
"global-require": "error",
77+
"guard-for-in": "error",
78+
"handle-callback-err": "error",
79+
"id-blacklist": "error",
80+
"id-length": "off",
81+
"id-match": "error",
82+
"implicit-arrow-linebreak": [
83+
"error",
84+
"beside"
85+
],
86+
"indent": "off",
87+
"indent-legacy": "off",
88+
"init-declarations": "off",
89+
"jsx-quotes": "error",
90+
"key-spacing": "error",
91+
"keyword-spacing": [
92+
"error",
93+
{
94+
"after": true,
95+
"before": true
96+
}
97+
],
98+
"line-comment-position": "off",
99+
"linebreak-style": "off",
100+
"lines-around-comment": "off",
101+
"lines-around-directive": "off",
102+
"lines-between-class-members": "error",
103+
"max-classes-per-file": "error",
104+
"max-depth": "off",
105+
"max-len": "off",
106+
"max-lines": "off",
107+
"max-lines-per-function": "off",
108+
"max-nested-callbacks": "error",
109+
"max-params": ["error", 5],
110+
"max-statements": "off",
111+
"max-statements-per-line": "off",
112+
"multiline-comment-style": "off",
113+
"multiline-ternary": [
114+
"error",
115+
"always-multiline"
116+
],
117+
"new-cap": "error",
118+
"new-parens": "error",
119+
"newline-after-var": "off",
120+
"newline-before-return": "off",
121+
"newline-per-chained-call": "error",
122+
"no-alert": "off",
123+
"no-array-constructor": "error",
124+
"no-async-promise-executor": "error",
125+
"no-await-in-loop": "error",
126+
"no-bitwise": "off",
127+
"no-buffer-constructor": "error",
128+
"no-caller": "error",
129+
"no-catch-shadow": "error",
130+
"no-cond-assign": "error",
131+
"no-confusing-arrow": "off",
132+
"no-console": "off",
133+
"no-continue": "off",
134+
"no-div-regex": "error",
135+
"no-duplicate-imports": "error",
136+
"no-else-return": "error",
137+
"no-empty": ["error", { "allowEmptyCatch": true }],
138+
"no-empty-function": "error",
139+
"no-eq-null": "error",
140+
"no-eval": "error",
141+
"no-extend-native": "error",
142+
"no-extra-bind": "error",
143+
"no-extra-label": "error",
144+
"no-extra-parens": "off",
145+
"no-floating-decimal": "error",
146+
"no-implicit-coercion": "error",
147+
"no-implicit-globals": "off",
148+
"no-implied-eval": "error",
149+
"no-inline-comments": "off",
150+
"no-inner-declarations": [
151+
"error",
152+
"functions"
153+
],
154+
"no-invalid-this": "error",
155+
"no-irregular-whitespace": "error",
156+
"no-iterator": "error",
157+
"no-label-var": "error",
158+
"no-labels": "off",
159+
"no-lone-blocks": "error",
160+
"no-lonely-if": "error",
161+
"no-loop-func": "error",
162+
"no-magic-numbers": "off",
163+
"no-misleading-character-class": "error",
164+
"no-mixed-operators": "off",
165+
"no-mixed-requires": "error",
166+
"no-multi-assign": "error",
167+
"no-multi-spaces": "error",
168+
"no-multi-str": "error",
169+
"no-multiple-empty-lines": "off",
170+
"no-native-reassign": "error",
171+
"no-negated-condition": "error",
172+
"no-negated-in-lhs": "error",
173+
"no-nested-ternary": "off",
174+
"no-new": "error",
175+
"no-new-func": "error",
176+
"no-new-object": "error",
177+
"no-new-require": "error",
178+
"no-new-wrappers": "error",
179+
"no-octal-escape": "error",
180+
"no-param-reassign": "off",
181+
"no-path-concat": "error",
182+
"no-plusplus": "off",
183+
"no-process-env": "error",
184+
"no-process-exit": "error",
185+
"no-proto": "error",
186+
"no-prototype-builtins": "error",
187+
"no-restricted-globals": "error",
188+
"no-restricted-imports": "error",
189+
"no-restricted-modules": "error",
190+
"no-restricted-properties": "error",
191+
"no-restricted-syntax": "off",
192+
"no-return-assign": "error",
193+
"no-return-await": "error",
194+
"no-script-url": "error",
195+
"no-self-compare": "error",
196+
"no-sequences": "error",
197+
"no-shadow": "error",
198+
"no-shadow-restricted-names": "error",
199+
"no-spaced-func": "error",
200+
"no-sync": "off",
201+
"no-tabs": "off",
202+
"no-template-curly-in-string": "error",
203+
"no-ternary": "off",
204+
"no-throw-literal": "error",
205+
"no-trailing-spaces": ["error", { "ignoreComments": true }],
206+
"no-undef-init": "error",
207+
"no-undefined": "error",
208+
"no-underscore-dangle": "off",
209+
"no-unmodified-loop-condition": "error",
210+
"no-unneeded-ternary": "error",
211+
"no-unused-expressions": ["error", { "allowShortCircuit": true }],
212+
"no-use-before-define": "error",
213+
"no-useless-call": "error",
214+
"no-useless-computed-key": "error",
215+
"no-useless-concat": "error",
216+
"no-useless-constructor": "error",
217+
"no-useless-rename": "error",
218+
"no-useless-return": "error",
219+
"no-var": "error",
220+
"no-void": "off",
221+
"no-warning-comments": "error",
222+
"no-whitespace-before-property": "error",
223+
"no-with": "error",
224+
"nonblock-statement-body-position": ["error", "below"],
225+
"object-curly-newline": "error",
226+
"object-curly-spacing": ["error", "always", { "arraysInObjects": true }],
227+
"object-property-newline": "error",
228+
"object-shorthand": "error",
229+
"one-var": "off",
230+
"one-var-declaration-per-line": "error",
231+
"operator-assignment": [
232+
"error",
233+
"always"
234+
],
235+
"operator-linebreak": ["error", "before"],
236+
"padded-blocks": "off",
237+
"padding-line-between-statements": "error",
238+
"prefer-arrow-callback": "off",
239+
"prefer-const": "error",
240+
"prefer-destructuring": [
241+
"error", {
242+
"object": true,
243+
"array": false
244+
}
245+
],
246+
"prefer-numeric-literals": "error",
247+
"prefer-object-spread": "error",
248+
"prefer-promise-reject-errors": "error",
249+
"prefer-reflect": "off",
250+
"prefer-rest-params": "error",
251+
"prefer-spread": "error",
252+
"prefer-template": "error",
253+
"quote-props": "error",
254+
"quotes": ["error", "double", { "avoidEscape": true }],
255+
"radix": "error",
256+
"require-atomic-updates": "error",
257+
"require-await": "error",
258+
"require-jsdoc": "off",
259+
"require-unicode-regexp": "error",
260+
"rest-spread-spacing": [
261+
"error",
262+
"never"
263+
],
264+
"semi": "error",
265+
"semi-spacing": [
266+
"error",
267+
{
268+
"after": true,
269+
"before": false
270+
}
271+
],
272+
"semi-style": [
273+
"error",
274+
"last"
275+
],
276+
"sort-imports": "off",
277+
"sort-keys": "off",
278+
"sort-vars": "off",
279+
"space-before-blocks": "error",
280+
"space-before-function-paren": "off",
281+
"space-in-parens": [
282+
"error",
283+
"never"
284+
],
285+
"space-infix-ops": "error",
286+
"space-unary-ops": "error",
287+
"spaced-comment": "off",
288+
"strict": "off",
289+
"switch-colon-spacing": "error",
290+
"symbol-description": "error",
291+
"template-curly-spacing": [
292+
"error",
293+
"never"
294+
],
295+
"template-tag-spacing": "error",
296+
"unicode-bom": [
297+
"error",
298+
"never"
299+
],
300+
"valid-jsdoc": "off",
301+
"vars-on-top": "off",
302+
"wrap-iife": "error",
303+
"wrap-regex": "off",
304+
"yield-star-spacing": "error",
305+
"yoda": [
306+
"error",
307+
"never"
308+
]
309+
}
310+
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode/

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
11
# JS-TS-Function-Flow-Chart
2-
a web service that generates the function flow chart from a JavaScript/TypeScript/JSX file.
2+
3+
[JS-TS-Function-Flow-Chart](https://querykuma.github.io/JS-TS-Function-Flow-Chart) is a web service that generates the function flow chart from a JavaScript/TypeScript/JSX file.
4+
5+
## Overview
6+
7+
```JavaScript
8+
function from() {
9+
to()
10+
}
11+
```
12+
13+
The above program has a function flow from the function(from) node to the function(to) node. The web service extracts all the function flows from a file and generates the chart.
14+
15+
16+
17+
Some of the features of JS-TS-Function-Flow-Chart are:
18+
* The input is a JavaScript or TypeScript or JSX file.
19+
* It shows a Mermaid code of the chart.
20+
* It shows a table that lists the function flows in a file.
21+
* It also shows the count of the function calls.
22+
* It colors the connected edges when the mouse clicks the node.
23+
* It shows the popup of the edges details when the mouse hovers the node.
24+
* It hides function(to) nodes in the chart by the user setting function or object names.
25+
26+
## Usage
27+
28+
Start by clicking a button to select a file or by dragging a file into the browser. It generates the function flow chart.
29+
30+
Click each function node on the chart to color IN/OUT edges on the node.
31+
32+
Hover each function node on the chart to pop up IN/OUT details.
33+
34+
Click the setting button on the icon in the upper right corner of the screen to hide the function(to) nodes whose names are specified in the setting screen. You need to set them to blank if you want to show all the function flows because they have default values.

0 commit comments

Comments
 (0)