Skip to content

chore: replace eslint with biome #14263

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 26 commits into from
Aug 15, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update makefile
  • Loading branch information
aslilac committed Aug 14, 2024
commit 2b19afc4eeb187fcf86fcac4b729f3037bac126b
20 changes: 7 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ BOLD := $(shell tput bold 2>/dev/null)
GREEN := $(shell tput setaf 2 2>/dev/null)
RESET := $(shell tput sgr0 2>/dev/null)

fmt: fmt/eslint fmt/prettier fmt/terraform fmt/shfmt fmt/go
fmt: fmt/ts fmt/terraform fmt/shfmt fmt/go
.PHONY: fmt

fmt/go:
Expand All @@ -401,22 +401,18 @@ fmt/go:
go run mvdan.cc/gofumpt@v0.4.0 -w -l .
.PHONY: fmt/go

Copy link
Member

@matifali matifali Aug 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used to do fmt/prettier when formatting markdown files.
Can you extract a fmt/docs or fmt/md to make docs formatting easier?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we still need prettier for basically everything it was doing before outside of site/, so I'll just put that job back.

fmt/eslint:
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/eslint$(RESET)"
cd site
pnpm run lint:fix
.PHONY: fmt/eslint

fmt/prettier:
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/prettier$(RESET)"
fmt/ts:
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/ts$(RESET)"
cd site
# Avoid writing files in CI to reduce file write activity
ifdef CI
pnpm run lint
pnpm run format:check
else
pnpm run lint:fix
pnpm run format
endif
.PHONY: fmt/prettier
.PHONY: fmt/ts

fmt/terraform: $(wildcard *.tf)
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/terraform$(RESET)"
Expand Down Expand Up @@ -497,7 +493,6 @@ gen: \
provisioner/terraform/testdata/version \
site/.prettierrc.yaml \
site/.prettierignore \
site/.eslintignore \
site/e2e/provisionerGenerated.ts \
site/src/theme/icons.json \
examples/examples.gen.json \
Expand Down Expand Up @@ -528,7 +523,6 @@ gen/mark-fresh:
.prettierignore \
site/.prettierrc.yaml \
site/.prettierignore \
site/.eslintignore \
site/e2e/provisionerGenerated.ts \
site/src/theme/icons.json \
examples/examples.gen.json \
Expand Down Expand Up @@ -737,7 +731,7 @@ site/.prettierrc.yaml: .prettierrc.yaml
# https://github.com/prettier/prettier/issues/8048
# https://github.com/prettier/prettier/issues/8506
# https://github.com/prettier/prettier/issues/8679
site/.eslintignore site/.prettierignore: .prettierignore Makefile
site/.prettierignore: .prettierignore Makefile
rm -f "$@"
touch "$@"
# Skip generated by header, inherit `.prettierignore` header as-is.
Expand Down
Loading