diff --git a/.drone.yml b/.drone.yml index 698af01..60ce01a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..e3d3d9f --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "env": { + "browser": true + }, + "extends": ["eslint:recommended", "prettier"] +} diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/Makefile b/Makefile index dc94278..db2f6c9 100644 --- a/Makefile +++ b/Makefile @@ -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 ./... diff --git a/buf.yaml b/buf.yaml index 6deca34..6523026 100644 --- a/buf.yaml +++ b/buf.yaml @@ -11,3 +11,4 @@ lint: - RPC_REQUEST_STANDARD_NAME - RPC_RESPONSE_STANDARD_NAME - RPC_REQUEST_RESPONSE_UNIQUE + - PACKAGE_VERSION_SUFFIX