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",