Skip to content

Commit bf18991

Browse files
committed
[code-infra] Refactor circle config to be reusable
1 parent d24c188 commit bf18991

File tree

1 file changed

+27
-19
lines changed

1 file changed

+27
-19
lines changed

.circleci/config.yml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ parameters:
1414
type: string
1515
default: pipeline
1616

17+
1718
default-job: &default-job
1819
parameters:
1920
react-version:
@@ -89,6 +90,21 @@ commands:
8990
else
9091
pnpm install
9192
fi
93+
linting:
94+
description: "Runs linters"
95+
steps:
96+
- run:
97+
name: ESLint
98+
command: pnpm eslint:ci
99+
- run:
100+
name: Stylelint
101+
command: pnpm stylelint
102+
- run:
103+
name: Lint Markdown
104+
command: pnpm markdownlint
105+
- run:
106+
name: Lint writing style
107+
command: pnpm valelint
92108

93109
jobs:
94110
test_unit:
@@ -117,25 +133,7 @@ jobs:
117133
steps:
118134
- checkout
119135
- install_js
120-
- run:
121-
name: '`pnpm prettier` changes committed?'
122-
command: |
123-
# #target-branch-reference
124-
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
125-
then
126-
pnpm prettier --check
127-
else
128-
pnpm exec prettier --check . --ignore-path .lintignore
129-
fi
130-
- run:
131-
name: ESLint
132-
command: pnpm eslint:ci
133-
- run:
134-
name: Stylelint
135-
command: pnpm stylelint
136-
- run:
137-
name: Lint Markdown
138-
command: pnpm markdownlint
136+
- linting
139137
test_static:
140138
<<: *default-job
141139
steps:
@@ -151,6 +149,16 @@ jobs:
151149
else
152150
pnpm dedupe --check
153151
fi
152+
- run:
153+
name: '`pnpm prettier` changes committed?'
154+
command: |
155+
# #target-branch-reference
156+
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
157+
then
158+
pnpm prettier --check
159+
else
160+
pnpm exec prettier --check . --ignore-path .lintignore
161+
fi
154162
- run:
155163
name: Generate the documentation
156164
command: pnpm docs:api

0 commit comments

Comments
 (0)