Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 26 commits intomainfrombiome
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
26 commits
Select commitHold shift + click to select a range
e7feeb5
lint with biome
aslilacAug 13, 2024
85d8d05
💅
aslilacAug 13, 2024
4b1c032
so much
aslilacAug 13, 2024
e8d7aca
spaces (for now)
aslilacAug 14, 2024
27b85cc
Merge branch 'main' into biome
aslilacAug 14, 2024
2b19afc
update makefile
aslilacAug 14, 2024
053cb48
most
aslilacAug 14, 2024
3d507dd
green????
aslilacAug 14, 2024
d27cfc4
mum
aslilacAug 14, 2024
5c0292b
format
aslilacAug 14, 2024
bb3d084
periodic refresh
aslilacAug 14, 2024
8fa3011
sort imports
aslilacAug 15, 2024
7fdb012
yay
aslilacAug 15, 2024
3ffca81
use prettier for some languages
aslilacAug 15, 2024
68a1b10
🧹
aslilacAug 15, 2024
55337e5
yay
aslilacAug 15, 2024
e272831
>:(
aslilacAug 15, 2024
612b6b2
lummukls
aslilacAug 15, 2024
52ada5b
cleanup
aslilacAug 15, 2024
8b60eee
not yet I guess
aslilacAug 15, 2024
774f258
sob
aslilacAug 15, 2024
968d413
disable import sorting on save
aslilacAug 15, 2024
fe8f85d
Merge branch 'main' into biome
aslilacAug 15, 2024
d6dd39f
:|
aslilacAug 15, 2024
78332c5
WHAT
aslilacAug 15, 2024
075c3be
gto
aslilacAug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion.editorconfig
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@ trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab

[*.{md,json,yaml,yml,tf,tfvars,nix}]
[*.{md,yaml,yml,tf,tfvars,nix}]
indent_style = space
indent_size = 2

Expand Down
18 changes: 6 additions & 12 deletions.prettierignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,19 +79,13 @@ result
# by Prettier.
helm/**/templates/*.yaml

# Terraform state files used in tests, these are automatically generated.
# Example: provisioner/terraform/testdata/instance-id/instance-id.tfstate.json
**/testdata/**/*.tf*.json

# Testdata shouldn't be formatted.
scripts/apitypings/testdata/**/*.ts
enterprise/tailnet/testdata/*.golden.html
tailnet/testdata/*.golden.html

# Generated files shouldn't be formatted.
site/e2e/provisionerGenerated.ts
testdata/

# Ignore generated files
**/pnpm-lock.yaml

# Ignore generated JSON (e.g. examples/examples.gen.json).
**/*.gen.json

# Everything in site/ is formatted by Biome. For the rest of the repo though, we
# need broader language support.
site/
18 changes: 6 additions & 12 deletions.prettierignore.include
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,19 +2,13 @@
# by Prettier.
helm/**/templates/*.yaml

# Terraform state files used in tests, these are automatically generated.
# Example: provisioner/terraform/testdata/instance-id/instance-id.tfstate.json
**/testdata/**/*.tf*.json

# Testdata shouldn't be formatted.
scripts/apitypings/testdata/**/*.ts
enterprise/tailnet/testdata/*.golden.html
tailnet/testdata/*.golden.html

# Generated files shouldn't be formatted.
site/e2e/provisionerGenerated.ts
testdata/

# Ignore generated files
**/pnpm-lock.yaml

# Ignore generated JSON (e.g. examples/examples.gen.json).
**/*.gen.json

# Everything in site/ is formatted by Biome. For the rest of the repo though, we
# need broader language support.
site/
4 changes: 2 additions & 2 deletions.vscode/extensions.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@
"zxh404.vscode-proto3",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker",
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig"
"EditorConfig.EditorConfig",
"biomejs.biome"
]
}
14 changes: 12 additions & 2 deletions.vscode/settings.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,6 @@
}
]
},
"eslint.workingDirectories": ["./site"],
"search.exclude": {
"**.pb.go": true,
"**/*.gen.json": true,
Expand DownExpand Up@@ -224,5 +223,16 @@
// with VS Code.
"typescript.tsdk": "./site/node_modules/typescript/lib",
// Playwright tests in VSCode will open a browser to live "view" the test.
"playwright.reuseBrowser": true
"playwright.reuseBrowser": true,

"[javascript][javascriptreact][json][jsonc][typescript][typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
// "editor.codeActionsOnSave": {
// "source.organizeImports.biome": "explicit"
// }
},

"[css][html][markdown][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
80 changes: 13 additions & 67 deletionsMakefile
View file
Open in desktop
Original file line numberDiff line numberDiff 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/go fmt/terraform fmt/shfmt fmt/prettier
.PHONY: fmt

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

Copy link
Member

@matifalimatifaliAug 15, 2024
edited
Loading

Choose a reason for hiding this comment

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

I used to dofmt/prettier when formatting markdown files.
Can you extract afmt/docs orfmt/md to make docs formatting easier?

Copy link
MemberAuthor

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.

