From 051fdfb08179e89f4d9278f8117b34dfa6dc80dd Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Thu, 14 Mar 2024 23:40:07 -0400 Subject: [PATCH] chore: more eslint rule improvements --- .../eslint-config-payload/eslint-config/index.js | 13 +++++++++++++ packages/translations/.eslintignore | 1 + 2 files changed, 14 insertions(+) diff --git a/packages/eslint-config-payload/eslint-config/index.js b/packages/eslint-config-payload/eslint-config/index.js index 55ceb8120..15f3abf4f 100644 --- a/packages/eslint-config-payload/eslint-config/index.js +++ b/packages/eslint-config-payload/eslint-config/index.js @@ -29,10 +29,21 @@ const reactRules = { 'react/jsx-max-props-per-line': 'off', // react/jsx-one-expression-per-line conflicts with prettier. Sometimes react/jsx-one-expression-per-line tells you to put it on a new line, but prettier moves it back. 'react/jsx-one-expression-per-line': 'off', + // react/jsx-wrap-multilines conflicts with prettier. Sometimes react/jsx-wrap-multilines tells you to put it on a new line, but prettier moves it back. + 'react/jsx-wrap-multilines': 'off', + // react/jsx-indent conflicts with prettier. Sometimes react/jsx-indent tells you to put it on a new line, but prettier moves it back. + 'react/jsx-indent': 'off', + // react/jsx-curly-newline conflicts with prettier. Sometimes react/jsx-curly-newline tells you to put it on a new line, but prettier moves it back. + 'react/jsx-curly-newline': 'off', 'react/no-unused-prop-types': 'off', 'react/prop-types': 'off', 'react/require-default-props': 'off', + 'react/destructuring-assignment': 'warn', + 'react/no-unescaped-entities': 'warn', 'jsx-a11y/anchor-is-valid': 'warn', + 'jsx-a11y/control-has-associated-label': 'warn', + 'jsx-a11y/no-static-element-interactions': 'warn', + 'jsx-a11y/label-has-associated-control': 'warn', } const typescriptRules = { @@ -93,6 +104,8 @@ module.exports = { '**/dist/**', '**/node_modules', '**/temp', + '*.yml', + '*.json', ], env: { es6: true, diff --git a/packages/translations/.eslintignore b/packages/translations/.eslintignore index dbc0a7ef2..0c8d9edc0 100644 --- a/packages/translations/.eslintignore +++ b/packages/translations/.eslintignore @@ -9,3 +9,4 @@ **/node_modules **/temp **/all/** +writeTranslationFiles.ts