Skip to content

Commit

Permalink
Fix: React testing and typescript rule fixes (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
DHedgecock committed Nov 21, 2021
1 parent e92310a commit b128f2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,17 @@ module.exports = {
// --- 🌲 Cypress directory --------------------------
{
files: ['cypress/**/*'],

env: { 'cypress/globals': true },

rules: {
...pluginCypress,
// Screen utility isn't available in Cypress tests
'testing-library/prefer-screen-queries': 'off',
},
rules: pluginCypress,
},

// --- 🚔 TypeScript files --------------------------
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',

rules: envRuleSeverities(NODE_ENV, {
'no-unused-vars': 'off', // Prefer TS no-unused-vars
// TS requires that fn params are typed so this rule is unnecessary
'react/prop-types': 'off',
// TS will error if required props aren't passed or default props without
Expand Down
2 changes: 1 addition & 1 deletion src/rules/plugin-testing-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'testing-library/no-await-sync-events': 'error',
'testing-library/no-await-sync-query': 'error',
'testing-library/no-container': 'error',
'testing-library/no-debug': 'error',
'testing-library/no-debugging-utils': 'error',
'testing-library/no-dom-import': ['error', 'react'],
'testing-library/no-manual-cleanup': 'error',
'testing-library/no-node-access': 'error',
Expand Down

0 comments on commit b128f2d

Please sign in to comment.