Merge pull request #7 from c-bata/gh-action-prettier-lint

Run prettier on Action
This commit is contained in:
Masashi SHIBATA
2020-10-27 22:23:44 +09:00
committed by GitHub
3 changed files with 29 additions and 1 deletions
+23
View File
@@ -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
@@ -177,7 +177,11 @@ function DataGrid<T>(props: {
{column.filterable ? (
<IconButton
size={dense ? "small" : "medium"}
style={fieldAlreadyFiltered(column.field) ? {} : { visibility: "hidden"}}
style={
fieldAlreadyFiltered(column.field)
? {}
: { visibility: "hidden" }
}
color="inherit"
onClick={(e) => {
clearFilter(column.field)
+1
View File
@@ -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",