Skip to content

Commit 2490904

Browse files
committed
chore: introduce code formatter and style
1 parent 23b635c commit 2490904

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+15786
-709
lines changed

.circleci/config.yml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,44 @@ jobs:
767767
name: Notify Slack on failure
768768
when: on_fail
769769
working_directory: ~/kubernetes-monitor
770+
lint:
771+
machine:
772+
docker_layer_caching: true
773+
enabled: true
774+
image: ubuntu-2004:202010-01
775+
steps:
776+
- checkout
777+
- setup_node12
778+
- install_python_requests
779+
- run:
780+
command: |
781+
npm run lint
782+
name: lint
783+
- run:
784+
command: |
785+
./scripts/slack/notify_failure_on_branch.py "${CIRCLE_BRANCH}" "${CIRCLE_JOB}" "${CIRCLE_BUILD_URL}" "${CIRCLE_PULL_REQUEST}" "${SLACK_WEBHOOK}"
786+
name: Notify Slack on failure
787+
when: on_fail
788+
working_directory: ~/kubernetes-monitor
789+
code_formatter:
790+
machine:
791+
docker_layer_caching: true
792+
enabled: true
793+
image: ubuntu-2004:202010-01
794+
steps:
795+
- checkout
796+
- setup_node12
797+
- install_python_requests
798+
- run:
799+
command: |
800+
npm run format:check
801+
name: code formatter check
802+
- run:
803+
command: |
804+
./scripts/slack/notify_failure_on_branch.py "${CIRCLE_BRANCH}" "${CIRCLE_JOB}" "${CIRCLE_BUILD_URL}" "${CIRCLE_PULL_REQUEST}" "${SLACK_WEBHOOK}"
805+
name: Notify Slack on failure
806+
when: on_fail
807+
working_directory: ~/kubernetes-monitor
770808
unit_tests:
771809
machine:
772810
docker_layer_caching: true
@@ -778,7 +816,6 @@ jobs:
778816
- install_python_requests
779817
- run:
780818
command: |
781-
npm run lint &&
782819
npm run build &&
783820
npm run test:unit:tap &&
784821
npm run test:unit:jest
@@ -985,6 +1022,18 @@ workflows:
9851022
ignore:
9861023
- staging
9871024
- master
1025+
- lint:
1026+
filters:
1027+
branches:
1028+
ignore:
1029+
- staging
1030+
- master
1031+
- code_formatter:
1032+
filters:
1033+
branches:
1034+
ignore:
1035+
- staging
1036+
- master
9881037
- unit_tests:
9891038
filters:
9901039
branches:

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"arrowParens": "always",
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"htmlWhitespaceSensitivity": "ignore"
6+
}

0 commit comments

Comments
 (0)