-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from hashar/ui-refresh
Modernize the UI design to match Jenkins core and catch up with nowadays browsers capabilities (<details> element, position:sticky).
- Loading branch information
Showing
8 changed files
with
1,308 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import fs from "node:fs"; | ||
import path from "node:path"; | ||
import process from "node:process"; | ||
|
||
import stylelintToCheckstyle from "stylelint-checkstyle-reporter"; | ||
import stylelint from "stylelint"; | ||
|
||
export default { | ||
extends: "stylelint-config-standard", | ||
rules: { | ||
// Copied from Jenkins 2.440.3 war/.stylelintrc.js | ||
"no-descending-specificity": null, | ||
"selector-class-pattern": "[a-z]", | ||
"selector-id-pattern": "[a-z]", | ||
"custom-property-pattern": "[a-z]", | ||
"value-keyword-case": [ | ||
"lower", | ||
{ | ||
camelCaseSvgKeywords: true, | ||
}, | ||
], | ||
"property-no-vendor-prefix": null, | ||
"at-rule-no-unknown": [ | ||
true, | ||
{ | ||
ignoreAtRules: [ | ||
"function", | ||
"if", | ||
"each", | ||
"include", | ||
"mixin", | ||
"for", | ||
"use", | ||
], | ||
}, | ||
], | ||
"color-function-notation": "legacy", | ||
"alpha-value-notation": "number", | ||
"number-max-precision": 5, | ||
"function-no-unknown": null, | ||
"no-duplicate-selectors": null, | ||
"hue-degree-notation": "number", | ||
}, | ||
formatter: (...params) => { | ||
// Emit report to console for interactive usage | ||
stylelint.formatters.string.then( | ||
stringFormatter => console.log(stringFormatter(...params)), | ||
); | ||
|
||
// And a CheckStyle report for CI | ||
// See https://github.com/jenkins-infra/pipeline-library/ | ||
const outputFile = "target/stylelint/checkstyle-result.xml"; | ||
fs.mkdirSync(path.dirname(outputFile), { recursive: true }); | ||
fs.writeFileSync( | ||
outputFile, | ||
stylelintToCheckstyle(...params), | ||
); | ||
process.stderr.write(`Wrote checkstyle report: ${outputFile}\n`); | ||
}, | ||
}; |
Oops, something went wrong.