diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-07-30 10:54:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-30 14:24:54 +0530 |
commit | f4b4416ea52d564bc2dbe543a82084ed98843ccc (patch) | |
tree | 7ca6b23571c86458a6b799746c91a7191de02715 /src/containers/settings/RecipesScreen.js | |
parent | 5.6.1-nightly.8 [skip ci] (diff) | |
download | ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.tar.gz ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.tar.zst ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.zip |
chore: migrate from tslint to @typescript-eslint (#1706)
- update .eslintrc to work for .js and .ts
- update devDependencies
- lint properly both root /src and nested /packages
- update webhint recommended setting for tsconfig.json to shrink output
- Manage all eslint rules from the repo root
- escape single quotes in scripts to please windows build
Co-authored-by: Vijay A <avijayr@protonmail.com>
Diffstat (limited to 'src/containers/settings/RecipesScreen.js')
-rw-r--r-- | src/containers/settings/RecipesScreen.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index 9a16fd064..0d6506705 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js | |||
@@ -82,7 +82,7 @@ export default @inject('stores', 'actions') @observer class RecipesScreen extend | |||
82 | return recipes | 82 | return recipes |
83 | // Filter out duplicate recipes | 83 | // Filter out duplicate recipes |
84 | .filter((recipe, index, self) => { | 84 | .filter((recipe, index, self) => { |
85 | const ids = self.map(rec => rec.id); | 85 | const ids = self.map((rec) => rec.id); |
86 | return ids.indexOf(recipe.id) === index; | 86 | return ids.indexOf(recipe.id) === index; |
87 | 87 | ||
88 | // Sort alphabetically | 88 | // Sort alphabetically |
@@ -95,7 +95,7 @@ export default @inject('stores', 'actions') @observer class RecipesScreen extend | |||
95 | 95 | ||
96 | // Create an array of RecipePreviews from an array of recipe objects | 96 | // Create an array of RecipePreviews from an array of recipe objects |
97 | createPreviews(recipes) { | 97 | createPreviews(recipes) { |
98 | return recipes.map(recipe => new RecipePreview(recipe)); | 98 | return recipes.map((recipe) => new RecipePreview(recipe)); |
99 | } | 99 | } |
100 | 100 | ||
101 | resetSearch() { | 101 | resetSearch() { |
@@ -134,11 +134,11 @@ export default @inject('stores', 'actions') @observer class RecipesScreen extend | |||
134 | // All search recipes from local recipes | 134 | // All search recipes from local recipes |
135 | ...this.createPreviews( | 135 | ...this.createPreviews( |
136 | this.customRecipes | 136 | this.customRecipes |
137 | .filter(service => service.name.toLowerCase().includes(this.state.needle.toLowerCase())), | 137 | .filter((service) => service.name.toLowerCase().includes(this.state.needle.toLowerCase())), |
138 | ), | 138 | ), |
139 | ]) : recipeFilter; | 139 | ]) : recipeFilter; |
140 | 140 | ||
141 | const customWebsiteRecipe = recipePreviews.all.find(service => service.id === CUSTOM_WEBSITE_RECIPE_ID); | 141 | const customWebsiteRecipe = recipePreviews.all.find((service) => service.id === CUSTOM_WEBSITE_RECIPE_ID); |
142 | 142 | ||
143 | const isLoading = recipePreviews.featuredRecipePreviewsRequest.isExecuting | 143 | const isLoading = recipePreviews.featuredRecipePreviewsRequest.isExecuting |
144 | || recipePreviews.allRecipePreviewsRequest.isExecuting | 144 | || recipePreviews.allRecipePreviewsRequest.isExecuting |
@@ -156,7 +156,7 @@ export default @inject('stores', 'actions') @observer class RecipesScreen extend | |||
156 | addedServiceCount={services.all.length} | 156 | addedServiceCount={services.all.length} |
157 | hasLoadedRecipes={recipePreviews.featuredRecipePreviewsRequest.wasExecuted} | 157 | hasLoadedRecipes={recipePreviews.featuredRecipePreviewsRequest.wasExecuted} |
158 | showAddServiceInterface={serviceActions.showAddServiceInterface} | 158 | showAddServiceInterface={serviceActions.showAddServiceInterface} |
159 | searchRecipes={e => this.searchRecipes(e)} | 159 | searchRecipes={(e) => this.searchRecipes(e)} |
160 | resetSearch={() => this.resetSearch()} | 160 | resetSearch={() => this.resetSearch()} |
161 | searchNeedle={this.state.needle} | 161 | searchNeedle={this.state.needle} |
162 | serviceStatus={services.actionStatus} | 162 | serviceStatus={services.actionStatus} |