From 6cfde46e69637996bd4cb2754dd0c10698afa34f Mon Sep 17 00:00:00 2001 From: Duncan Lock Date: Sat, 14 Jan 2017 11:59:39 -0800 Subject: [PATCH] Fix eslint errors --- src/fields/abstractField.js | 12 ++++++------ src/formGenerator.vue | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/fields/abstractField.js b/src/fields/abstractField.js index a8c4ea81..804524a0 100644 --- a/src/fields/abstractField.js +++ b/src/fields/abstractField.js @@ -100,22 +100,22 @@ export default { getFieldID(schema) { // Try to get a reasonable default id from the schema, // then slugify it. - if (typeof schema.id !== 'undefined') { + if (typeof schema.id !== "undefined") { // If an ID's been explicitly set, use it unchanged - return schema.id + return schema.id; } else { return (schema.inputName || schema.label || schema.model) .toString() .trim() .toLowerCase() // Spaces to dashes - .replace(/ /g, '-') + .replace(/ /g, "-") // Multiple dashes to one - .replace(/-{2,}/g, '-') + .replace(/-{2,}/g, "-") // Remove leading & trailing dashes - .replace(/^-+|-+$/g, '') + .replace(/^-+|-+$/g, "") // Remove anything that isn't a (English/ASCII) letter or number. - .replace(/([^a-zA-Z0-9\._-]+)/g, '') + .replace(/([^a-zA-Z0-9\._-]+)/g, "") ; } } diff --git a/src/formGenerator.vue b/src/formGenerator.vue index a2a83250..4a5c0e11 100644 --- a/src/formGenerator.vue +++ b/src/formGenerator.vue @@ -146,11 +146,11 @@ div // Should field type have a label? fieldTypeHasLabel(field) { switch (field.type) { - case 'button': - case 'submit': - return false; - default: - return true; + case "button": + case "submit": + return false; + default: + return true; } },