Skip to content

Commit 07e62d7

Browse files
committed
doc: add docs-check tools and workflow
1 parent f98efd0 commit 07e62d7

File tree

16 files changed

+407
-3
lines changed

16 files changed

+407
-3
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
8+
check_ci:
9+
10+
runs-on: ubuntu-20.04
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/cache@v3
16+
with:
17+
path: ./tools/docs-check/.venv_vizzu
18+
key: venv-${{ github.run_id }}
19+
20+
- name: Touch dev environment
21+
run: make touch-dev
22+
working-directory: ./tools/docs-check
23+
24+
- name: Check format
25+
run: make check-format
26+
working-directory: ./tools/docs-check
27+
28+
- name: Check lint
29+
run: make check-lint
30+
working-directory: ./tools/docs-check

.github/workflows/cicd.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI-CD
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
14+
init:
15+
uses: ./.github/workflows/init.yml
16+
17+
ci:
18+
uses: ./.github/workflows/ci.yml
19+
needs: init
20+

.github/workflows/init.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Init
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
8+
init_dev:
9+
10+
runs-on: ubuntu-20.04
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/cache@v3
16+
with:
17+
path: ./tools/docs-check/.venv_vizzu
18+
key: venv-${{ github.run_id }}
19+
20+
- name: Init dev environment
21+
run: make dev
22+
working-directory: ./tools/docs-check

docs/tutorial/axes_title_tooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Promise.all([dataLoaded, mdChartLoaded]).then((results) => {
5252
{
5353
anims: [
5454
(chart) => {
55-
console.log(chart.config);
55+
console.log(chart.config); // eslint-disable-line no-console
5656
return chart;
5757
},
5858
(chart) => {

docs/tutorial/color_palette_fonts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Promise.all([dataLoaded, mdChartLoaded]).then((results) => {
3434
});
3535
},
3636
(chart) => {
37-
console.log(chart.style);
37+
console.log(chart.style); // eslint-disable-line no-console
3838
return chart;
3939
},
4040
],

docs/tutorial/events.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Promise.all([dataLoaded, mdChartLoaded]).then((results) => {
77
const mdchart = new MdChart(data, "./vizzu.js", "tutorial");
88

99
const clickHandler = (event) => {
10-
alert(JSON.stringify(event.data));
10+
alert(JSON.stringify(event.data)); // eslint-disable-line no-alert
1111
};
1212

1313
const labelDrawHandler = (event) => {

tools/docs-check/.eslintrc.cjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
jest: true,
5+
},
6+
extends: ["standard", "prettier"],
7+
ignorePatterns: ["**/node_modules/**", "**/.venv-vizzu/**"],
8+
};

tools/docs-check/.gitignore

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

tools/docs-check/.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
package-lock.json
3+
4+
.venv_vizzu
5+
*.md

tools/docs-check/.prettierrc.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
printWidth: 80,
3+
endOfLine: "auto",
4+
};

0 commit comments

Comments
 (0)