Skip to content

Commit

Permalink
Merge pull request #35 from hashar/ui-refresh
Browse files Browse the repository at this point in the history
Modernize the UI design to match Jenkins core and catch up with nowadays
browsers capabilities (<details> element, position:sticky).
  • Loading branch information
hashar authored Nov 7, 2024
2 parents c629a4f + a507370 commit c0b2fe1
Show file tree
Hide file tree
Showing 8 changed files with 1,308 additions and 148 deletions.
60 changes: 60 additions & 0 deletions .stylelintrc.js
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`);
},
};
Loading

0 comments on commit c0b2fe1

Please sign in to comment.