diff --git a/.github/workflows/prettier.yaml b/.github/workflows/prettier.yaml new file mode 100644 index 0000000..512beec --- /dev/null +++ b/.github/workflows/prettier.yaml @@ -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" diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..f06235c --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +node_modules +dist diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/package.json b/package.json index 9471442..b7fd1e7 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/src/video-grid/VideoGrid.module.css b/src/video-grid/VideoGrid.module.css index 4842024..9fbe074 100644 --- a/src/video-grid/VideoGrid.module.css +++ b/src/video-grid/VideoGrid.module.css @@ -4,4 +4,3 @@ flex: 1; touch-action: none; } - diff --git a/src/video-grid/VideoTile.module.css b/src/video-grid/VideoTile.module.css index 419d56d..f5e2d11 100644 --- a/src/video-grid/VideoTile.module.css +++ b/src/video-grid/VideoTile.module.css @@ -85,7 +85,7 @@ .videoMutedOverlay { width: 100%; height: 100%; - background-color: #21262C; + background-color: #21262c; } .presenterLabel { @@ -93,7 +93,7 @@ top: 20px; left: 50%; transform: translateX(-50%); - background-color: #17191C; + background-color: #17191c; border-radius: 4px; display: flex; justify-content: center; @@ -110,4 +110,4 @@ width: 25%; max-width: 360px; border-radius: 20px; -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 4c92108..98525fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"