From e57bd44ed4235917d997bd1f8ce5214dfdca0129 Mon Sep 17 00:00:00 2001 From: Nomandes Date: Fri, 22 Dec 2023 13:54:15 +0100 Subject: [PATCH] fix: improve eslint padding rule --- .eslintrc.js | 13 ++++++++----- .../src/common/context/ColorThemeContext.tsx | 1 + .../frontend/src/retro/components/TimePicker.tsx | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 54203233..f6ec5dce 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -37,12 +37,15 @@ module.exports = { "@typescript-eslint/restrict-template-expressions": "off", "@typescript-eslint/no-unused-vars": "warn", "@typescript-eslint/triple-slash-reference": "off", - "prettier/prettier": "warn", - "padding-line-between-statements": [ + "padding-line-between-statements": "off", + "@typescript-eslint/padding-line-between-statements": [ "warn", - { blankLine: "always", prev: "block-like", next: "function" }, - { blankLine: "always", prev: "const", next: "function" }, - { blankLine: "always", prev: "function", next: "return" }, + { + blankLine: "always", + prev: "*", + next: ["interface", "type", "function"], + }, ], + "prettier/prettier": "warn", }, }; diff --git a/packages/frontend/src/common/context/ColorThemeContext.tsx b/packages/frontend/src/common/context/ColorThemeContext.tsx index b36495f8..1daa7449 100644 --- a/packages/frontend/src/common/context/ColorThemeContext.tsx +++ b/packages/frontend/src/common/context/ColorThemeContext.tsx @@ -17,6 +17,7 @@ declare module "@mui/material/styles" { highlightColorPrimary: string; highlightColorSecondary: string; } + interface Palette { highlightColorPrimary: string; highlightColorSecondary: string; diff --git a/packages/frontend/src/retro/components/TimePicker.tsx b/packages/frontend/src/retro/components/TimePicker.tsx index 39a3e7a6..6536e189 100644 --- a/packages/frontend/src/retro/components/TimePicker.tsx +++ b/packages/frontend/src/retro/components/TimePicker.tsx @@ -2,6 +2,7 @@ import React from "react"; import { FlexBox } from "../../common/components/FlexBox"; import { TextInput } from "../../common/components/TextInput"; import IncrementTimerButton from "./buttons/IncrementTimerButton"; + interface TimePickerProps { minutes: string; seconds: string;