Skip to content

Commit 56b7c1d

Browse files
authored
Fail CI build on prettier errors (jenkinsci#10101)
1 parent 65ab501 commit 56b7c1d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"build": "yarn prod",
1616
"start": "yarn dev --watch",
1717
"lint:js": "eslint . && prettier --check .",
18-
"lint:js-ci": "eslint . -f checkstyle -o target/eslint-warnings.xml && prettier --check .",
18+
"lint:js-ci": "eslint . -f checkstyle -o target/eslint-warnings.xml",
1919
"lint:css": "stylelint src/main/scss",
2020
"lint:css-ci": "stylelint src/main/scss --custom-formatter stylelint-checkstyle-reporter -o target/stylelint-warnings.xml",
2121
"lint:ci": "yarn lint:js-ci && yarn lint:css-ci",

pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,18 @@ THE SOFTWARE.
519519
<skip>${yarn.lint.skip}</skip>
520520
</configuration>
521521
</execution>
522+
<execution>
523+
<id>prettier</id>
524+
<goals>
525+
<goal>corepack</goal>
526+
</goals>
527+
<phase>test</phase>
528+
<configuration>
529+
<arguments>yarn exec prettier --check .</arguments>
530+
<skip>${yarn.lint.skip}</skip>
531+
<testFailureIgnore>false</testFailureIgnore>
532+
</configuration>
533+
</execution>
522534
</executions>
523535
</plugin>
524536
</plugins>

0 commit comments

Comments
 (0)