mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
chore: use prettier instead of clang-format (#7014)
* chore: add and configure prettier * chore: remove clang-format * chore: remove clang-format config * chore: lint additional ts files * chore: fix lint errors in blocks * chore: add prettier-ignore where needed * chore: ignore js blocks when formatting * chore: fix playground html syntax * chore: fix yaml spacing from merge * chore: convert text blocks to use arrow functions * chore: format everything with prettier * chore: fix lint unused imports in blocks
This commit is contained in:
committed by
GitHub
parent
af991f5e1b
commit
88ff901a72
44
.github/workflows/assign_reviewers.yml
vendored
44
.github/workflows/assign_reviewers.yml
vendored
@@ -16,26 +16,26 @@ jobs:
|
||||
requested-reviewer:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Assign requested reviewer
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
try {
|
||||
if (context.payload.pull_request === undefined) {
|
||||
throw new Error("Can't get pull_request payload. " +
|
||||
'Check a request reviewer event was triggered.');
|
||||
- name: Assign requested reviewer
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
try {
|
||||
if (context.payload.pull_request === undefined) {
|
||||
throw new Error("Can't get pull_request payload. " +
|
||||
'Check a request reviewer event was triggered.');
|
||||
}
|
||||
const reviewers = context.payload.pull_request.requested_reviewers;
|
||||
// Assignees takes in a list of logins rather than the
|
||||
// reviewer object.
|
||||
const reviewerNames = reviewers.map(reviewer => reviewer.login);
|
||||
const {number:issue_number} = context.payload.pull_request;
|
||||
github.rest.issues.addAssignees({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: issue_number,
|
||||
assignees: reviewerNames
|
||||
});
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
const reviewers = context.payload.pull_request.requested_reviewers;
|
||||
// Assignees takes in a list of logins rather than the
|
||||
// reviewer object.
|
||||
const reviewerNames = reviewers.map(reviewer => reviewer.login);
|
||||
const {number:issue_number} = context.payload.pull_request;
|
||||
github.rest.issues.addAssignees({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: issue_number,
|
||||
assignees: reviewerNames
|
||||
});
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
||||
86
.github/workflows/build.yml
vendored
86
.github/workflows/build.yml
vendored
@@ -23,65 +23,67 @@ jobs:
|
||||
# https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Reconfigure git to use HTTP authentication
|
||||
run: >
|
||||
git config --global url."https://github.com/".insteadOf
|
||||
ssh://git@github.com/
|
||||
- name: Reconfigure git to use HTTP authentication
|
||||
run: >
|
||||
git config --global url."https://github.com/".insteadOf
|
||||
ssh://git@github.com/
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Npm Install
|
||||
run: npm install
|
||||
- name: Npm Install
|
||||
run: npm install
|
||||
|
||||
- name: Linux Test Setup
|
||||
if: runner.os == 'Linux'
|
||||
run: source ./tests/scripts/setup_linux_env.sh
|
||||
- name: Linux Test Setup
|
||||
if: runner.os == 'Linux'
|
||||
run: source ./tests/scripts/setup_linux_env.sh
|
||||
|
||||
- name: MacOS Test Setup
|
||||
if: runner.os == 'macOS'
|
||||
run: source ./tests/scripts/setup_osx_env.sh
|
||||
- name: MacOS Test Setup
|
||||
if: runner.os == 'macOS'
|
||||
run: source ./tests/scripts/setup_osx_env.sh
|
||||
|
||||
- name: Run
|
||||
run: npm run test
|
||||
- name: Run
|
||||
run: npm run test
|
||||
|
||||
env:
|
||||
CI: true
|
||||
env:
|
||||
CI: true
|
||||
|
||||
lint:
|
||||
timeout-minutes: 5
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 20.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Use Node.js 20.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
|
||||
- name: Npm Install
|
||||
run: npm install
|
||||
- name: Npm Install
|
||||
run: npm install
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
clang-formatter:
|
||||
format:
|
||||
timeout-minutes: 5
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: DoozyX/clang-format-lint-action@v0.16
|
||||
with:
|
||||
source: 'core'
|
||||
extensions: 'js,ts'
|
||||
# This should be as close as possible to the version that the npm
|
||||
# package supports. This can be found by running:
|
||||
# npx clang-format --version.
|
||||
clangFormatVersion: 15
|
||||
- name: Use Node.js 20.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
|
||||
- name: Npm Install
|
||||
run: npm install
|
||||
|
||||
- name: Check Format
|
||||
run: npm run format:check
|
||||
|
||||
3
.github/workflows/conventional-label.yml
vendored
3
.github/workflows/conventional-label.yml
vendored
@@ -10,7 +10,8 @@ jobs:
|
||||
steps:
|
||||
- uses: bcoe/conventional-release-labels@v1
|
||||
with:
|
||||
type_labels: '{"feat": "PR: feature", "fix": "PR: fix", "breaking": "breaking
|
||||
type_labels:
|
||||
'{"feat": "PR: feature", "fix": "PR: fix", "breaking": "breaking
|
||||
change", "chore": "PR: chore", "docs": "PR: docs", "refactor": "PR:
|
||||
refactor", "revert": "PR: revert", "deprecate": "deprecation"}'
|
||||
ignored_types: '[]'
|
||||
|
||||
2
.github/workflows/develop_freeze.yml
vendored
2
.github/workflows/develop_freeze.yml
vendored
@@ -23,4 +23,4 @@ jobs:
|
||||
uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message: "Thanks for the PR! The develop branch is currently frozen in preparation for the release so it may not be addressed until after release week."
|
||||
message: 'Thanks for the PR! The develop branch is currently frozen in preparation for the release so it may not be addressed until after release week.'
|
||||
|
||||
1
.github/workflows/tag_module_cleanup.yml
vendored
1
.github/workflows/tag_module_cleanup.yml
vendored
@@ -12,7 +12,6 @@ on:
|
||||
|
||||
jobs:
|
||||
tag-module-cleanup:
|
||||
|
||||
# Add the type: cleanup label
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user