11module . exports = {
22 root : true ,
3- parser : 'babel- eslint' ,
4- plugins : [ 'react' , 'react-native' , 'fp' , ' import' , 'prettier '] ,
3+ parser : '@ babel/ eslint-parser ' ,
4+ plugins : [ 'react' , 'react-native' , 'import' ] ,
55 env : {
66 jest : true ,
77 } ,
@@ -38,8 +38,9 @@ module.exports = {
3838 extends : [
3939 'eslint:recommended' ,
4040 'plugin:react/recommended' ,
41- 'prettier ' ,
41+ 'plugin:jest/recommended ' ,
4242 '@react-native-community' ,
43+ 'prettier' ,
4344 ] ,
4445 rules : {
4546 'react/no-deprecated' : 'warn' ,
@@ -59,7 +60,7 @@ module.exports = {
5960 'no-console' : [ 0 ] ,
6061 'import/prefer-default-export' : 'off' ,
6162 'jsx-a11y/href-no-hash' : 'off' ,
62- 'react/prop-types' : [ 2 ] ,
63+ 'react/prop-types' : [ 0 ] ,
6364 quotes : [ 2 , 'single' ] ,
6465 'eol-last' : [ 0 ] ,
6566 'no-continue' : [ 1 ] ,
@@ -73,85 +74,37 @@ module.exports = {
7374 'no-underscore-dangle' : [ 0 ] ,
7475 'no-await-in-loop' : 0 ,
7576 'no-restricted-syntax' : 0 ,
76- 'no-use-before-define' : [ 'error' , { functions : false } ] ,
77- 'no-unused-expressions' : [ 'error' , { allowTaggedTemplates : true } ] ,
78- 'no-plusplus' : [ 'error' , { allowForLoopAfterthoughts : true } ] ,
79- 'prettier/prettier' : [
80- 'error' ,
81- {
82- singleQuote : true ,
83- trailingComma : 'all' ,
84- bracketSpacing : false ,
85- } ,
86- ] ,
87- 'fp/no-mutating-methods' : 'warn' ,
77+ 'no-use-before-define' : [ 'error' , { functions : false } ] ,
78+ 'no-unused-expressions' : [ 'error' , { allowTaggedTemplates : true } ] ,
79+ 'no-plusplus' : [ 'error' , { allowForLoopAfterthoughts : true } ] ,
80+ 'react-native/no-inline-styles' : 0 ,
81+ '@typescript-eslint/no-explicit-any' : [ 'error' , { ignoreRestArgs : true } ] ,
8882 } ,
83+ ignorePatterns : [ '**/rnmapbox.web.symlink' , 'plugin/build/' ] ,
8984 overrides : [
90- // Match TypeScript Files
91- // =================================
9285 {
86+ // Match TypeScript Files
9387 files : [ '**/*.{ts,tsx}' ] ,
9488
95- // Global ESLint Settings
96- // =================================
97- env : {
98- jest : true ,
99- es6 : true ,
100- browser : true ,
101- node : true ,
102- } ,
103- globals : {
104- __DEV__ : true ,
105- element : true ,
106- by : true ,
107- waitFor : true , // detox e2e
108- } ,
109- settings : {
110- 'import/resolver' : {
111- node : {
112- extensions : [ '.js' , '.jsx' , '.ts' , '.tsx' ] ,
113- } ,
114- } ,
115- react : {
116- version : 'detect' , // React version. "detect" automatically picks the version you have installed.
117- // You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
118- // default to latest and warns if missing
119- // It will default to "detect" in the future
120- } ,
121- } ,
122-
123- // Parser Settings
124- parser : '@typescript-eslint/parser' ,
12589 parserOptions : {
126- // Lint with Type Information
127- // https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md
128- tsconfigRootDir : __dirname ,
129- project : './tsconfig.json' ,
130- ecmaFeatures : {
131- experimentalObjectRestSpread : true ,
132- jsx : true ,
133- } ,
134- sourceType : 'module' ,
90+ project : [
91+ './tsconfig.json' ,
92+ './example/tsconfig.json' ,
93+ './plugin/src/__tests__/tsconfig.eslint.json' ,
94+ ] ,
13595 } ,
136-
137- // Extend Other Configs
138- // =================================
96+ plugins : [ '@typescript-eslint' ] ,
13997 extends : [
140- 'plugin:@typescript-eslint/recommended' ,
141- 'plugin:react-native/all' ,
14298 'eslint:recommended' ,
14399 'plugin:react/recommended' ,
100+ '@react-native-community' ,
101+ 'plugin:@typescript-eslint/recommended' ,
144102 'prettier' ,
145103 ] ,
146- plugins : [ 'react' , 'react-hooks' , '@typescript-eslint' , 'prettier' ] ,
147104 rules : {
148- // turn these one to check where all the return types are missing
149- // and where arguments of functions are not typed
150- '@typescript-eslint/explicit-function-return-type' : [ 'error' ] ,
151- '@typescript-eslint/explicit-module-boundary-types' : [ 'error' ] ,
152- 'no-use-before-define' : 'off' ,
153- '@typescript-eslint/no-use-before-define' : [ 'warn' ] ,
154- 'react/prop-types' : 'off' ,
105+ 'no-shadow' : 'off' ,
106+ 'import/named' : 'off' ,
107+ 'react-native/no-inline-styles' : 0 ,
155108 } ,
156109 } ,
157110 ] ,
0 commit comments