diff --git a/.eslintrc b/.eslintrc index 1eb6dab4..9d1f2b79 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,6 +7,11 @@ "plugin:prettier/recommended" ], "ignorePatterns": ["*.yml"], + "globals": { + "window": true, + "localStorage": true, + "document": true + }, "parser": "babel-eslint", "parserOptions": { "sourceType": "module", diff --git a/package.json b/package.json index ebfc2914..d0879fe0 100644 --- a/package.json +++ b/package.json @@ -48,9 +48,9 @@ "vite": "^5.2.11" }, "scripts": { - "lint:js": "eslint --ext .js --ext .jsx ./src", + "lint:js": "eslint --ext .js --ext .jsx ./src --max-warnings=0", "lint:js:fix": "eslint --ext .js --ext .jsx --fix ./src", - "lint:scss": "stylelint \"./src/**/*.scss\"", + "lint:scss": "stylelint \"./src/**/*.scss\" --max-warnings=0", "lint:scss:fix": "stylelint --fix \"./src/**/*.scss\"", "check-coding-standards": "yarn lint:js && yarn lint:scss", "apply-coding-standards": "yarn lint:js:fix && yarn lint:scss:fix", diff --git a/src/components/feed-sources/feed-source-form.jsx b/src/components/feed-sources/feed-source-form.jsx index 6c50fd48..2cce65ae 100644 --- a/src/components/feed-sources/feed-source-form.jsx +++ b/src/components/feed-sources/feed-source-form.jsx @@ -22,13 +22,14 @@ import EventDatabaseApiFeedType from "./templates/event-database-feed-type"; * @param {Function} props.handleInput Handles form input. * @param {Function} props.handleSubmit Handles form submit. * @param {string} props.headerText Headline text. - * @param {boolean} [props.isLoading=false] Indicator of whether the form is - * loading. Default is `false` - * @param {string} [props.loadingMessage=""] The loading message for the - * spinner. Default is `""` - * @param {object} props.feedSource The feed source object + * @param {boolean} [props.isLoading] Indicator of whether the form is loading. + * Default is `false` + * @param {string} [props.loadingMessage] The loading message for the spinner. + * Default is `""` * @param {object} props.feedSourceTypeOptions The options for feed source types * @param {string} props.mode The mode + * @param {Function} props.onFeedTypeChange Callback on feed type change. + * @param {Function} props.handleSecretInput Callback on secret input change. * @returns {object} The feed-source form. */ function FeedSourceForm({ @@ -81,15 +82,28 @@ function FeedSourceForm({ options={feedSourceTypeOptions} /> - {feedSource?.feedType === "App\\Feed\\CalendarApiFeedType" && - () - } - {feedSource?.feedType === "App\\Feed\\EventDatabaseApiFeedType" && - () - } - {feedSource?.feedType === "App\\Feed\\NotifiedFeedType" && - () - } + {feedSource?.feedType === "App\\Feed\\CalendarApiFeedType" && ( + + )} + {feedSource?.feedType === "App\\Feed\\EventDatabaseApiFeedType" && ( + + )} + {feedSource?.feedType === "App\\Feed\\NotifiedFeedType" && ( + + )}