@@ -4,7 +4,6 @@ module.exports = {
44 "eslint:recommended" ,
55 "plugin:react/recommended" ,
66 "plugin:@typescript-eslint/recommended" ,
7- "@react-native-community" ,
87 "prettier" ,
98 ] ,
109 ignorePatterns : [
@@ -25,16 +24,17 @@ module.exports = {
2524 "react-hooks" ,
2625 "@typescript-eslint" ,
2726 "promise" ,
28- "jest" ,
2927 "unused-imports" ,
3028 ] ,
3129 env : {
3230 browser : true ,
3331 es2021 : true ,
34- "jest/globals" : true ,
3532 "react-native/react-native" : true ,
3633 } ,
3734 settings : {
35+ react : {
36+ version : "detect" ,
37+ } ,
3838 "import/resolver" : {
3939 node : {
4040 extensions : [
@@ -58,6 +58,14 @@ module.exports = {
5858 ] ,
5959 } ,
6060 } ,
61+ // Ensure the import plugin does not try to parse node_modules with the TS parser
62+ "import/parsers" : {
63+ "@typescript-eslint/parser" : [ ".ts" , ".tsx" ] ,
64+ } ,
65+ // Treat react-native as a core module and skip deep parsing
66+ "import/core-modules" : [ "react-native" ] ,
67+ // And in general, do not attempt to parse files in node_modules
68+ "import/ignore" : [ "node_modules/" ] ,
6169 } ,
6270 rules : {
6371 quotes : [
@@ -80,10 +88,12 @@ module.exports = {
8088 constant : "always" ,
8189 } ,
8290 ] ,
83- "no-useless-catch" : 0 ,
84- "react-hooks/exhaustive-deps" : 0 ,
91+ "react-hooks/exhaustive-deps" : [
92+ "error" ,
93+ { additionalHooks : "(useMemoOne)" } ,
94+ ] ,
8595 "max-len" : [ "error" , 120 ] ,
86- "@typescript-eslint/ban-ts-comment" : 1 ,
96+ "@typescript-eslint/ban-ts-comment" : 2 ,
8797 "@typescript-eslint/no-empty-function" : 0 ,
8898 "@typescript-eslint/no-explicit-any" : 1 ,
8999 "@typescript-eslint/explicit-module-boundary-types" : 0 ,
@@ -110,6 +120,8 @@ module.exports = {
110120 "import/no-deprecated" : 0 ,
111121 "@typescript-eslint/indent" : 0 ,
112122 "react-hooks/rules-of-hooks" : 2 ,
123+ "unused-imports/no-unused-imports" : 2 ,
124+ "unused-imports/no-unused-vars" : 2 ,
113125 camelcase : 2 ,
114126 "prefer-destructuring" : 2 ,
115127 "no-nested-ternary" : 2 ,
0 commit comments