From 02084b09b60e0d1dcc82a2a510b77dd28f3d7f79 Mon Sep 17 00:00:00 2001 From: Joe Frambach Date: Sat, 19 Mar 2022 14:27:41 -0700 Subject: [PATCH] Fix ESLint and Typescript-ESLint disagreeing about function spacing Summary: Fixes #33452 by replacing deprecated no-spaced-func ESLint rule and adding related TypeScript. Changelog: [General][Fixed] - Update function spacing linting rules See #33452 - Existing function spacing linting should pass as expected. --- packages/eslint-config-react-native-community/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-react-native-community/index.js b/packages/eslint-config-react-native-community/index.js index 34759731a5b2..9df5cce4b42b 100644 --- a/packages/eslint-config-react-native-community/index.js +++ b/packages/eslint-config-react-native-community/index.js @@ -59,6 +59,8 @@ module.exports = { 'no-shadow': 'off', '@typescript-eslint/no-shadow': 1, 'no-undef': 'off', + 'func-call-spacing': 'off', + '@typescript-eslint/func-call-spacing': 1, }, }, { @@ -257,7 +259,7 @@ module.exports = { 'no-empty-character-class': 1, // disallow the use of empty character classes in regular expressions 'no-lonely-if': 0, // disallow if as the only statement in an else block (off by default) 'no-new-object': 1, // disallow use of the Object constructor - 'no-spaced-func': 1, // disallow space between function identifier and application + 'func-call-spacing': 1, // disallow space between function identifier and application 'no-ternary': 0, // disallow the use of ternary operators (off by default) 'no-trailing-spaces': 1, // disallow trailing whitespace at the end of lines 'no-underscore-dangle': 0, // disallow dangling underscores in identifiers