matifali reacted with thumbs up emoji
fmt/eslint:
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/eslint$(RESET)"
fmt/ts:
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/ts$(RESET)"
cd site
pnpm run lint:fix
.PHONY: fmt/eslint
# Avoid writing files in CI to reduce file write activity
ifdef CI
pnpm run check --linter-enabled=false
else
pnpm run check:fix
endif
.PHONY: fmt/ts

fmt/prettier:
fmt/prettier: .prettierignore
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/prettier$(RESET)"
cd site
# Avoid writing files in CI to reduce file write activity
ifdef CI
pnpm run format:check
Expand DownExpand Up@@ -442,7 +446,7 @@ lint/site-icons:

lint/ts:
cd site
pnpmi && pnpmlint
pnpm lint
.PHONY: lint/ts

lint/go:
Expand DownExpand Up@@ -495,9 +499,6 @@ gen: \
.prettierignore.include \
.prettierignore \
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 DownExpand Up@@ -526,9 +527,6 @@ gen/mark-fresh:
coderd/apidoc/swagger.json \
.prettierignore.include \
.prettierignore \
site/.prettierrc.yaml \
site/.prettierignore \
site/.eslintignore \
site/e2e/provisionerGenerated.ts \
site/src/theme/icons.json \
examples/examples.gen.json \
Expand DownExpand Up@@ -603,7 +601,6 @@ provisionerd/proto/provisionerd.pb.go: provisionerd/proto/provisionerd.proto
site/src/api/typesGenerated.ts: $(wildcard scripts/apitypings/*) $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go')
go run ./scripts/apitypings/ > $@
./scripts/pnpm_install.sh
pnpm exec prettier --write "$@"

site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go
cd site
Expand All@@ -613,7 +610,7 @@ site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisio
site/src/theme/icons.json: $(wildcard scripts/gensite/*) $(wildcard site/static/icon/*)
go run ./scripts/gensite/ -icons "$@"
./scripts/pnpm_install.sh
pnpm execprettier--write"$@"
pnpm-C site/execbiome format--writesrc/theme/icons.json

examples/examples.gen.json: scripts/examplegen/main.go examples/examples.go $(shell find ./examples/templates)
go run ./scripts/examplegen/main.go > examples/examples.gen.json
Expand DownExpand Up@@ -702,23 +699,6 @@ scripts/ci-report/testdata/.gen-golden: $(wildcard scripts/ci-report/testdata/*)
go test ./scripts/ci-report -run=TestOutputMatchesGoldenFile -update
touch "$@"

# Generate a prettierrc for the site package that uses relative paths for
# overrides. This allows us to share the same prettier config between the
# site and the root of the repo.
site/.prettierrc.yaml: .prettierrc.yaml
. ./scripts/lib.sh
dependencies yq

echo "# Code generated by Makefile (../$<). DO NOT EDIT." > "$@"
echo "" >> "$@"

# Replace all listed override files with relative paths inside site/.
# - ./ -> ../
# - ./site -> ./
yq \
'.overrides[].files |= map(. | sub("^./"; "") | sub("^"; "../") | sub("../site/"; "./") | sub("../!"; "!../"))' \
"$<" >> "$@"

# Combine .gitignore with .prettierignore.include to generate .prettierignore.
.prettierignore: .gitignore .prettierignore.include
echo "# Code generated by Makefile ($^). DO NOT EDIT." > "$@"
Expand All@@ -728,40 +708,6 @@ site/.prettierrc.yaml: .prettierrc.yaml
cat "$$f" >> "$@"
done

# Generate ignore files based on gitignore into the site directory. We turn all
# rules into relative paths for the `site/` directory (where applicable),
# following the pattern format defined by git:
# https://git-scm.com/docs/gitignore#_pattern_format
#
# This is done for compatibility reasons, see:
# 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
rm -f "$@"
touch "$@"
# Skip generated by header, inherit `.prettierignore` header as-is.
while read -r rule; do
# Remove leading ! if present to simplify rule, added back at the end.
tmp="$${rule#!}"
ignore="$${rule%"$$tmp"}"
rule="$$tmp"
case "$$rule" in
# Comments or empty lines (include).
\#*|'') ;;
# Generic rules (include).
\*\**) ;;
# Site prefixed rules (include).
site/*) rule="$${rule#site/}";;
./site/*) rule="$${rule#./site/}";;
# Rules that are non-generic and don't start with site (rewrite).
/*) rule=.."$$rule";;
*/?*) rule=../"$$rule";;
*) ;;
esac
echo "$${ignore}$${rule}" >> "$@"
done < "$<"

test:
$(GIT_FLAGS) gotestsum --format standard-quiet -- -v -short -count=1 ./...
.PHONY: test
Expand Down
3 changes: 1 addition & 2 deletionsofflinedocs/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,6 @@
"@chakra-ui/react": "2.8.2",
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.5",
"@types/lodash": "4.14.196",
"archiver": "6.0.2",
"framer-motion": "^10.17.6",
"front-matter": "4.0.2",
Expand All@@ -36,7 +35,7 @@
"@types/react-dom": "18.3.0",
"eslint": "8.56.0",
"eslint-config-next": "14.0.1",
"prettier": "3.1.0",
"prettier": "3.3.3",
"typescript": "5.3.2"
},
"engines": {
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp