From 3f9f82a2686f2631f53f413c8fea9a96c761eaeb Mon Sep 17 00:00:00 2001 From: ismay Date: Tue, 18 May 2021 15:10:29 +0200 Subject: [PATCH] chore(eslint): move cypress eslint rules to root --- .eslintrc.js | 13 +++++++++++-- cypress/.eslintrc.js | 9 --------- 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 cypress/.eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js index 7a5615eea..1e033a359 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,12 +4,15 @@ const { config } = require('@dhis2/cli-style') module.exports = { root: true, - plugins: ['react-hooks', 'i18next', 'jsx-a11y'], + plugins: ['react-hooks', 'i18next'], extends: [ config.eslintReact, 'plugin:jsx-a11y/recommended', 'plugin:compat/recommended', ], + globals: { + cy: 'readonly', + }, rules: { 'compat/compat': 'warn', 'i18next/no-literal-string': [ @@ -36,7 +39,6 @@ module.exports = { ], 'import/no-useless-path-segments': 'error', 'import/order': ['error', { 'newlines-between': 'never' }], - 'react/require-default-props': 'warn', 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'error', }, @@ -59,5 +61,12 @@ module.exports = { 'import/no-unused-modules': 'off', }, }, + { + files: ['cypress/**/*.js'], + rules: { + 'import/no-unassigned-import': 'off', + 'import/no-unused-modules': 'off', + }, + }, ], } diff --git a/cypress/.eslintrc.js b/cypress/.eslintrc.js deleted file mode 100644 index 312334bf5..000000000 --- a/cypress/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -const { config } = require('@dhis2/cli-style') - -module.exports = { - root: true, - extends: [config.eslintReact], - globals: { - cy: 'readonly', - }, -}