From db3f58866714746a15df9e749f13ae9c961f3dc1 Mon Sep 17 00:00:00 2001 From: Katrinputrina Date: Wed, 21 Feb 2024 14:32:00 +0300 Subject: [PATCH] feat(ESLint): add rules for curly braces --- .eslintrc.js | 9 ++++++++- src/components/PageTitle.tsx | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index dc595eb12..fb5fbac33 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,7 +7,7 @@ module.exports = { 'plugin:@typescript-eslint/recommended', ], parser: '@typescript-eslint/parser', - plugins: ['import', 'prettier', '@taskany/rules'], + plugins: ['import', 'prettier', '@taskany/rules', 'react'], rules: { '@taskany/rules/prefer-interface': 'error', '@typescript-eslint/no-empty-function': 'off', @@ -90,5 +90,12 @@ module.exports = { ], }, ], + 'react/jsx-curly-brace-presence': [ + 'error', + { + props: 'never', + children: 'never', + }, + ], }, }; diff --git a/src/components/PageTitle.tsx b/src/components/PageTitle.tsx index 7f1dab02a..7a602ee6e 100644 --- a/src/components/PageTitle.tsx +++ b/src/components/PageTitle.tsx @@ -32,7 +32,7 @@ export const PageTitle: React.FC = ({ title, subtitle, info, onC {subtitle && ( <> - {':'} + : {subtitle}