From 709875671191feeb47dcb3f2c3cb56ec721bce26 Mon Sep 17 00:00:00 2001 From: Ricardo Costa <48949546+ripecosta@users.noreply.github.com> Date: Mon, 12 Aug 2024 18:38:20 +0100 Subject: [PATCH] chore: centralise eslint config --- .eslintrc.json | 14 +++++++++++++- test/.eslintrc.json | 9 --------- 2 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 test/.eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json index d7a95721b..9291598cb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -56,5 +56,17 @@ "jsx-a11y/href-no-hash": "off", "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }], "react/jsx-props-no-spreading": 0 - } + }, + "overrides": [ + { + "files": ["test/*"], + "extends": ["plugin:testing-library/react", "plugin:jest-dom/recommended"], + "globals": { + "globalThis": false + }, + "rules": { + "testing-library/no-node-access": ["error", { "allowContainerFirstChild": true }] + } + } + ] } diff --git a/test/.eslintrc.json b/test/.eslintrc.json deleted file mode 100644 index 4a6cfa3ce..000000000 --- a/test/.eslintrc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": ["plugin:testing-library/react", "plugin:jest-dom/recommended"], - "globals": { - "globalThis": false - }, - "rules": { - "testing-library/no-node-access": ["error", { "allowContainerFirstChild": true }] - } -}