-
Notifications
You must be signed in to change notification settings - Fork 198
Configure eslint for warnings-ng to report on CI #935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
a577798
72392fd
6dfae9c
972f591
d6f1363
81f1e6b
5851831
ecfb541
7394379
6d00f1b
46a0a3d
b971b8e
23593fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .yarn/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,8 +10,9 @@ | |
| "prod": "webpack --config webpack.prod.js", | ||
| "start": "yarn dev --watch", | ||
| "lint:js": "eslint src/main/js --ext js", | ||
| "lint:js-ci": "eslint src/main/js -f checkstyle -o target/eslint-warnings.xml --ext js", | ||
| "mvnbuild": "yarn prod", | ||
| "mvntest": "yarn lint:js" | ||
| "mvntest": "if-env CI=true && yarn lint:js-ci || yarn lint:js" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
|
|
@@ -22,6 +23,7 @@ | |
| "@babel/cli": "^7.27.0", | ||
| "@babel/core": "^7.26.10", | ||
| "@babel/preset-env": "^7.26.9", | ||
| "@delucis/if-env": "^1.1.2", | ||
| "autoprefixer": "^10.4.21", | ||
| "babel-loader": "^10.0.0", | ||
| "clean-webpack-plugin": "^4.0.0", | ||
|
|
@@ -48,5 +50,6 @@ | |
| "browserslist": [ | ||
| "defaults", | ||
| "not IE 11" | ||
| ] | ||
| ], | ||
| "packageManager": "[email protected]" | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -44,6 +44,10 @@ | |||||||||
| <no-test-jar>false</no-test-jar> | ||||||||||
| <node.version>18.20.0</node.version> | ||||||||||
| <yarn.version>1.22.19</yarn.version> | ||||||||||
|
|
||||||||||
| <!-- Opt in to Jenkins handling eslint results --> | ||||||||||
| <maven.test.failure.ignore>false</maven.test.failure.ignore> | ||||||||||
jglick marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| <testFailureIgnore>${maven.test.failure.ignore}</testFailureIgnore> | ||||||||||
|
||||||||||
| <maven.test.failure.ignore>false</maven.test.failure.ignore> | |
| <testFailureIgnore>${maven.test.failure.ignore}</testFailureIgnore> | |
| <maven.test.failure.ignore>false</maven.test.failure.ignore> | |
| <frontend.testFailureIgnore>${maven.test.failure.ignore}</frontend.testFailureIgnore> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think prefixing it would be prudent. As written it looks like it is a magic property name interpreted by some unknown mojo. But https://github.com/eirslett/frontend-maven-plugin?tab=readme-ov-file#ignoring-failure seems to imply that regular maven.test.failure.ignore is honored? https://github.com/eirslett/frontend-maven-plugin/blob/4a501a10677716a0e6676b603e3b93bc6bf319f1/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java#L33-L40 so why do we even need to configure the plugin specially for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this still does not make sense to me and the link did not clear it up. There should be a /build/plugins/plugin section for frontend-maven-plugin with configuration rather than using a magic property name which does not even mention frontend.
Current trunk prefixes it https://github.com/jenkinsci/plugin-pom/blob/c4f78bcc60b0fe92a86f9d971de2b5e05caa513b/README.md?plain=1#L197 https://github.com/jenkinsci/plugin-pom/blob/c4f78bcc60b0fe92a86f9d971de2b5e05caa513b/pom.xml#L170 https://github.com/jenkinsci/plugin-pom/blob/c4f78bcc60b0fe92a86f9d971de2b5e05caa513b/pom.xml#L1232
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC it was to make it opt-in and to allow us to control it in the plugin-pom at a later date to change the default i.e. remove the configuration.
It was opt-in because if a plugin picked up the change and hadn't configured it then lint issues would silently fail and not be reported, worse than the status quo.
Uh oh!
There was an error while loading. Please reload this page.