Skip to content

feat: add prettier-plugin-sh #2891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ci/dev/fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set -euo pipefail
main() {
cd "$(dirname "$0")/../.."

shfmt -i 2 -w -sr $(git ls-files "*.sh" | grep -v "lib/vscode")

local prettierExts
prettierExts=(
"*.js"
Expand All @@ -18,6 +16,7 @@ main() {
"*.toml"
"*.yaml"
"*.yml"
"*.sh"
)
prettier --write --loglevel=warn $(
git ls-files "${prettierExts[@]}" | grep -v "lib/vscode" | grep -v 'helm-chart'
Expand Down
1 change: 0 additions & 1 deletion ci/images/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH

# Install Go dependencies
ENV GO111MODULE=on
RUN go get mvdan.cc/sh/v3/cmd/shfmt
RUN go get github.com/goreleaser/nfpm/cmd/[email protected]

RUN curl -fsSL https://get.docker.com | sh
1 change: 0 additions & 1 deletion ci/images/debian10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH

# Install Go dependencies
ENV GO111MODULE=on
RUN go get mvdan.cc/sh/v3/cmd/shfmt
RUN go get github.com/goreleaser/nfpm/cmd/[email protected]

RUN VERSION="$(curl -fsSL https://storage.googleapis.com/kubernetes-release/release/stable.txt)" && \
Expand Down
20 changes: 10 additions & 10 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# Contributing

- [Pull Requests](#pull-requests)
- [Requirements](#requirements)
- [Development Workflow](#development-workflow)
- [Updating VS Code](#updating-vs-code)
- [Notes about Changes](#notes-about-changes)
- [Build](#build)
- [Structure](#structure)
- [Modifications to VS Code](#modifications-to-vs-code)
- [Currently Known Issues](#currently-known-issues)
- [Contributing](#contributing)
- [Pull Requests](#pull-requests)
- [Requirements](#requirements)
- [Development Workflow](#development-workflow)
- [Updating VS Code](#updating-vs-code)
- [Notes about Changes](#notes-about-changes)
- [Build](#build)
- [Structure](#structure)
- [Modifications to VS Code](#modifications-to-vs-code)
- [Currently Known Issues](#currently-known-issues)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand All @@ -36,7 +37,6 @@ There are several differences, however. You must:
- Use Node.js version 12.x (or greater)
- Have [yarn](https://classic.yarnpkg.com/en/) installed (which is used to install JS packages and run development scripts)
- Have [nfpm](https://github.com/goreleaser/nfpm) (which is used to build `.deb` and `.rpm` packages and [jq](https://stedolan.github.io/jq/) (used to build code-server releases) installed
- Have [shfmt](https://pkg.go.dev/mvdan.cc/sh/v3) installed to run `yarn fmt` (requires Go is installed on your system)

The [CI container](../ci/images/debian10/Dockerfile) is a useful reference for all
of the dependencies code-server uses.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"istanbul-badges-readme": "^1.2.0",
"leaked-handles": "^5.2.0",
"parcel-bundler": "^1.12.4",
"prettier": "^2.0.5",
"prettier": "^2.2.1",
"prettier-plugin-sh": "^0.6.0",
"stylelint": "^13.0.0",
"stylelint-config-recommended": "^3.0.0",
"ts-node": "^9.0.0",
Expand Down
14 changes: 13 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5202,6 +5202,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==

mvdan-sh@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/mvdan-sh/-/mvdan-sh-0.5.0.tgz#fa76f611a103595ad0f04f5d18e582892c46e87c"
integrity sha512-UWbdl4LHd2fUnaEcOUFVWRdWGLkNoV12cKVIPiirYd8qM5VkCoCTXErlDubevrkEG7kGohvjRxAlTQmOqG80tw==

nan@^2.12.1:
version "2.14.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
Expand Down Expand Up @@ -6306,7 +6311,14 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier@^2.0.5:
prettier-plugin-sh@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/prettier-plugin-sh/-/prettier-plugin-sh-0.6.0.tgz#021c22597a5a866c346095cd7f6c662a49dea249"
integrity sha512-y+SSThg/8mrGGkcAolWpociiTZlH7nlIUtqZl1dueyhngof8rD48tUHVQqvIaCx21T/0+9TyzsTEsVviPjR5og==
dependencies:
mvdan-sh "^0.5.0"

prettier@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
Expand Down