-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.mid.js
62 lines (57 loc) · 1.79 KB
/
.eslintrc.mid.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Phase 2: Mid Development (.eslintrc.mts)
// Focus: Add structure and best practices
// ******** this file have issues please resolve those *********
module.exports = {
root: true,
extends: [
'expo',
'universe',
'universe/shared/typescript-analysis',
'@react-native-community',
'plugin:@typescript-eslint/strict-type-checked',
'prettier',
],
plugins: ['@typescript-eslint', 'react-hooks', 'react-native'],
env: {
'jest/globals': true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest', // This allows modern JavaScript features
sourceType: 'module', // This is crucial - it tells ESLint you're using ES modules
project: './tsconfig.json', // Point to your TypeScript config
},
rules: {
// Previous rules
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error', // Upgraded to error
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'error', // Upgraded to error
// New rules for better code structure
'react-native/no-inline-styles': 'warn',
'react-native/no-color-literals': 'warn',
'react-native/split-platform-components': 'error',
'@typescript-eslint/consistent-type-imports': 'warn',
'react/jsx-no-bind': [
'warn',
{
allowArrowFunctions: true,
allowBind: false,
ignoreRefs: true,
},
],
// Still disabled for flexibility
'@typescript-eslint/explicit-module-boundary-types': 'off',
'react/require-default-props': 'off',
//god known what this ban types is, disabling it for time being
'@typescript-eslint/ban-types': 'off',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parserOptions: {
project: './tsconfig.json',
},
},
],
};