From acff43ce871ade2fb21a9261f326259f12dd7a9d Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Thu, 16 Dec 2021 02:58:25 -0800 Subject: [PATCH] Fix ESLint setup (#240) --- template/_eslintrc.js | 6 ++++-- template/package.json | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/template/_eslintrc.js b/template/_eslintrc.js index 7b39f297..137a7d0b 100644 --- a/template/_eslintrc.js +++ b/template/_eslintrc.js @@ -1,8 +1,10 @@ module.exports = { root: true, extends: '@react-native-community', + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], rules: { - "no-shadow": "off", - "@typescript-eslint/no-shadow": ["error"], + 'no-shadow': 'off', + '@typescript-eslint/no-shadow': ['error'], }, }; diff --git a/template/package.json b/template/package.json index 0c2624dc..548ad4c7 100644 --- a/template/package.json +++ b/template/package.json @@ -20,6 +20,8 @@ "@types/jest": "^26.0.23", "@types/react-native": "^0.66.4", "@types/react-test-renderer": "^17.0.1", + "@typescript-eslint/eslint-plugin": "^5.7.0", + "@typescript-eslint/parser": "^5.7.0", "babel-jest": "^26.6.3", "eslint": "^7.14.0", "jest": "^26.6.3",