mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
feat(ci): fail CI if there are non-typescript UI compoments
This commit is contained in:
committed by
Łukasz Mierzwa
parent
4a16661558
commit
3b68860f38
@@ -86,6 +86,11 @@ jobs:
|
||||
after_success:
|
||||
- travis_retry curl -s --connect-timeout 30 --fail https://codecov.io/bash | bash -s -- -F ui
|
||||
|
||||
- stage: Lint
|
||||
name: Check for non-typescript UI components
|
||||
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
|
||||
script: make -C ui lint-typescript
|
||||
|
||||
- stage: Lint
|
||||
name: Lint git commit
|
||||
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
|
||||
|
||||
@@ -41,6 +41,11 @@ lint-docs: node_modules/markdownlint-cli/markdownlint.js
|
||||
lint-deps: node_modules/depcheck/bin/depcheck.js
|
||||
node_modules/depcheck/bin/depcheck.js $(CURDIR)
|
||||
|
||||
.PHONY: lint-typescript
|
||||
lint-typescript:
|
||||
@$(eval JSFILES := $(shell find $(CURDIR)/src/Components -name \*.js -not -name \*.test.js -not -name \*.stories.js))
|
||||
@if [ "$(JSFILES)" != "" ]; then echo "$(JSFILES)" | tr " " "\n"; exit 1 ; fi
|
||||
|
||||
.PHONY: format
|
||||
format: node_modules/prettier/bin-prettier.js
|
||||
node_modules/prettier/bin-prettier.js --write 'src/**/*.js' 'src/**/*.ts' 'src/**/*.tsx'
|
||||
|
||||
Reference in New Issue
Block a user