Skip to content

Commit 9c3af55

Browse files
committed
chore: add prettier
1 parent 6e7c461 commit 9c3af55

File tree

604 files changed

+16167
-22452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

604 files changed

+16167
-22452
lines changed

.eslintrc

+43-13
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,60 @@
11
{
2-
"parserOptions": {
3-
"ecmaVersion": 2019
2+
"parserOptions": {
3+
"ecmaVersion": 2019
44
},
55
"extends": [
66
"plugin:bpmn-io/browser",
77
"plugin:bpmn-io/jsx",
88
"plugin:bpmn-io/node",
9-
"plugin:react-hooks/recommended"
9+
"plugin:react-hooks/recommended",
10+
"plugin:prettier/recommended"
1011
],
1112
"rules": {
1213
"import/first": "error",
1314
"import/no-amd": "error",
1415
"import/no-webpack-loader-syntax": "error",
15-
"import/no-restricted-paths": [ "error", {
16-
"basePath": "./packages",
17-
"zones": [
18-
{ "target": "form-js/src", "from": ".", "except": [ "form-js" ] },
19-
{ "target": "form-js-editor/src", "from": ".", "except": [ "form-js-editor" ] },
20-
{ "target": "form-js-playground/src", "from": ".", "except": [ "form-js-playground" ] },
21-
{ "target": "form-js-viewer/src", "from": ".", "except": [ "form-js-viewer" ] }
22-
]
23-
}]
16+
"import/no-restricted-paths": [
17+
"error",
18+
{
19+
"basePath": "./packages",
20+
"zones": [
21+
{
22+
"target": "form-js/src",
23+
"from": ".",
24+
"except": [
25+
"form-js"
26+
]
27+
},
28+
{
29+
"target": "form-js-editor/src",
30+
"from": ".",
31+
"except": [
32+
"form-js-editor"
33+
]
34+
},
35+
{
36+
"target": "form-js-playground/src",
37+
"from": ".",
38+
"except": [
39+
"form-js-playground"
40+
]
41+
},
42+
{
43+
"target": "form-js-viewer/src",
44+
"from": ".",
45+
"except": [
46+
"form-js-viewer"
47+
]
48+
}
49+
]
50+
}
51+
]
2452
},
2553
"overrides": [
2654
{
27-
"files": [ "packages/**/src/**/*.js" ],
55+
"files": [
56+
"packages/**/src/**/*.js"
57+
],
2858
"rules": {
2959
"import/no-default-export": "error"
3060
}

.github/PULL_REQUEST_TEMPLATE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
33
Thanks for creating this pull request!
44
5-
Please make sure to link the issue you are closing as "Closes #issueNr".
5+
Please make sure to link the issue you are closing as "Closes #issueNr".
66
This helps us to understand the context of this PR.
77
88
-->
99

1010
Closes #
1111

1212
- [ ] This PR adds a new `form-js` element or visually changes an existing component.
13-
* => In that case, we need to ensure we follow up on this, e.g. by [creating an issue in Tasklist](https://github.com/camunda/tasklist/issues/new/choose)
13+
- => In that case, we need to ensure we follow up on this, e.g. by [creating an issue in Tasklist](https://github.com/camunda/tasklist/issues/new/choose)

.github/workflows/CI.yml

+34-35
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,43 @@
11
name: CI
2-
on: [ push, pull_request ]
2+
on: [push, pull_request]
33
jobs:
44
Build:
5-
65
strategy:
76
matrix:
8-
os: [ macos-latest, ubuntu-20.04, windows-latest ]
9-
node-version: [ 20 ]
7+
os: [macos-latest, ubuntu-20.04, windows-latest]
8+
node-version: [20]
109

1110
runs-on: ${{ matrix.os }}
1211

1312
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v4
16-
- name: Use Node.js
17-
uses: actions/setup-node@v4
18-
with:
19-
node-version: ${{ matrix.node-version }}
20-
- name: Cache Node.js modules
21-
uses: actions/cache@v4
22-
with:
23-
# npm cache files are stored in `~/.npm` on Linux/macOS
24-
path: ~/.npm
25-
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
26-
restore-keys: |
27-
${{ runner.OS }}-node-
28-
${{ runner.OS }}-
29-
- name: Install dependencies
30-
run: npm ci
31-
- name: Build
32-
if: runner.os == 'Linux'
33-
env:
34-
COVERAGE: 1
35-
TEST_BROWSERS: Firefox,ChromeHeadless
36-
run: xvfb-run npm run all
37-
- name: Build
38-
if: runner.os != 'Linux'
39-
env:
40-
TEST_BROWSERS: ChromeHeadless
41-
run: npm run all
42-
- name: Upload coverage
43-
uses: codecov/codecov-action@v4
44-
if: runner.os == 'Linux'
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Use Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- name: Cache Node.js modules
20+
uses: actions/cache@v4
21+
with:
22+
# npm cache files are stored in `~/.npm` on Linux/macOS
23+
path: ~/.npm
24+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
25+
restore-keys: |
26+
${{ runner.OS }}-node-
27+
${{ runner.OS }}-
28+
- name: Install dependencies
29+
run: npm ci
30+
- name: Build
31+
if: runner.os == 'Linux'
32+
env:
33+
COVERAGE: 1
34+
TEST_BROWSERS: Firefox,ChromeHeadless
35+
run: xvfb-run npm run all
36+
- name: Build
37+
if: runner.os != 'Linux'
38+
env:
39+
TEST_BROWSERS: ChromeHeadless
40+
run: npm run all
41+
- name: Upload coverage
42+
uses: codecov/codecov-action@v4
43+
if: runner.os == 'Linux'

.github/workflows/DEPLOY_PLAYGROUND_PREVIEW.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Deploy playground preview
22
on:
33
pull_request:
4-
types: [ labeled, synchronize ]
4+
types: [labeled, synchronize]
55
jobs:
66
deploy-preview:
77
# check whether the labeled event was deploy-preview || check whether on new commit of PR the label deploy-preview exists
@@ -37,7 +37,7 @@ jobs:
3737
token: ${{ secrets.GITHUB_TOKEN }}
3838
ref: ${{ env.BRANCH_NAME }}
3939
- name: Trigger Netlify branch build
40-
run: |
40+
run: |
4141
curl --location --request POST '${{ secrets.NETLIFY_CUSTOM_BUILD_HOOK }}?trigger_branch=${{ env.PREVIEW_BRANCH_NAME }}&clear_cache=true' \
4242
--header 'Content-Type: application/x-www-form-urlencoded' \
4343
--data-urlencode 'FORM_JS_BRANCH=${{ env.BRANCH_NAME }}'
@@ -53,4 +53,4 @@ jobs:
5353
env: ${{ env.PREVIEW_BRANCH_NAME }}
5454
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
5555
env_url: https://${{ env.PREVIEW_BRANCH_NAME }}--camunda-form-playground.netlify.app
56-
ref: ${{ env.BRANCH_NAME }}
56+
ref: ${{ env.BRANCH_NAME }}

.github/workflows/MERGE_MASTER_TO_DEVELOP.yml

+20-20
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Merge main to develop
22
on:
33
push:
44
branches:
5-
- "main"
5+
- 'main'
66

77
jobs:
88
Merge_main_to_develop:
@@ -11,23 +11,23 @@ jobs:
1111
contents: write
1212

1313
steps:
14-
- name: Checkout develop
15-
uses: actions/checkout@v4
16-
with:
17-
ref: develop
18-
fetch-depth: 0
19-
- name: Merge main to develop and push
20-
run: |
21-
git config user.name '${{ secrets.BPMN_IO_USERNAME }}'
22-
git config user.email '${{ secrets.BPMN_IO_EMAIL }}'
23-
git merge -m 'Merge main to develop' --no-edit origin/main
24-
git push
14+
- name: Checkout develop
15+
uses: actions/checkout@v4
16+
with:
17+
ref: develop
18+
fetch-depth: 0
19+
- name: Merge main to develop and push
20+
run: |
21+
git config user.name '${{ secrets.BPMN_IO_USERNAME }}'
22+
git config user.email '${{ secrets.BPMN_IO_EMAIL }}'
23+
git merge -m 'Merge main to develop' --no-edit origin/main
24+
git push
2525
26-
- name: Notify failure on Slack
27-
if: failure()
28-
uses: slackapi/[email protected]
29-
with:
30-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
31-
slack-message: "Automatic merge of <https://github.com/${{ github.repository }}/tree/${{ github.ref }}|${{ github.ref }}> to <https://github.com/${{ github.repository }}/tree/develop|${{ github.repository }}#develop> failed."
32-
env:
33-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
26+
- name: Notify failure on Slack
27+
if: failure()
28+
uses: slackapi/[email protected]
29+
with:
30+
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
31+
slack-message: 'Automatic merge of <https://github.com/${{ github.repository }}/tree/${{ github.ref }}|${{ github.ref }}> to <https://github.com/${{ github.repository }}/tree/develop|${{ github.repository }}#develop> failed.'
32+
env:
33+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/POST_RELEASE.yml

+42-43
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,51 @@ on:
55
- 'v[0-9]+.*'
66
jobs:
77
post-release:
8-
98
strategy:
109
matrix:
11-
os: [ ubuntu-latest ]
12-
node-version: [ 20 ]
10+
os: [ubuntu-latest]
11+
node-version: [20]
1312

1413
runs-on: ${{ matrix.os }}
1514

1615
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v4
19-
- name: Set TAG
20-
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
21-
- name: Wait for published
22-
env:
23-
PKG: '@bpmn-io/form-js@${{ env.TAG }}'
24-
run: tasks/stages/await-published
25-
- name: Use Node.js
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: ${{ matrix.node-version }}
29-
cache: 'npm'
30-
- name: Check for stable release
31-
run: |
32-
if [[ ${{ env.TAG }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]
33-
then echo "STABLE_RELEASE=true" >> $GITHUB_ENV
34-
fi
35-
- name: Update demo
36-
if: ${{ env.STABLE_RELEASE == 'true' }}
37-
env:
38-
BPMN_IO_TOKEN: ${{ secrets.BPMN_IO_TOKEN }}
39-
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
40-
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
41-
BPMN_IO_DEMO_ENDPOINT: ${{ secrets.BPMN_IO_DEMO_ENDPOINT }}
42-
run: tasks/stages/update-demo
43-
- name: Update examples
44-
if: ${{ env.STABLE_RELEASE == 'true' }}
45-
env:
46-
BPMN_IO_TOKEN: ${{ secrets.BPMN_IO_TOKEN }}
47-
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
48-
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
49-
run: tasks/stages/update-examples
50-
- name: Update website
51-
if: ${{ env.STABLE_RELEASE == 'true' }}
52-
env:
53-
BPMN_IO_TOKEN: ${{ secrets.BPMN_IO_TOKEN }}
54-
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
55-
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
56-
run: tasks/stages/update-website
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Set TAG
19+
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
20+
- name: Wait for published
21+
env:
22+
PKG: '@bpmn-io/form-js@${{ env.TAG }}'
23+
run: tasks/stages/await-published
24+
- name: Use Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- name: Check for stable release
30+
run: |
31+
if [[ ${{ env.TAG }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]
32+
then echo "STABLE_RELEASE=true" >> $GITHUB_ENV
33+
fi
34+
- name: Update demo
35+
if: ${{ env.STABLE_RELEASE == 'true' }}
36+
env:
37+
BPMN_IO_TOKEN: ${{ secrets.BPMN_IO_TOKEN }}
38+
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
39+
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
40+
BPMN_IO_DEMO_ENDPOINT: ${{ secrets.BPMN_IO_DEMO_ENDPOINT }}
41+
run: tasks/stages/update-demo
42+
- name: Update examples
43+
if: ${{ env.STABLE_RELEASE == 'true' }}
44+
env:
45+
BPMN_IO_TOKEN: ${{ secrets.BPMN_IO_TOKEN }}
46+
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
47+
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
48+
run: tasks/stages/update-examples
49+
- name: Update website
50+
if: ${{ env.STABLE_RELEASE == 'true' }}
51+
env:
52+
BPMN_IO_TOKEN: ${{ secrets.BPMN_IO_TOKEN }}
53+
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
54+
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
55+
run: tasks/stages/update-website

.github/workflows/TASKLIST_CARBONISATION.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Check Tasklist Carbonization
33
on:
44
push:
55
branches:
6-
- "*"
7-
- "!main"
6+
- '*'
7+
- '!main'
88

99
jobs:
1010
Exec:
@@ -24,18 +24,18 @@ jobs:
2424
repository: camunda/tasklist
2525
token: ${{ secrets.ADD_TO_HTO_PROJECT_PAT }}
2626
path: tasklist
27-
ref: "master"
27+
ref: 'master'
2828
- name: Setup form-js cache
2929
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
3030
with:
31-
node-version: "20"
32-
cache: "npm"
31+
node-version: '20'
32+
cache: 'npm'
3333
cache-dependency-path: ./form-js/package-lock.json
3434
- name: Setup Tasklist cache
3535
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
3636
with:
37-
node-version: "20"
38-
cache: "yarn"
37+
node-version: '20'
38+
cache: 'yarn'
3939
cache-dependency-path: ./tasklist/tasklist/client/yarn.lock
4040
- name: Install form-js deps
4141
run: npm ci

.github/workflows/TEARDOWN_PLAYGROUND_PREVIEW.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Teardown playground preview
22
on:
33
pull_request:
4-
types: [ unlabeled, closed ]
4+
types: [unlabeled, closed]
55

66
jobs:
77
teardown:
@@ -34,4 +34,4 @@ jobs:
3434
step: deactivate-env
3535
env: ${{ env.PREVIEW_BRANCH_NAME }}
3636
token: ${{ secrets.GITHUB_TOKEN }}
37-
ref: ${{ env.BRANCH_NAME }}
37+
ref: ${{ env.BRANCH_NAME }}

0 commit comments

Comments
 (0)