enable eslint comma-dangle

This commit is contained in:
Peter Fajdiga
2025-09-07 14:38:47 +02:00
parent 056149440d
commit dbb95e0470
7 changed files with 10 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ export default tseslint.config(
rules: {
"@typescript-eslint/no-empty-function": "off",
"semi": "error",
"comma-dangle": ["error", "always-multiline"],
"indent": ["error", 4],
},
}

View File

@@ -15,9 +15,9 @@ function printCols(...columns: (string[] | string)[]) {
}
let nRows = Math.min(...columns.filter(
(column: string[] | string) => column instanceof Array
(column: string[] | string) => column instanceof Array,
).map(
(column: string[] | string) => column.length
(column: string[] | string) => column.length,
));
if (nRows === Infinity) {
// we only have single string columns
@@ -28,12 +28,12 @@ function printCols(...columns: (string[] | string)[]) {
(column: string[] | string) => {
if (column instanceof Array) {
return Math.max(...column.map(
(cell: string) => cell.length
(cell: string) => cell.length,
));
} else {
return column.length;
}
}
},
);
function getCell(col: number, row: number) {

View File

@@ -188,5 +188,5 @@ const configDef = [
name: "windowRules",
type: "String",
default: defaultWindowRules,
}
},
];

View File

@@ -52,7 +52,7 @@ class WindowRuleEnforcer {
const ruleCaption = WindowRuleEnforcer.parseRegex(windowRule.caption);
const ruleString = ClientMatcher.getRuleString(
WindowRuleEnforcer.wrapParens(ruleClass),
WindowRuleEnforcer.wrapParens(ruleCaption)
WindowRuleEnforcer.wrapParens(ruleCaption),
);
(windowRule.tile ? tileRegexes : floatRegexes).push(ruleString);

View File

@@ -20,6 +20,6 @@ function initQmlTimer() {
return Qt.createQmlObject(
`import QtQuick 6.0
Timer {}`,
qmlBase
qmlBase,
) as QmlTimer;
}

View File

@@ -68,7 +68,7 @@ class MockKwinClient {
horizontally ? MaximizedMode.Maximized : MaximizedMode.Vertically
) : (
horizontally ? MaximizedMode.Horizontally : MaximizedMode.Unmaximized
)
),
);
this.frameGeometry = new MockQmlRect(

View File

@@ -4,7 +4,7 @@ class MockWorkspace {
public activities = ["test-activity"];
public desktops: KwinDesktop[] = [
{ __brand: "KwinDesktop", id: "desktop1" },
{ __brand: "KwinDesktop", id: "desktop2" }
{ __brand: "KwinDesktop", id: "desktop2" },
];
public currentDesktop = this.desktops[0];
public currentActivity = this.activities[0];