forked from paufau/react-native-multiple-modals
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
63 lines (60 loc) · 1.67 KB
/
eslint.config.js
File metadata and controls
63 lines (60 loc) · 1.67 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// ESLint 9 Flat Config
// See: https://eslint.org/docs/latest/use/configure/configuration-files-new
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const tsParser = require('@typescript-eslint/parser');
const reactPlugin = require('eslint-plugin-react');
const reactHooksPlugin = require('eslint-plugin-react-hooks');
const js = require('@eslint/js');
module.exports = [
{
ignores: [
'lib/**',
'node_modules/**',
'*.d.ts',
'android/**',
'ios/**',
],
},
{
files: ['src/**/*.{ts,tsx}'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: { jsx: true },
},
globals: {
__DEV__: 'readonly',
document: 'readonly',
require: 'readonly',
console: 'readonly',
},
},
plugins: {
'@typescript-eslint': tsPlugin,
react: reactPlugin,
'react-hooks': reactHooksPlugin,
},
settings: { react: { version: 'detect' } },
rules: {
// Base JS
...js.configs.recommended.rules,
'no-unused-vars': 'off',
// React
...reactPlugin.configs.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
// TS
...tsPlugin.configs.recommended.rules,
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
},
},
];