diff --git a/packages/eslint-config-twilio-react/rules/react.js b/packages/eslint-config-twilio-react/rules/react.js index 78965ab..112ef09 100644 --- a/packages/eslint-config-twilio-react/rules/react.js +++ b/packages/eslint-config-twilio-react/rules/react.js @@ -78,6 +78,7 @@ module.exports = { html: true, }, ], + 'react/jsx-props-no-spreading': 'off', 'react/sort-comp': 'error', 'react/sort-prop-types': 'off', 'react/state-in-constructor': 'off', @@ -140,12 +141,7 @@ module.exports = { 'react/jsx-no-literals': 'off', 'react/jsx-no-target-blank': 'error', 'react/jsx-no-undef': 'error', - 'react/jsx-one-expression-per-line': [ - 'error', - { - allow: 'literal', - }, - ], + 'react/jsx-one-expression-per-line': 'off', 'react/jsx-curly-brace-presence': [ 'error', { diff --git a/packages/eslint-config-twilio-ts/rules/typescript.js b/packages/eslint-config-twilio-ts/rules/typescript.js index 08d5384..0f030a0 100644 --- a/packages/eslint-config-twilio-ts/rules/typescript.js +++ b/packages/eslint-config-twilio-ts/rules/typescript.js @@ -1,19 +1,16 @@ module.exports = { rules: { - '@typescript-eslint/explicit-function-return-type': [ - 'error', - { - allowExpressions: true, - allowTypedFunctionExpressions: true, - allowHigherOrderFunctions: true, - }, - ], + // We use Interface instead of PropTypes in TS + 'react/prop-types': 'off', + // Methods are sorted based on their modifiers, not React method ordering + 'react/sort-comp': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/indent': ['error', 2], '@typescript-eslint/member-ordering': 'error', '@typescript-eslint/no-empty-interface': [ 'error', { - 'allowSingleExtends': false, + allowSingleExtends: false, }, ], @@ -25,7 +22,9 @@ module.exports = { '@typescript-eslint/no-parameter-properties': [ 'error', { - allows: ['readonly'], + allows: [ + 'readonly', + ], }, ], '@typescript-eslint/no-require-imports': 'error',