Skip to content

Commit

Permalink
Add prettier support
Browse files Browse the repository at this point in the history
+ CI to check formatting, and fix the couple of instances that
were not in prettier format (case in HTML clour codes).
  • Loading branch information
dbkr committed May 3, 2022
1 parent ae13814 commit b3e88d3
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/prettier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Prettier
on:
pull_request: {}
jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Yarn cache
uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Install dependencies
run: "yarn install"
- name: Check code style
run: "yarn run prettier:check"
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"build": "vite build",
"serve": "vite preview",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
"build-storybook": "build-storybook",
"prettier:check": "prettier -c src",
"prettier:format": "prettier -w src"
},
"dependencies": {
"@juggle/resize-observer": "^3.3.1",
Expand Down Expand Up @@ -50,6 +52,7 @@
"@babel/core": "^7.16.5",
"@storybook/react": "^6.5.0-alpha.5",
"babel-loader": "^8.2.3",
"prettier": "^2.6.2",
"sass": "^1.42.1",
"storybook-builder-vite": "^0.1.12",
"vite": "^2.4.2",
Expand Down
1 change: 0 additions & 1 deletion src/video-grid/VideoGrid.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
flex: 1;
touch-action: none;
}

6 changes: 3 additions & 3 deletions src/video-grid/VideoTile.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@
.videoMutedOverlay {
width: 100%;
height: 100%;
background-color: #21262C;
background-color: #21262c;
}

.presenterLabel {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
background-color: #17191C;
background-color: #17191c;
border-radius: 4px;
display: flex;
justify-content: center;
Expand All @@ -110,4 +110,4 @@
width: 25%;
max-width: 360px;
border-radius: 20px;
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9427,6 +9427,11 @@ prettier@<=2.3.0, "prettier@>=2.2.1 <=2.3.0":
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18"
integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==

prettier@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032"
integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==

pretty-error@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.2.tgz#be89f82d81b1c86ec8fdfbc385045882727f93b6"
Expand Down

0 comments on commit b3e88d3

Please sign in to comment.