Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

update format script #288

Merged
merged 3 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
node-version: 12
- run: yarn --frozen-lockfile
- run: yarn run lint
- run: yarn format --check
- run: yarn format_check
- run: CI=true yarn test
- name: Publish Production
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'denoland/deno_website2'
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"format": "prettier --write '**/*.md' '{worker,src}/**/*.{js,ts,jsx,tsx}' 'public/**/*.html'",
"format": "yarn format_check --write",
"format_check": "prettier --check **/*.md {worker,src}/**/*.{js,ts,jsx,tsx} public/**/*.html",
"lint": "eslint --ext .js,.jsx,.ts,.tsx src/ worker/"
},
"devDependencies": {
Expand Down
7 changes: 4 additions & 3 deletions src/database.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ test("database names should be sorted alphabetically", () => {
});

test("a database path (if any) should ends with a trailing slash", () => {
const invalidEntries = Object.entries(DATABASE)
.filter(([_, value]) => "path" in value && !value.path.endsWith("/"));
const invalidEntries = Object.entries(DATABASE).filter(
([_, value]) => "path" in value && !value.path.endsWith("/")
);
expect(invalidEntries).toEqual([]);
})
});