From dfc23bc16a6be22b30d15ab98e8857e18bd0d634 Mon Sep 17 00:00:00 2001 From: c-bata Date: Tue, 27 Oct 2020 22:15:05 +0900 Subject: [PATCH 1/2] Run prettier on Action --- .github/workflows/typescript-lints.yml | 23 +++++++++++++++++++++++ package.json | 1 + 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/typescript-lints.yml diff --git a/.github/workflows/typescript-lints.yml b/.github/workflows/typescript-lints.yml new file mode 100644 index 00000000..22b5c8ca --- /dev/null +++ b/.github/workflows/typescript-lints.yml @@ -0,0 +1,23 @@ +name: typescript-lints +on: + pull_request: + paths: + - '.github/workflows/typescript-lints.yml' + - '**.ts' + - '**.tsx' +jobs: + lint: + name: Lint checking on Ubuntu + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@master + + - name: Set up Node v14 + uses: actions/setup-node@v2-beta + with: + node-version: '14' + - run: | + npm install + npm run lint diff --git a/package.json b/package.json index 11047793..da668075 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "main": "index.js", "scripts": { "fmt": "prettier --write \"optuna_dashboard/static/**/*.{ts,tsx}\"", + "lint": "prettier --list-different \"optuna_dashboard/static/**/*.{ts,tsx}\"", "watch": "webpack --watch", "build": "webpack", "build:dev": "NODE_ENV=development webpack", From 364a1f315670a5df206387f70bc9a42175cc2a5d Mon Sep 17 00:00:00 2001 From: c-bata Date: Tue, 27 Oct 2020 22:22:29 +0900 Subject: [PATCH 2/2] Fix unformatted file --- optuna_dashboard/static/components/DataGrid.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/optuna_dashboard/static/components/DataGrid.tsx b/optuna_dashboard/static/components/DataGrid.tsx index 458a9d19..94828f6a 100644 --- a/optuna_dashboard/static/components/DataGrid.tsx +++ b/optuna_dashboard/static/components/DataGrid.tsx @@ -177,7 +177,11 @@ function DataGrid(props: { {column.filterable ? ( { clearFilter(column.field)