trying eslint for linting the little JS code

This commit is contained in:
Marvin Preuss 2021-08-23 10:51:17 +02:00
parent 7b092aa8c4
commit 822af715a3
5 changed files with 21 additions and 2 deletions

View File

@ -14,7 +14,8 @@ steps:
image: golangci/golangci-lint:v1.42.0
commands:
- make install-tools
- make lint
- make lint-go
- make lint-buf
depends_on:
- tags

6
.eslintrc.json Normal file
View File

@ -0,0 +1,6 @@
{
"env": {
"browser": true
},
"extends": ["eslint:recommended", "prettier"]
}

1
.prettierrc.json Normal file
View File

@ -0,0 +1 @@
{}

View File

@ -11,10 +11,20 @@ generate:
go generate
.PHONY: lint
lint:
lint: lint-go lint-buf lint-js
.PHONY: lint-go
lint-go:
golangci-lint run --timeout 10m --enable-all --disable=exhaustivestruct
.PHONY: lint-buf
lint-buf:
buf lint -v
.PHONY: lint-js
lint-js:
eslint assets/web/files/**.js
.PHONY: test
test:
go test -v -race -cover ./...

View File

@ -11,3 +11,4 @@ lint:
- RPC_REQUEST_STANDARD_NAME
- RPC_RESPONSE_STANDARD_NAME
- RPC_REQUEST_RESPONSE_UNIQUE
- PACKAGE_VERSION_SUFFIX