From 3e48809f0071e564228b9936a8c40be47b9d7484 Mon Sep 17 00:00:00 2001 From: Felix Hamann Date: Mon, 3 Jun 2019 11:53:01 +0200 Subject: [PATCH] add eslint rule for enforced single quotes --- .eslintrc.json | 3 ++- frontend/src/app.spec.js | 2 +- frontend/src/main.js | 4 ++-- .../src/services/html-helpers/html-helpers.js | 2 +- .../html-helpers/html-helpers.spec.js | 2 +- .../services/http-client/http-client.spec.js | 2 +- frontend/src/services/i18n/i18n.spec.js | 2 +- frontend/src/utils/alerts/alerts.scss | 6 ++--- frontend/src/utils/alerts/alerts.spec.js | 2 +- frontend/src/utils/asidenav/asidenav.md | 2 +- frontend/src/utils/async-form/async-form.md | 2 +- frontend/src/utils/check-all/check-all.js | 2 +- frontend/src/utils/form/auto-submit-button.js | 2 +- frontend/src/utils/form/auto-submit-button.md | 2 +- frontend/src/utils/form/auto-submit-input.md | 2 +- frontend/src/utils/form/datepicker.js | 24 +++++++++---------- frontend/src/utils/form/form-error-remover.js | 2 +- frontend/src/utils/form/form.scss | 2 +- .../src/utils/form/interactive-fieldset.js | 2 +- .../src/utils/form/interactive-fieldset.md | 24 +++++++++---------- .../src/utils/form/navigate-away-prompt.js | 6 ++--- .../src/utils/form/reactive-submit-button.js | 2 +- .../src/utils/form/reactive-submit-button.md | 4 ++-- frontend/src/utils/inputs/checkbox.js | 4 ++-- frontend/src/utils/inputs/checkbox.md | 4 ++-- frontend/src/utils/inputs/checkbox.scss | 4 ++-- frontend/src/utils/inputs/file-input.js | 2 +- frontend/src/utils/inputs/file-input.md | 6 ++--- frontend/src/utils/inputs/inputs.scss | 24 +++++++++---------- frontend/src/utils/inputs/radio.scss | 2 +- frontend/src/utils/mass-input/mass-input.js | 4 ++-- frontend/src/utils/mass-input/mass-input.md | 8 +++---- frontend/src/utils/modal/modal.md | 2 +- frontend/src/utils/tooltips/tooltips.js | 2 +- frontend/src/utils/tooltips/tooltips.scss | 2 +- frontend/src/utils/utils.js | 22 ++++++++--------- frontend/vendor/flatpickr.css | 4 ++-- frontend/vendor/fontawesome.css | 2 +- 38 files changed, 98 insertions(+), 97 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 06d95155c..6fcef7c27 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -22,6 +22,7 @@ "no-console": "off", "no-extra-semi": "off", "semi": ["error", "always"], - "comma-dangle": ["error", "always-multiline"] + "comma-dangle": ["error", "always-multiline"], + "quotes": ["error", "single"] } } diff --git a/frontend/src/app.spec.js b/frontend/src/app.spec.js index 21a381a68..ab7385448 100644 --- a/frontend/src/app.spec.js +++ b/frontend/src/app.spec.js @@ -1,4 +1,4 @@ -import { App } from "./app"; +import { App } from './app'; const TEST_UTILS = [ { name: 'util1' }, diff --git a/frontend/src/main.js b/frontend/src/main.js index eb76d102e..aa509bdc3 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -15,9 +15,9 @@ window.App = app; // return; // } -// const contentType = response.headers.get("content-type"); +// const contentType = response.headers.get('content-type'); // if (!contentType.match(options.accept)) { -// throw new Error('Server returned with "' + contentType + '" when "' + options.accept + '" was expected'); +// throw new Error('Server returned with '' + contentType + '' when '' + options.accept + '' was expected'); // } // } diff --git a/frontend/src/services/html-helpers/html-helpers.js b/frontend/src/services/html-helpers/html-helpers.js index 92d3168b5..8e6137b6c 100644 --- a/frontend/src/services/html-helpers/html-helpers.js +++ b/frontend/src/services/html-helpers/html-helpers.js @@ -3,7 +3,7 @@ export class HtmlHelpers { // `parseResponse` takes a raw HttpClient response and an options object. // Returns an object with `element` being an contextual fragment of the // HTML in the response and `ifPrefix` being the prefix that was used to - // "unique-ify" the ids of the received HTML. + // 'unique-ify' the ids of the received HTML. // Original Response IDs can optionally be kept by adding `keepIds: true` // to the `options` object. parseResponse(response, options = {}) { diff --git a/frontend/src/services/html-helpers/html-helpers.spec.js b/frontend/src/services/html-helpers/html-helpers.spec.js index c77015b26..f092e17fa 100644 --- a/frontend/src/services/html-helpers/html-helpers.spec.js +++ b/frontend/src/services/html-helpers/html-helpers.spec.js @@ -1,4 +1,4 @@ -import { HtmlHelpers } from "./html-helpers"; +import { HtmlHelpers } from './html-helpers'; describe('HtmlHelpers', () => { let htmlHelpers; diff --git a/frontend/src/services/http-client/http-client.spec.js b/frontend/src/services/http-client/http-client.spec.js index e61e248f0..a0f76584d 100644 --- a/frontend/src/services/http-client/http-client.spec.js +++ b/frontend/src/services/http-client/http-client.spec.js @@ -1,4 +1,4 @@ -import { HttpClient } from "./http-client"; +import { HttpClient } from './http-client'; const TEST_URL = 'http://example.com'; const FAKE_RESPONSE = { diff --git a/frontend/src/services/i18n/i18n.spec.js b/frontend/src/services/i18n/i18n.spec.js index 76e5348c0..1b4edf3c4 100644 --- a/frontend/src/services/i18n/i18n.spec.js +++ b/frontend/src/services/i18n/i18n.spec.js @@ -1,4 +1,4 @@ -import { I18n } from "./i18n"; +import { I18n } from './i18n'; describe('I18n', () => { let i18n; diff --git a/frontend/src/utils/alerts/alerts.scss b/frontend/src/utils/alerts/alerts.scss index cd0492f11..d2faf1b22 100644 --- a/frontend/src/utils/alerts/alerts.scss +++ b/frontend/src/utils/alerts/alerts.scss @@ -20,7 +20,7 @@ &::before { content: '\f077'; position: absolute; - font-family: "Font Awesome 5 Free"; + font-family: 'Font Awesome 5 Free'; left: 50%; top: 0; height: 30px; @@ -126,7 +126,7 @@ &::before { content: '\f05a'; position: absolute; - font-family: "Font Awesome 5 Free"; + font-family: 'Font Awesome 5 Free'; font-size: 24px; top: 50%; left: 50%; @@ -164,7 +164,7 @@ &::before { content: '\f00d'; position: absolute; - font-family: "Font Awesome 5 Free"; + font-family: 'Font Awesome 5 Free'; top: 50%; left: 50%; display: flex; diff --git a/frontend/src/utils/alerts/alerts.spec.js b/frontend/src/utils/alerts/alerts.spec.js index 6d0440391..c823488c6 100644 --- a/frontend/src/utils/alerts/alerts.spec.js +++ b/frontend/src/utils/alerts/alerts.spec.js @@ -1,4 +1,4 @@ -import { Alerts } from "./alerts"; +import { Alerts } from './alerts'; const MOCK_APP = { httpClient: { diff --git a/frontend/src/utils/asidenav/asidenav.md b/frontend/src/utils/asidenav/asidenav.md index 87fda9847..0aa73b0f7 100644 --- a/frontend/src/utils/asidenav/asidenav.md +++ b/frontend/src/utils/asidenav/asidenav.md @@ -11,7 +11,7 @@ Correctly positions hovered asidenav submenus and handles the favorites button o