-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.dev.js
58 lines (54 loc) · 1.78 KB
/
.eslintrc.dev.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
// Phase 1: Initial Development (.eslintrc.mts)
// Focus: Catch critical bugs while maintaining development speed
// https://docs.expo.dev/guides/using-eslint/
// this file has strict-type-checked plugin unlike recommended on in .eslintrc.js
// ******** this file have issues please resolve those *********
module.exports = {
root: true,
extends: [
'expo',
'universe',
'@react-native-community',
'plugin:@typescript-eslint/strict-type-checked',
'prettier',
],
plugins: ['@typescript-eslint', 'react-hooks', 'jest'],
env: {
'jest/globals': true,
},
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: {
// Critical rules only
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'warn',
// Disabled rules for faster development
'react-native/no-inline-styles': 'off',
'react-native/no-color-literals': 'off',
'react/jsx-props-no-spreading': 'off',
'@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',
},
},
{
// Lint non-TypeScript files without "parserOptions.project"
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off', // Example: Allow 'require' in JavaScript files
},
},
],
};