-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update prettier and doctoc (#5605)
* docs: add toc to CODE OF CONDUCT * chore: add prettier ignore blocks to docs * chore: update styles for Dockerfile * refactor: separate prettier, doctoc This does a couple things: - update `.prettierignore` - split `prettier` and `doctoc` commands. you can still run with `yarn fmt` - delete `fmt.sh` and add `doctoc.sh` By doing so, we can run tasks in parallel in CI and we should also have less false positives than before with `yarn fmt` locally. * refactor: update prettier job, add doctoc This modifies the prettier job to use actionsx/prettier. It also adds a job for `doctoc`. * chore: upgrade to prettier 2.7.1 * chore: pin doctoc to 2.0.0 * fixup!: add .pc to prettierignore * feat: add --cache to prettier cmd
- Loading branch information
Showing
15 changed files
with
88 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,34 +22,47 @@ concurrency: | |
# will skip running `yarn install` if it successfully fetched from cache | ||
|
||
jobs: | ||
fmt: | ||
prettier: | ||
name: Format with Prettier | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run prettier with actionsx/prettier | ||
uses: actionsx/prettier@v2 | ||
with: | ||
args: --check --loglevel=warn . | ||
|
||
doctoc: | ||
name: Doctoc markdown files | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
docs/** | ||
- name: Install Node.js v16 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
cache: "yarn" | ||
|
||
- name: Fetch dependencies from cache | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: yarn-build-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
yarn-build- | ||
- name: Install dependencies | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile | ||
- name: Install doctoc | ||
run: yarn global add [email protected] | ||
|
||
- name: Format files with Prettier | ||
run: yarn fmt | ||
- name: Run doctoc | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: yarn doctoc | ||
|
||
lint-helm: | ||
name: Lint Helm chart | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
lib/vscode | ||
lib/vscode | ||
helm-chart | ||
test/scripts | ||
test/e2e/extensions/test-extension | ||
.pc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -952,16 +952,16 @@ dir-glob@^3.0.1: | |
dependencies: | ||
path-type "^4.0.0" | ||
|
||
doctoc@^2.0.0: | ||
version "2.0.1" | ||
resolved "https://registry.yarnpkg.com/doctoc/-/doctoc-2.0.1.tgz#d5aee2bce65a438ff8717d9e51df3d540caa3b78" | ||
integrity sha512-JsxnSVZtLCThKehjFPBDhP1+ZLmdfXQynZH/0ABAwrnd1Zf3AV6LigC9oWJyaZ+c6RXCDnlGUNJ7I+1v8VaaRg== | ||
[email protected]: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/doctoc/-/doctoc-2.0.0.tgz#3c5c51ba89acb9b8e1924cc429500d6de2dfb90e" | ||
integrity sha512-thvCndtwVPe3GCDUG09NYPu9D72Ons3MFh/Fe5A3bePMHGa1XSMgJWyL04bkxa0DyyaylEB2UrqigbQM0fcj7w== | ||
dependencies: | ||
"@textlint/markdown-to-ast" "~6.1.7" | ||
anchor-markdown-header "~0.5.7" | ||
htmlparser2 "~4.1.0" | ||
minimist "~1.2.5" | ||
underscore "~1.12.1" | ||
underscore "~1.10.2" | ||
update-section "~0.3.3" | ||
|
||
doctrine@^2.1.0: | ||
|
@@ -2583,10 +2583,10 @@ prettier-plugin-sh@^0.12.0: | |
dependencies: | ||
mvdan-sh "^0.10.1" | ||
|
||
prettier@^2.2.1: | ||
version "2.3.2" | ||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" | ||
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== | ||
prettier@2.7.1: | ||
version "2.7.1" | ||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" | ||
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== | ||
|
||
progress@^2.0.0: | ||
version "2.0.3" | ||
|
@@ -3288,7 +3288,7 @@ unbox-primitive@^1.0.0: | |
has-symbols "^1.0.2" | ||
which-boxed-primitive "^1.0.2" | ||
|
||
underscore@^1.13.1, underscore@~1.12.1: | ||
underscore@^1.13.1, underscore@~1.10.2: | ||
version "1.13.1" | ||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.1.tgz#0c1c6bd2df54b6b69f2314066d65b6cde6fcf9d1" | ||
integrity sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g== | ||
|