diff --git a/.github/workflows/typescript_lint.yml b/.github/workflows/typescript_lint.yml new file mode 100644 index 000000000..c7a26dca1 --- /dev/null +++ b/.github/workflows/typescript_lint.yml @@ -0,0 +1,51 @@ +name: Typescript Lint, Format and Type check workflow + +on: + pull_request: + paths: + - "website/**" + +jobs: + linting_and_type-checking: + name: Typescript Linting, Formatting and Type checking + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: yarn install --frozen-lockfile + working-directory: website + + - name: Linting and Formatting checks + run: yarn run lint + working-directory: website + + - name: Type checking + run: yarn run typecheck + + build: + name: Build check + runs-on: ubuntu-latest + needs: linting_and_type-checking + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Build + run: yarn run build \ No newline at end of file diff --git a/website/components.json b/website/components.json index a6fa9968b..14e747050 100644 --- a/website/components.json +++ b/website/components.json @@ -13,4 +13,4 @@ "components": "@/components", "utils": "@/library/utils" } -} \ No newline at end of file +} diff --git a/website/index.html b/website/index.html index 125b66439..810afa259 100644 --- a/website/index.html +++ b/website/index.html @@ -1,4 +1,4 @@ - + diff --git a/website/package.json b/website/package.json index 6cb8de07d..95d42d258 100644 --- a/website/package.json +++ b/website/package.json @@ -8,7 +8,11 @@ "start": "serve -s dist", "build": "vite --mode prod build", "lint": "eslint src --ext js,ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "preview": "vite preview", + "lint:fix": "eslint . --ext .tsx --ext .ts --fix --max-warnings 0", + "typecheck": "tsc --pretty --noEmit", + "format:fix": "prettier --write \"**/*.{ts,tsx,json,css}\"", + "format:check": "prettier --check \"**/*.{ts,tsx,css}\"" }, "dependencies": { "@nivo/core": "^0.83.0", diff --git a/website/postcss.config.js b/website/postcss.config.js index 2e7af2b7f..2aa7205d4 100644 --- a/website/postcss.config.js +++ b/website/postcss.config.js @@ -3,4 +3,4 @@ export default { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/website/src/assets/styles/index.css b/website/src/assets/styles/index.css index 6c79bb901..0faa44ad3 100644 --- a/website/src/assets/styles/index.css +++ b/website/src/assets/styles/index.css @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -@import url('./tailwind.css'); -@import url('./directives.css'); +@import url("./tailwind.css"); +@import url("./directives.css"); /* Raleway font */ @import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,1;0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;0,1000;1,1;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900;1,1000&display=swap"); diff --git a/website/src/assets/styles/tailwind.css b/website/src/assets/styles/tailwind.css index ba5e92f89..be1e06f8b 100644 --- a/website/src/assets/styles/tailwind.css +++ b/website/src/assets/styles/tailwind.css @@ -18,7 +18,6 @@ limitations under the License. @tailwind components; @tailwind utilities; - @layer base { :root { --background: 0 0% 100%; @@ -47,13 +46,13 @@ limitations under the License. --warning: 38 92% 50%; --warning-foreground: 48 96% 89%; - + --success: 120, 100%, 25%; --success-foreground: 60 9.1% 97.8%; --progress: 240, 83%, 58%; --progress-foreground: 60 9.1% 97.8%; - + --border: 20 5.9% 90%; --input: 20 5.9% 90%; --ring: 24.6 95% 53.1%; @@ -105,7 +104,7 @@ limitations under the License. --warning: 38 92% 50%; --warning-foreground: 48 96% 89%; - + --border: 12 6.5% 15.1%; --input: 12 6.5% 15.1%; --ring: 20.5 90.2% 48.2%; @@ -131,7 +130,6 @@ limitations under the License. } } - @layer base { /* setting default background, text color and font */ html { @@ -165,7 +163,6 @@ limitations under the License. } @keyframes translateUpDown { - 0%, 100% { transform: translateY(0); @@ -174,4 +171,4 @@ limitations under the License. 50% { transform: translateY(-0.7cm); } -} \ No newline at end of file +} diff --git a/website/src/common/CommandMenu.tsx b/website/src/common/CommandMenu.tsx index 0b16e7f80..0f64ba479 100644 --- a/website/src/common/CommandMenu.tsx +++ b/website/src/common/CommandMenu.tsx @@ -64,7 +64,7 @@ export function CommandMenu() {