Skip to content

Commit 0b485d6

Browse files
committed
autoformat.
1 parent 3b0cdbc commit 0b485d6

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/core/basepattern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class BasePattern {
110110
dom: this.el,
111111
action: action,
112112
...options,
113-
}
113+
};
114114
this.el.dispatchEvent(events.update_event(options));
115115
}
116116

src/core/registry.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,16 @@ const registry = {
178178
// - Remove whitespace,
179179
// - Remove trailing commas,
180180
// - Join to selecto string.
181-
const selector_string = selectors.map(
182-
(selector) => selector.trim().replace(/,$/, "")
183-
).join(",");
181+
const selector_string = selectors
182+
.map((selector) => selector.trim().replace(/,$/, ""))
183+
.join(",");
184184

185185
// Exit, if no selector.
186186
if (!selector_string) {
187187
return;
188188
}
189189

190-
let matches = dom.querySelectorAllAndMe(
191-
content,
192-
selector_string
193-
);
190+
let matches = dom.querySelectorAllAndMe(content, selector_string);
194191
matches = matches.filter((el) => {
195192
// Filter out patterns:
196193
// - with class ``.disable-patterns`` or wrapped within.

src/pat/validation/validation.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import registry from "../../core/registry";
1111

1212
const logger = logging.getLogger("pat-validation");
1313

14-
1514
export const parser = new Parser("validation");
1615
parser.addArgument("disable-selector", "[type=submit], button:not([type=button])"); // Elements which must be disabled if there are errors
1716
parser.addArgument("message-date", ""); // "This value must be a valid date"
@@ -306,7 +305,6 @@ class Pattern extends BasePattern {
306305
// Call `emit_update` separately
307306
this.emit_update("invalid");
308307
}
309-
310308
}
311309

312310
if (event?.type === "submit") {
@@ -318,7 +316,14 @@ class Pattern extends BasePattern {
318316
this.set_error_message(input);
319317
}
320318

321-
set_error({ input, msg, attribute = null, min = null, max = null, skip_event = false }) {
319+
set_error({
320+
input,
321+
msg,
322+
attribute = null,
323+
min = null,
324+
max = null,
325+
skip_event = false,
326+
}) {
322327
// Replace some variables, as like validate.js
323328
if (attribute) {
324329
msg = msg.replace(/%{attribute}/g, attribute);

0 commit comments

Comments
 (0)