From 9ca282390bec397af4135578d286ef3bda0ffee0 Mon Sep 17 00:00:00 2001 From: Tom Spencer Date: Mon, 22 Nov 2021 20:57:26 +0000 Subject: [PATCH 1/2] Fix eslint no-shadow issue with TypeScript enums The [typescript-eslint docs](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-shadow.md) mention that the base `no-shadow` rule should be disabled in favour of `@typescript-eslint/no-shadow`. --- packages/eslint-config-react-native-community/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/eslint-config-react-native-community/index.js b/packages/eslint-config-react-native-community/index.js index 71480dca05b2b0..36e67fea3d02e0 100644 --- a/packages/eslint-config-react-native-community/index.js +++ b/packages/eslint-config-react-native-community/index.js @@ -56,6 +56,8 @@ module.exports = { {argsIgnorePattern: '^_'}, ], 'no-unused-vars': 'off', + "no-shadow": "off", + "@typescript-eslint/no-shadow": 1, }, }, { From 5ccb679668735ba98f8061e7808b4c9c24c4be36 Mon Sep 17 00:00:00 2001 From: Tom Spencer Date: Mon, 22 Nov 2021 21:05:22 +0000 Subject: [PATCH 2/2] Use single quotes in eslint config file To match the rest of the code style. --- packages/eslint-config-react-native-community/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-config-react-native-community/index.js b/packages/eslint-config-react-native-community/index.js index 36e67fea3d02e0..b9b7ee2273491d 100644 --- a/packages/eslint-config-react-native-community/index.js +++ b/packages/eslint-config-react-native-community/index.js @@ -56,8 +56,8 @@ module.exports = { {argsIgnorePattern: '^_'}, ], 'no-unused-vars': 'off', - "no-shadow": "off", - "@typescript-eslint/no-shadow": 1, + 'no-shadow': 'off', + '@typescript-eslint/no-shadow': 1, }, }, {