-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.mjs
More file actions
44 lines (42 loc) · 1.36 KB
/
eslint.config.mjs
File metadata and controls
44 lines (42 loc) · 1.36 KB
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
import tidgiConfig from 'eslint-config-tidgi';
import reactNative from 'eslint-plugin-react-native';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export default [
...tidgiConfig,
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
plugins: {
'react-native': reactNative,
},
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['./*.js', './*.mjs', 'e2e/cucumber.js'],
},
tsconfigRootDir: __dirname,
},
},
rules: {
// React Native specific rules
'react-native/no-unused-styles': 'error',
'react-native/split-platform-components': 'error',
'react-native/no-inline-styles': 'warn',
'react-native/no-color-literals': 'warn',
'react-native/no-raw-text': 'off', // Allow raw text in Text components
'react-native/no-single-element-style-arrays': 'error',
// Allow necessary patterns for type definitions
'@typescript-eslint/no-empty-object-type': ['error', { allowObjectTypes: 'always' }],
},
},
{
files: ['**/*.d.ts'],
rules: {
// Relax rules for type definition files
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
},
},
];