forked from AmazonAppDev/react-native-multi-tv-app-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
45 lines (44 loc) Β· 1.36 KB
/
eslint.config.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
const prettier = require('eslint-plugin-prettier');
module.exports = [
{
files: ['**/*.ts', '**/*.tsx'],
ignores: ['node_modules/**', 'build/**', 'dist/**'],
languageOptions: {
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true, // Enable JSX support
},
},
globals: {
React: 'readonly',
},
},
plugins: {
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
react: require('eslint-plugin-react'),
'react-native': require('eslint-plugin-react-native'),
prettier: prettier,
},
rules: {
semi: ['warn', 'always'],
'prefer-const': 'error',
'react-native/no-unused-styles': 'warn',
'react-native/split-platform-components': 'warn',
'react-native/no-inline-styles': 'error',
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/colon-trailing-spacing': ['off'],
'prettier/prettier': [
'warn',
{
endOfLine: 'auto',
usePrettierrc: true, // Use .prettierrc file for configuration
},
],
},
},
];